New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 879758 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

[Autotest failure] Majority cros bluetooth_sanity suite tests failing starting with R70-11012.0.0 build

Project Member Reported by harpreet@chromium.org, Aug 31

Issue description

Please see the below link.


https://stainless.corp.google.com/search?view=matrix&row=test&col=build&first_date=2018-08-18&last_date=2018-08-31&suite=%5Ebluetooth%5C_sanity%24&exclude_cts=true&exclude_not_run=true&exclude_non_release=true&exclude_au=true&exclude_acts=true&exclude_retried=true&exclude_non_production=false


Few failure reasons:
Unhandled TimeoutException: retry exception (function="ready_test()"), timeout = 60s



["[--- failed: test_power_on_adapter ({'power_on': False, 'is_powered_on': False})]", '[--- failed: test_bluetoothd_running (None)]', '[--- failed: test_bluetoothd_running (None)]', "[--- failed: test_adapter_work_state ({'hci': True, 'is_powered_on': False, 'has_adapter': False})]", "[--- failed: test_power_on_adapter ({'power_on': False, 'is_powered_on': False})]", '[--- failed: test_bluetoothd_running (None)]', '[--- failed: test_bluetoothd_running (None)]']



Unhandled Fault: <Fault 1: "<type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'ResetAdvertising'">



Unhandled WebDriverException: Message: unknown error: Element <cr-toggle id="enableBluetooth" aria-label="Bluetooth enable" aria-disabled="true" aria-pressed="false" role="button" tabindex="-1" disabled="">...</cr-toggle> is not clickable at point (986, 89). Other element would receive the click: <div id="bluetoothDevices" class="settings-box two-line" actionable="">...</div>

 
Status: Started (was: Assigned)
There are two failures when running bluetooth_Sanity_LEDiscovery

Failure 1:
    FAIL: Tester could not be initialized

Failure 2: 
    'utf8' codec can't decode bytes in position 2-3: invalid continuation byte

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/722a5e7165a6ea41575df79f66dc3a6aa0766597

commit 722a5e7165a6ea41575df79f66dc3a6aa0766597
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue Oct 09 17:36:34 2018

bluetooth_Sanity_LEDiscovery: turn off secure connections for testing

It is needed to turn off the secure connections setting such that
the current settings match the profile settings for testing purpose.

BUG=chromium:879758
TEST=Conduct the test
(cros) $ test_that --args="tester=${TESTER_IP}" "$DUT_IP" bluetooth_Sanity_LEDiscovery

Confirm that there is no following error:
FAIL: Tester could not be initialized

Change-Id: I0c78321191ce7b788d51163ebb7a2b606ca07684
Reviewed-on: https://chromium-review.googlesource.com/1245541
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Qiyu Hu <qiyuh@chromium.org>

[modify] https://crrev.com/722a5e7165a6ea41575df79f66dc3a6aa0766597/client/cros/bluetooth/bluetooth_tester_xmlrpc_server.py
[modify] https://crrev.com/722a5e7165a6ea41575df79f66dc3a6aa0766597/client/common_lib/cros/bluetooth/bluetooth_socket.py

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/5d5b2284ea7ede992fbb20928d95198a06362a5e

commit 5d5b2284ea7ede992fbb20928d95198a06362a5e
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue Oct 09 17:36:35 2018

bluetooth_Sanity_LEDiscovery: use yaml for non-ascii data

Compared to json, yaml is able to serialize an object which
may contain non-ascii characters.

While the scanned device object may contain non-ascii characters,
it is more convenient to use yaml.

BUG=chromium:879758
TEST=Conduct the test
(cros) $ test_that --args="tester=${TESTER_IP}" "$DUT_IP" bluetooth_Sanity_LEDiscovery

Confirm that there is no following error:
'utf8' codec can't decode bytes in position 2-3: invalid continuation byte

Change-Id: Ib19b75fc7616785d022810e2d9430576465c3128
Reviewed-on: https://chromium-review.googlesource.com/1245542
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Qiyu Hu <qiyuh@chromium.org>

[modify] https://crrev.com/5d5b2284ea7ede992fbb20928d95198a06362a5e/server/cros/bluetooth/bluetooth_device.py
[modify] https://crrev.com/5d5b2284ea7ede992fbb20928d95198a06362a5e/client/cros/bluetooth/bluetooth_device_xmlrpc_server.py

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/680dfeaf60f12cee40c376f0c5757e3a8be3ae64

commit 680dfeaf60f12cee40c376f0c5757e3a8be3ae64
Author: Joseph Hwang <josephsih@chromium.org>
Date: Tue Oct 09 17:36:35 2018

bluetooth_Sanity_LEDiscovery: replace name with name_list

On some platforms/builds, the scanned device name may be either
a regular name or a short name. To be flexible, this simple
patch use name_list to replace name.

BUG=chromium:879758
TEST=Conduct the test
(cros) $ test_that --args "tester=${TESTER_IP}" "$DUT_IP" bluetooth_Sanity_LEDiscovery

Confirm that there is no following error:
FAIL: Tester did not have expected name "Tester" != "ChromeOS Bluetooth Tester"

Change-Id: I66a2124581b7a77e3c8666e5360e7ea0781b0e31
Reviewed-on: https://chromium-review.googlesource.com/1256585
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Reviewed-by: Qiyu Hu <qiyuh@google.com>

[modify] https://crrev.com/680dfeaf60f12cee40c376f0c5757e3a8be3ae64/server/site_tests/bluetooth_Sanity_LEDiscovery/bluetooth_Sanity_LEDiscovery.py
[modify] https://crrev.com/680dfeaf60f12cee40c376f0c5757e3a8be3ae64/server/site_tests/bluetooth_Sanity_Discovery/bluetooth_Sanity_Discovery.py

Cc: shijinabraham@chromium.org
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/ba95392e7f1d936c176ee5f518a66d5fef2ff2f6

commit ba95392e7f1d936c176ee5f518a66d5fef2ff2f6
Author: Shyh-In Hwang <josephsih@chromium.org>
Date: Fri Oct 26 19:14:50 2018

Revert "bluetooth_Sanity_LEDiscovery: use yaml for non-ascii data"

This reverts commit 5d5b2284ea7ede992fbb20928d95198a06362a5e.

Reason for revert:
This patch should be removed as it causes quite a number of autotest
failures due to the missing of yaml/dbus modules on server containers.

Original change's description:
> bluetooth_Sanity_LEDiscovery: use yaml for non-ascii data
>
> Compared to json, yaml is able to serialize an object which
> may contain non-ascii characters.
>
> While the scanned device object may contain non-ascii characters,
> it is more convenient to use yaml.
>
> BUG=chromium:879758
> TEST=Conduct the test
> (cros) $ test_that --args="tester=${TESTER_IP}" "$DUT_IP" bluetooth_Sanity_LEDiscovery
>
> Confirm that there is no following error:
> 'utf8' codec can't decode bytes in position 2-3: invalid continuation byte
>
> Change-Id: Ib19b75fc7616785d022810e2d9430576465c3128
> Reviewed-on: https://chromium-review.googlesource.com/1245542
> Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
> Tested-by: Shyh-In Hwang <josephsih@chromium.org>
> Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
> Reviewed-by: Qiyu Hu <qiyuh@chromium.org>

BUG=chromium:879758
TEST=None

Change-Id: I76d20faafe93c5a3b1e1c71a48dfe2f79c4e3916
Reviewed-on: https://chromium-review.googlesource.com/1297878
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/ba95392e7f1d936c176ee5f518a66d5fef2ff2f6/server/cros/bluetooth/bluetooth_device.py
[modify] https://crrev.com/ba95392e7f1d936c176ee5f518a66d5fef2ff2f6/client/cros/bluetooth/bluetooth_device_xmlrpc_server.py

the following bluetooth sanity tests are failing for Nami/Sona - chromeos15-row1-rack3-host6 on M72-11231.0.0

1)bluetooth_AdapterSuspendResume
2)bluetooth_AdapterLEAdvertising.single
3)bluetooth_AdapterLEAdvertising.multiple

Please check@
http://cautotest.corp.google.com/afe/#tab_id=view_host&object_id=9302
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/61167e10e49b29dbcaaac422b1c3c5f6a4171b80

commit 61167e10e49b29dbcaaac422b1c3c5f6a4171b80
Author: Joseph Hwang <josephsih@chromium.org>
Date: Fri Nov 16 13:02:00 2018

bluetooth: use pickle to replace json

When a DUT scanning devices nearby, it is possible that there
are binary values in the dbus.ByteArray in the device properties,
e.g, ServiceData and ManufacturerData. While yaml is handy to
serialize such data, yaml is unfortunately not available on some
test server containers. It is possible to install yaml at the cost
of extra size and installation time which is what we would like
to avoid. Hence, it makes sense to work around using the standard
pickle module.

Note that the xmlrpclib.Binary class is needed to handle possible
non-XML characters.

The original json module is not used for two reasons:
- The json module cannot handle arbitary binary values in
  dbus.ByteArray. A much more complicated recursive function is needed
  to handle that.
- The json module cannot handle numeric key values in a dictionary .

CQ-DEPEND=CL:1297878
BUG=chromium:879758
TEST=The following test should pass.
(cros) $ test_that --args="tester=${TESTER_IP}" "$DUT_IP"
bluetooth_Sanity_LEDiscovery

There should be no errors like this:
  'utf8' codec can't decode bytes in position 2-3: invalid continuation byte

Change-Id: I138998f381f4e8aed3d3d0a11502936f240b19f0
Reviewed-on: https://chromium-review.googlesource.com/1304453
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>

[modify] https://crrev.com/61167e10e49b29dbcaaac422b1c3c5f6a4171b80/server/cros/bluetooth/bluetooth_device.py
[modify] https://crrev.com/61167e10e49b29dbcaaac422b1c3c5f6a4171b80/client/cros/bluetooth/bluetooth_device_xmlrpc_server.py

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/9f759f8e3e397a0c5b273b5daf9003cd0f3ebf74

commit 9f759f8e3e397a0c5b273b5daf9003cd0f3ebf74
Author: Shyh-In Hwang <josephsih@chromium.org>
Date: Wed Nov 21 13:53:03 2018

Revert "bluetooth: use pickle to replace json"

This reverts commit 61167e10e49b29dbcaaac422b1c3c5f6a4171b80.

Reason for revert:

Pickle is included in python's standard library. Using it should be no problem. Unfortunately, there was some issue in the python package dependency. Pickle uses dbus. But dbus was not in server containers. Before this dependency problem is resolved, let's revert this patch for now as it is breaking all bluetooth tests.

Original change's description:
> bluetooth: use pickle to replace json
>
> When a DUT scanning devices nearby, it is possible that there
> are binary values in the dbus.ByteArray in the device properties,
> e.g, ServiceData and ManufacturerData. While yaml is handy to
> serialize such data, yaml is unfortunately not available on some
> test server containers. It is possible to install yaml at the cost
> of extra size and installation time which is what we would like
> to avoid. Hence, it makes sense to work around using the standard
> pickle module.
>
> Note that the xmlrpclib.Binary class is needed to handle possible
> non-XML characters.
>
> The original json module is not used for two reasons:
> - The json module cannot handle arbitary binary values in
>   dbus.ByteArray. A much more complicated recursive function is needed
>   to handle that.
> - The json module cannot handle numeric key values in a dictionary .
>
> CQ-DEPEND=CL:1297878
> BUG=chromium:879758
> TEST=The following test should pass.
> (cros) $ test_that --args="tester=${TESTER_IP}" "$DUT_IP"
> bluetooth_Sanity_LEDiscovery
>
> There should be no errors like this:
>   'utf8' codec can't decode bytes in position 2-3: invalid continuation byte
>
> Change-Id: I138998f381f4e8aed3d3d0a11502936f240b19f0
> Reviewed-on: https://chromium-review.googlesource.com/1304453
> Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
> Tested-by: Shyh-In Hwang <josephsih@chromium.org>
> Reviewed-by: Wai-Hong Tam <waihong@google.com>

Bug: chromium:879758
Change-Id: Ie0524023763840037917ba7cd17eb49e0d9675ae
Reviewed-on: https://chromium-review.googlesource.com/1341808
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Harpreet Grewal <harpreet@chromium.org>

[modify] https://crrev.com/9f759f8e3e397a0c5b273b5daf9003cd0f3ebf74/server/cros/bluetooth/bluetooth_device.py
[modify] https://crrev.com/9f759f8e3e397a0c5b273b5daf9003cd0f3ebf74/client/cros/bluetooth/bluetooth_device_xmlrpc_server.py

Sign in to add a comment