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

Issue 780367 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

bluetooth: check chameleon host if a test requires chameleon

Project Member Reported by josephsih@chromium.org, Nov 1 2017

Issue description

It is more user friendly to raise a test error in the beginning of a
test when the chameleon_host argument is not specified in a test
that requires the specification of the chameleon host. When the
argument is not specified, currently, it would emit a message as follows
which is confusing.

    tko parser:   'MOUSE': lambda host:
                  host.chameleon.get_bluetooth_hid_mouse,
    tko parser:   AttributeError: 'NoneType' object has no attribute
                  'get_bluetooth_hid_mouse'

Instead, it would be clearer to emit an error message as follows if the
argument is omitted.

    [  FAILED  ]    ERROR: Have to specify chameleon_host IP.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 5 2017

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

commit 39202fe0883fcd1d17b56ce38ce77f26c51dc55c
Author: Joseph Hwang <josephsih@chromium.org>
Date: Sun Nov 05 04:49:15 2017

bluetooth: skip rebooting chameleon

Sometimes, the chameleon host would automatically reboot when a
test failed multiple times with an attempt to fix issues caused
by unsuccessful detection of bluetooth peripherals. These kind
of issues are usually related with hardware.

However, such reboot consumes much test time and would bring
more troubles especially when it occurs in the middle of a
bluetooth pairing or connection. All states would be lost.
The consequence is that the following tests would definitely fail
due to the lost states.

Let's disable the reboot for the time being until we have a
better way to fix the lost states issue.

BUG= chromium:780367 
TEST=Observe that the chameleon host does not reboot even when
tests failed multiple times.

Change-Id: If35a83ca5d1300ad099e1ad613b0ae0e28a89127
Reviewed-on: https://chromium-review.googlesource.com/752786
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/39202fe0883fcd1d17b56ce38ce77f26c51dc55c/server/cros/bluetooth/bluetooth_adapter_tests.py

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/52bf8b0e1378d5dd196323f1c21457645fade6fa

commit 52bf8b0e1378d5dd196323f1c21457645fade6fa
Author: Joseph Hwang <josephsih@chromium.org>
Date: Wed Nov 08 11:12:27 2017

usb_audio_flow: determine usb host mode with serial driver

An additional method is supported to determine if the chameleon
should boot in the usb host mode.

Originally, if the file /etc/default/.usb_host_mode exists, the
chameleon would boot in the usb host mode by not entering into
the usb device mode.

In this patch, if there is a tty device, e.g., /dev/ttyUSB*, which
is found with the specified serial driver, ftdi_sio, the chameleon
would stay in the usb host mode no matter whether
/etc/default/.usb_host_mode exists or not.

Note that the usb host mode is required in order to run bluetooth
autotests that require bluetooth peripherals.

BUG= chromium:780367 
TEST=Conduct the following tests

On Chameleon board, remove the following file.
$ rm /etc/default/.usb_host_mode

Reboot chameleon board.
Run a bluetooth autotest that requires RN-42. It should pass.
(cr) $ test_that --args "chameleon_host=$CHAMELEON_IP" $DUT_IP \
       bluetooth_AdapterPairing.mouse

Change-Id: I5ea8a252884c09a752a742dfe58290be6b46987f
Reviewed-on: https://chromium-review.googlesource.com/752603
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/52bf8b0e1378d5dd196323f1c21457645fade6fa/chameleond/devices/usb_audio_flow.py

Status: Fixed (was: Started)
Cc: josephsih@chromium.org waihong@chromium.org
 Issue 765825  has been merged into this issue.

Sign in to add a comment