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

Issue 708915 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: 14
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 708904



Sign in to add a comment

Fix problems of flaky bluetooth_AdapterXXXX tests

Project Member Reported by josephsih@chromium.org, Apr 6 2017

Issue description

Some of the bluetooth_AdapterXXXX tests are flaky. Fix the flakes.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 15 2017

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

commit 3b03cd240d9df5898c1995d086705121c3a5dfa2
Author: Joseph Hwang <josephsih@chromium.org>
Date: Sat Apr 15 13:22:32 2017

bluetooth: use inspect to get method name

Use method_name() to get the method name where it is invoked.

BUG=chromium:708915
TEST=None
CQ-DEPEND=CL:473467

Change-Id: I220704115c4e31a70ea97cef3ff275bb5f3dd81a
Reviewed-on: https://chromium-review.googlesource.com/469411
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/3b03cd240d9df5898c1995d086705121c3a5dfa2/server/cros/bluetooth/bluetooth_adapter_tests.py

Project Member

Comment 2 by bugdroid1@chromium.org, Apr 15 2017

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

commit 61cc8b2a0998793825183fcb96c7573c341fa00c
Author: Joseph Hwang <josephsih@chromium.org>
Date: Sat Apr 15 13:22:33 2017

bluetooth_adapter_tests: wait for condition

Some bluetooth adapter tests need to issue commands and then to
query the adapter properties to see the result. We previous simply
wait for a certain period of time before querying the properties.
This turns out to be rather flaky as different platforms may take
different lengths of time to complete the commands.

In this patch, we add a _wait_for_condition() method to wait for
a function to become true with a specified timeout. The function
would be executed repeated with the specified sleep_interval until
its returned value becomes true or until the timeout expires. This
makes those methods become very reliable.

BUG=chromium:708915
TEST=None. Will be tested in next patch.

Change-Id: If2de9c7dc3ae4186994987230d36ca31eba77021
Reviewed-on: https://chromium-review.googlesource.com/469412
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/61cc8b2a0998793825183fcb96c7573c341fa00c/server/cros/bluetooth/bluetooth_adapter_tests.py

Project Member

Comment 3 by bugdroid1@chromium.org, Apr 15 2017

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

commit 206ccdc3d63dd8e15d9fb19f241bafe5cd01edaa
Author: Joseph Hwang <josephsih@chromium.org>
Date: Sat Apr 15 13:22:33 2017

bluetooth_AdapterStandalone: add a control file for stress test

Add a control file for stress testing 100 times. This stress test
would be good for qualifying a bluetooth controller firmware.

BUG=chromium:708915
TEST=Run the test as
(cr) $ test_that ${CHROMEBOOK_IP} bluetooth_AdapterStandalone.stress

Change-Id: I23eaa32f10af081a3f7cd5f96f46d924d5397d67
Reviewed-on: https://chromium-review.googlesource.com/469413
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Ruchi Jahagirdar <rjahagir@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/206ccdc3d63dd8e15d9fb19f241bafe5cd01edaa/server/site_tests/bluetooth_AdapterStandalone/bluetooth_AdapterStandalone.py
[add] https://crrev.com/206ccdc3d63dd8e15d9fb19f241bafe5cd01edaa/server/site_tests/bluetooth_AdapterStandalone/control.stress

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 22 2017

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

commit 112b05291d5c5f24c68f586c7828b00aaf19f320
Author: Ruchi Jahagirdar <rjahagir@google.com>
Date: Sat Apr 22 04:57:35 2017

[Bluetooth] Add more BT single advertising tests

Adding more single advertisement test cases to
bluetooth_AdapterLEAdvertising.py

BUG=chromium:708915
TEST= Run the test as
$ test_that ${CHROMEBOOK_IP} bluetooth_AdapterLEAdvertising.single

Change-Id: I14f88fc2314b815f256c95d65bbea4f4131a687d
Reviewed-on: https://chromium-review.googlesource.com/477437
Commit-Ready: Ruchi Jahagirdar <rjahagir@chromium.org>
Tested-by: Ruchi Jahagirdar <rjahagir@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/112b05291d5c5f24c68f586c7828b00aaf19f320/server/site_tests/bluetooth_AdapterLEAdvertising/control.single
[modify] https://crrev.com/112b05291d5c5f24c68f586c7828b00aaf19f320/server/site_tests/bluetooth_AdapterLEAdvertising/bluetooth_AdapterLEAdvertising.py

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 15 2017

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

commit 1e9b4cc7f7d8869a26373706129f0a6ab4814b36
Author: Joseph Hwang <josephsih@chromium.org>
Date: Sat Jul 15 17:03:22 2017

bluetooth: fix adapter reset method

In the beginning of every autotest, we need to reset the adapter
to make sure that it is in an initially clean state. Instead of
restarting the bluetoothd, it is better to remove device objects
through dbus methods. Otherwise, the unhappy chrome browser may
disable the bluetooth adapter in a random manner.

BUG=chromium:708915
TEST=Run the test
(cr) $ test_that --args "chameleon_host=${CHAMELEON_IP}"
       ${CHROMEBOOK_IP} bluetooth_AdapterPairing.mouse

Change-Id: Ic0ec1f5626b2e33ea46dfbc7125168f3d7da0d5f
Reviewed-on: https://chromium-review.googlesource.com/571250
Commit-Ready: Ruchi Jahagirdar <rjahagir@chromium.org>
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Ruchi Jahagirdar <rjahagir@chromium.org>

[modify] https://crrev.com/1e9b4cc7f7d8869a26373706129f0a6ab4814b36/client/cros/bluetooth/bluetooth_device_xmlrpc_server.py

Not sure if this counts as flakiness since failures seem pretty consistent..

bluetooth_AdapterLEAdvertising has been failing consistently on daisy boards, peach_pit, mccloud, monroe, link, butterfly, leon, and wolf. 

Screenshot here: https://screenshot.googleplex.com/1SObxBOptWf

Let me know if we should create a separate bug for this. 

Sign in to add a comment