ubuntu-session

Differences between revisions 10 and 11
Revision 10 as of 2015-08-13 14:24:39
Size: 3523
Editor: pD9ED6BC5
Comment:
Revision 11 as of 2015-08-14 06:08:38
Size: 3944
Editor: pD9ED6CFC
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
 * '''Test plan for component''': ofono  * '''Test plan for component''': bluez
Line 10: Line 10:

== Dependants/Clients ==
Line 27: Line 25:

'''NOTE:''' You only have to run those test when you test a new kernel. If just the userland components were updated these test steps are not required to be executed.
Line 49: Line 49:
 * Load VHCI kernel module  * Load VHCI kernel module as this one will not be loaded automatically as only used for testing
Line 54: Line 54:
'''FIXME:''' As of right now the tools used below are not part of any package. You have to build bluez manually with '''''--enable-experimental''''' to get them. '''FIXME:''' As of right now the tools used below are not part of any package. You have to build bluez manually with '''''--enable-experimental''''' to get them. This was reported as [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795350|a bug at Debian]] and should be fixed soon.
Line 103: Line 103:
Afterwards we have to evaluate the output. Failed commands with status 0x1 (Unknown HCI command) can be ignored as those are then just not supported by the Bluetooth version the device supports Afterwards we have to evaluate the output. Failed commands with status 0x1 (Unknown HCI command) can be ignored as those are then just not supported by the Bluetooth version the device supports. All other failed tests with a different status code should be considered as failed.

Description

This is a test plan for bluez as used by Ubuntu Touch. It does not cover scenarios and/or test cases for bluez installed on the desktop.

NOTE: This only covers BlueZ 5.x and doesn't respect 4.x in any way.

Test Plan

Test target device: Nexus 4, BQ Aquaris E4.5 Secondary/backup device: TBD

Initial set up:

  • Install latest image on phone
  • Install BlueZ from the silo PPA
  • Reboot the phone

Manual Tests

Kernel Bluetooth Management Layer tests

NOTE: You only have to run those test when you test a new kernel. If just the userland components were updated these test steps are not required to be executed.

BlueZ comes with several utilities to test the in-kernel bluetooth management layer. Those are

  • bnep-tester
  • hci-tester
  • mgmt-tester
  • rfcomm-tester
  • userchan-tester

Each of them tests a different functionality part of the kernel bluetooth management layer. We're going to run all of them as part of this test plan.

As preparation for some of them we have to do the following:

  • Stop the bluetoothd daemon

$ sudo service bluetooth stop
  • Make sure bluetooth is turned off but rfkill not blocked.

$ sudo rfkill unblock bluetooth
$ sudo hciconfig hci0 down
  • Load VHCI kernel module as this one will not be loaded automatically as only used for testing

$ sudo insmod /lib/modules/hci_vhci.ko

FIXME: As of right now the tools used below are not part of any package. You have to build bluez manually with --enable-experimental to get them. This was reported as a bug at Debian and should be fixed soon.

Adapter

As first thing we need to verify the Bluetooth adapter was correctly initialized and is ready to be used. Check with

$ hciconfig

that an HCI interface is present (normally hci0). Output should be similar to this

phablet@ubuntu-phablet:~$ hciconfig
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 4C:74:03:64:82:1F  ACL MTU: 1021:4  SCO MTU: 184:1
        DOWN 
        RX bytes:620 acl:0 sco:0 events:31 errors:0
        TX bytes:411 acl:0 sco:0 commands:31 errors:0

NOTE: The state of the interface should correspond to the Bluetooth indicator state in the UI. In the example above the interface is DOWN so the indicator should show disabled Bluetooth too.

As next step we verify the adapter is correctly connected the in-kernel management layer.

$ btmgmt info

The output should be similar to this

Index list with 1 item
hci0:   Primary controller
        addr 4C:74:03:64:82:1F version 6 manufacturer 70 class 0x000000
        supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr hs le advertising secure-conn debug-keys privacy static-addr 
        current settings: br/edr 
        name MTK MT6582 #1
        short name

If no controller is listed the test step should be considered as failed.

HCI

Run the HCI tester with

$ hci-tester

Afterwards we have to evaluate the output. Failed commands with status 0x1 (Unknown HCI command) can be ignored as those are then just not supported by the Bluetooth version the device supports. All other failed tests with a different status code should be considered as failed.

Management Interface

Run the management interface tester with

$ mgmt-tester

All tests should pass.

RFCOMM

Run the RFCOMM tester with

$ rfcomm-tester

All tests should pass.

BT User channel

Run the user channel tester with

$ userchan-tester

All tests should pass.

Process/Merges/TestPlans/ubuntu-session (last edited 2017-09-05 10:17:00 by jibel)