060a711d10ffa6eadb1e46e5b200b6ffb2dc83ef |
|
13-Jan-2017 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_device_xmlrpc_server: catch dbus error properly. In _find_device(), when executing dbus.Interface(), it may return False if exceptions occur owing to the decorator, @xmlrpc_server.dbus_safe(False). In this patch, we would like to catch the error and display the error log properly. For instance, if BlueZ crashes on dereferencing a null pointer, the test server should capture D-Bus interface exception. Refer to TEST below for catching such a crash example through bluetooth autotests. BUG=chromium:680913 TEST=Perform the following steps: (1) Reset bluez to the following commit. commit d9d6e06ce937f8c2e82898ff1442109539bea486 CHROMIUM: supports a new dbus method ResetAdvertising Emerge and deploy bluez to a chromebook machine. For more information about the crash issue, refer to crbug.com/662144: Bluetooth is broken in Chrome OS. Please also refer to the following patch about what were fixed about the crash caused by scan. https://chromium.googlesource.com/chromiumos/third_party/bluez/+/4c86ad3816e5f1e62cbca09b232157f768afedd8%5E%21/ Basically, that patch fixed the device flags type and size in /src/device.c in bluez. (2) Run bluetooth_AdapterPairing autotest. (cr) $ test_that --args "chameleon_host=$CHAMELEON_IP" $CHROMEBOOK_IP bluetooth_AdapterPairing.mouse When executing test_discover_device, observe an exception as follows: test_discover_device: <Fault 1: "<type 'exceptions.Exception'>:dbus.Interface error"> bluetoothd probably crash. Check out /var/log/messages. (3) Remember to update your bluez back to the latest commit after testing. Change-Id: I216adc626e0bf1dd7b02a416425693f8d14dde6b Reviewed-on: https://chromium-review.googlesource.com/427425 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
a66e59232a33379adeb5a7028ad8689d4fff9da8 |
|
05-Sep-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_AdapterHIDReports: mouse events test Verify that the bluetooth adapter of the DUT could correctly receive HID reports sent from a connected bluetooth device. Specifically, the following subtests are executed in this autotest. - test_reset_on_adapter - test_pairable - test_discover_device - test_pairing - test_connection_by_adapter - test_mouse_left_click - test_mouse_right_click - test_mouse_move_in_x - test_mouse_move_in_y - test_mouse_move_in_xy - test_mouse_scroll_down - test_mouse_scroll_up - test_mouse_click_and_drag - test_disconnection_by_adapter - test_remove_pairing BUG=chromium:680378 TEST=Use a DUT and a chameleon board with an RN-42 kit (cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP" $DUT_IP bluetooth_AdapterHIDReports.mouse Change-Id: I949da4b1fbca689bc5960b39dcba5a0369e31454 Reviewed-on: https://chromium-review.googlesource.com/381155 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
1b44963d50ee407952d0d54d400089363f3b71cc |
|
10-Jan-2017 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_AdapterPairing: fix errors due to interface changes Some interface changes of the underlying class cause the autotest errors. This patch changes the interface accordingly. BUG=chromium:679629 TEST=Confirm that bluetooth_AdapterPairing autotest is run correctly. (cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP" $CHROMEBOOK_IP bluetooth_AdapterPairing.mouse Change-Id: Ib615a1835fd8545b34f6f9eeebfd98426abac157 Reviewed-on: https://chromium-review.googlesource.com/426439 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
827bb7db38dbbfa543f60750c2c2f6cc95cc15e7 |
|
21-Nov-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_AdapterLEAdvertising: add 16 test cases for multi-advertising This patch implements a number of test cases to verify bluetooth low-energy advertising as a peripheral where each test case comprises a distinct combination and permutation of tests. Specifically, this autotest includes the following test cases: self.run_multiple_advertising_test_cases() self.test_case_SI200_RA3_CD_UA3() self.test_case_SI200_RA3_CD_RA1_CD_UA1_CD_UA3() self.test_case_SI200_RA3_CD_RS() self.test_case_SI200_RA3_CD_UA1_CD_RS() self.test_case_SI200_RA3_CD_PC_CD_UA3() self.test_case_SI200_RA3_CD_SR_CD_UA3() self.test_case_SI200_RA3_CD_UA1_CD_RA2_CD_UA4() self.test_case_SI200_RA5_CD_FRA1_CD_UA5() self.test_case_RA3_CD_SI200_CD_UA3() self.test_case_RA3_CD_SI200_CD_RS() self.test_case_RA3_CD_SI200_CD_UA1_CD_RS() self.test_case_RA3_CD_SI200_CD_SI2000_CD_UA3() self.test_case_RA5_CD_SI200_CD_FRA1_CD_UA5() self.test_case_RA3_CD_SI200_CD_FSI10_CD_FSI20000_CD_UA3() self.test_case_RA3_CD_SI200_CD_PC_CD_UA3() self.test_case_RA3_CD_SI200_CD_SR_CD_UA3() Mnemonics of the test cases: CD: check advertising duration and intervals RA: register advertisements UA: unregister advertisements SI: set advertising intervals RS: reset advertising FRA: fail to register extra advertisements when max ones have been registered. FSI: fail to set advertising intervals beyond legitimate range of [20 ms, 10,240 ms]. PC: power cycle the bluetooth adapter (controller). SR: suspend and resume the DUT (chromebook) BUG=chromium:602461 TEST=Conduct the autotest as follows: Test advertising with multiple advertisement instances simultaneously. (cr) $ test_that --board=$BOARD $DUT_IP bluetooth_AdapterLEAdvertising.multiple Change-Id: I49c606f624561b6d017cadf5911298285df7834f Reviewed-on: https://chromium-review.googlesource.com/412911 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
dd1a67bc8f5d31eb14f95dd0836e76f7c41c3c46 |
|
21-Nov-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_adpater_tests: add a few more tests This patch adds a few more bluetooth advertising tests. - test_check_duration_and_intervals - test_fail_to_register_advertisement - test_fail_to_set_advertising_intervals - test_check_advertising_intervals BUG=chromium:602461 TEST=None. Will be tested together with the CL: bluetooth_AdapterLEAdvertising: add 16 test cases for multi-advertising Change-Id: I9f134525c092697db2d16f0d447cac2e44e34bd6 Reviewed-on: https://chromium-review.googlesource.com/412910 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
4d9495a90d07781ca6a25115c7a71a80b5c61153 |
|
21-Nov-2016 |
Joseph Hwang <josephsih@chromium.org> |
cros/bluetooth: unregister advertisement This patch provides the method to unregister an advertisement and its corresponding test. Note that to unregister an advertisement, it is required to use the same self._advertising interface manager. This is because bluez only allows the same sender to invoke the UnregisterAdvertisement dbus method. BUG=chromium:602461 TEST=None. Will be tested together with the CL: bluetooth_AdapterLEAdvertising: add 16 test cases for multi-advertising Change-Id: I0ba76d72e07e9abf319f6fd118469e7c285e0db0 Reviewed-on: https://chromium-review.googlesource.com/412909 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
8de9dae7835e6b93d5b22875ee150db127b46aad |
|
19-Oct-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_AdapterLEAdvertising: test multi-advertisements This patch supports testing BLE multi-advertisement. Basically, it verifies that the advertising intervals could be set to the specified values and set back to default after reset. It also verifies that multiples advertisements as well as single advertisement could be registered and removed correctly. After reset, the advertising could be disabled. It also fixes issues of running the autotest on a new test image by running the test_reset_on_adapter test at the start. For a new test image, the bluetooth adapter is disabled by default. The test resets existing bluetooth data and turns on the bluetooth adapter. BUG=chromium:602461 TEST=Conduct the autotest as follows: Test advertising with single advertisement instance at a time. (cr) $ test_that --board=$BOARD $DUT_IP bluetooth_AdapterLEAdvertising.single Test advertising with multiple advertisement instances simultaneously. (cr) $ test_that --board=$BOARD $DUT_IP bluetooth_AdapterLEAdvertising.multiple Change-Id: Ie50a985ac187b6d7b2f5127679d35e383d722c74 Reviewed-on: https://chromium-review.googlesource.com/403572 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
df599e53243563d3b707085007d28db244f653e4 |
|
24-Oct-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_adapter_tests: use bluetooth_facade for generic adapter control Some of the tests in the bluetooth_adapter_tests module are not really related with HID devices. They are general tests for bluetooth adapter. To avoid confusion, we use bluetooth_facade to control the methods. BUG=chromium:602461 TEST=None Change-Id: I3f15bd0b9f5bf22284075cc4fb8567f8719b1c3a Reviewed-on: https://chromium-review.googlesource.com/403571 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Harpreet Grewal <harpreet@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
efaf035c4211b878a9e95e3b06b2eaa04899d6a0 |
|
29-Sep-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_AdapterLEAdvertising: BLE advertising intervals autotest Verify that the bluetooth adapter of a DUT could behave as a bluetooth low-energy device and advertise with correct data and parameters. Specifically, the following subtests are executed in this autotest. - test_register_advertisement - test_set_advertising_intervals - test_reset_advertising Note that testing about multi-advertisements is not included. The two control files provide two distinct advertisement data cannot be run in parallel for now. We may support multi-advertisements testing later. CQ-DEPEND=CL:390191 BUG=chromium:602461 TEST=Conduct the autotest as follows: (cr) $ test_that --board=$BOARD $DUT_IP bluetooth_AdapterLEAdvertising or (cr) $ test_that --board=$BOARD $DUT_IP bluetooth_AdapterLEAdvertising.case2 Change-Id: I7713e3c322ef74ec59ae401f9b6d67c3718c2568 Reviewed-on: https://chromium-review.googlesource.com/394578 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
a60dc151413200a1ed65a36fad5b5213fe6d42ea |
|
07-Jun-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_adpater_tests: add retry function It is observed in the field that the chameleon board might sometimes lose the serial device temporarily. The kernel would re-detect and reconnect the serial device. After the re-connection, it is possible that the serial port changes as well, e.g., from /dev/ttyUSB0 to /dev/ttyUSB1. In this case, it is required to reconnect to the new serial port in order to control the serial device correctly. It is also possible that the serial device may malfunction in an unrecoverable state. Removing and modprobing the serial drivers again cannot resolve the problem when the device falls in the state. The only way is to reboot the chameleon board. In this case, it is required to reconnect to the remote server at run time. This has been handled in a transparent way by chameleond_proxy in ChameleonConnection. BUG=chromium:610238 TEST=conduct the test with the chameleon board connected to an RN-42 kit (cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP" $DUT_IP bluetooth_AdapterPairing A user could unplug the RN-42 kit initially. This would lead to the reboot of the chameleon board. When the board is being rebooted, plug in the RN-42 kit again to the chameleon board. Observe that the test could continue smoothly after rebooting the chameleon board. Change-Id: I43aa81311fbb163bfce6790440c460b2f8426e4c Reviewed-on: https://chromium-review.googlesource.com/359478 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
276a2dd3dff274a51f5c8d84c78db7a7d3f76f65 |
|
20-Jun-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_adpater_tests: fixed a bug about CoS/CoD if device_class is None, the following exception would be raised: TypeError: unsupported operand type(s) for &: 'NoneType' and 'int' When device_class is None, the discovered class of service/class should just be None. BUG=chromium:610238 TEST=None Change-Id: I42df1d54043564efb54d8f3e59844fd13bf14220 Reviewed-on: https://chromium-review.googlesource.com/359476 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
49991fc8439a5ed0b46ec98d57f3d7304e4602c6 |
|
17-Jun-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_adpater_tests: use poll_for_condition for test_device_name Sometimes, it takes a little longer while for an adapter to resolve the device name. This patch used poll_for_condition to get the device name. The test_device_name is also postponed after the device is paired and connected. This significantly improves the test reliability. BUG=chromium:610238 TEST=conduct the test with the chameleon board connected to an RN-42 kit (cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP" $DUT_IP bluetooth_AdapterPairing Observed that there are fewer test fails about test_device_name. Change-Id: I5dbc7d35e3a8e57f19c39a72d032368b5a1eaa27 Reviewed-on: https://chromium-review.googlesource.com/359475 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
b19586678d3d1d6bc69c3850cf4126c940bde21d |
|
06-Jun-2016 |
Joseph Hwang <josephsih@chromium.org> |
Add bluetooth_AdapterPairing server side autotest Add a server side test to verify that the adapter could discover, pair/unpair, connect/disconnect a bluetooth HID device. Specifically, the following subtests are executed in this autotest. - test_reset_on_adapter - test_pairable - test_discover_device - test_stop_discovery - test_device_name - test_device_class_of_service - test_device_class_of_device - test_pairing - test_connection_by_adapter - test_disconnection_by_adapter - test_connection_by_device - test_disconnection_by_device - test_remove_pairing To run this test, a RN-42 emulation kit has to plug to the chameleon board. BUG=chromium:610238 TEST=conduct the test with the chameleon board connected to an RN-42 kit (cr) $ test_that --board=$BOARD --args "chameleon_host=$CHAMELEON_IP" $DUT_IP bluetooth_AdapterPairing Change-Id: Ie0c935690c7c342a5d4c3cfae8d8a549aa74244a Reviewed-on: https://chromium-review.googlesource.com/349931 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
41966e7dec3e8d137d31a8e5c0bb0348b26f2504 |
|
06-Jun-2016 |
Joseph Hwang <josephsih@chromium.org> |
Add more subtests into bluetooth_adpater_tests More bluetooth subtests are added into the module. In particular, these are tests about discovering, pairing/unpairing, connection/disconnection, and verifying received device properties. BUG=chromium:610238 TEST=None Change-Id: Iefeaf371e6ad5890a6bdb53148d506ae96829546 Reviewed-on: https://chromium-review.googlesource.com/349930 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|
6dc5eb00672c8bfa4b465cde1f31056c51a950e4 |
|
24-May-2016 |
Joseph Hwang <josephsih@chromium.org> |
bluetooth_Adapter: move all bluetooth adapter subtests to bluetooth_adpater_tests As more bluetooth_Adapter* tests would be added, it is beneficial to move all bluetooth adapter subtests to a separate module, bluetooth_adpater_tests, so that all the subtests could be reused. This refactoring also makes every bluetooth_Adapter* tests clear and simple. BUG=chromium:610238 TEST=None Change-Id: I0a8d21f286dc1f554ba286afed880d404ffe2499 Reviewed-on: https://chromium-review.googlesource.com/349896 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Tom Tam <waihong@google.com>
/external/autotest/server/cros/bluetooth/bluetooth_adpater_tests.py
|