On Fri, Aug 07, 2020 at 05:27:54PM +0000, Stephen Lawrence wrote:
-----Original Message----- From: Stephen Lawrence Sent: 05 August 2020 20:22 To: Antonio Terceiro antonio.terceiro@linaro.org Cc: lava-users@lists.lavasoftware.org Subject: RE: [Lava-users] fastboot in docker support
[snip]
I simplified the test case to a simple boot and 'test with docker' job that is just sending some fastboot commands to check comms. It reboots into the bootloader and then sends a set-active command so it will wait if the device is not available: https://lava.genivi.org/scheduler/job/1154/definition
Submitting the job the fastboot device is successfully found and passed into the test docker as dev /001/074/: https://lava.genivi.org/scheduler/job/1154#L190
We have DUT comms and can reboot the board: https://lava.genivi.org/scheduler/job/1154#L232
However when we then do the fastboot set-active it waits: https://lava.genivi.org/scheduler/job/1154#L238
On the worker I can see that lsusb reports a Google device at /001/075. So the DUT appears to have successfully rebooted into fastboot. All be it with a different device number. If I connect to the device I can break into u-boot.
So it appears LAVA has not re-hooked the device on reboot. In your description you mention dev numbers changing so I assume that is in the design.
Do you have any suggestions as to what might be wrong or how I could debug this further?
Worker is running LAVA at the point of your 1268 PR on Debian stretch. lava-dispatcher-host is installed.
Just to simplify further and eliminate the possibility that the recent PR didn't have all the code I retested using the latest code. LAVA master branch HEAD~3 (sha a2bd1a87). I got the same results, with fastboot on the host not finding the device after reboot: https://lava.genivi.org/scheduler/job/1166
Hi,
I could reproduce your issue with a job like this (I reboot from adb first because $reasons):
run: steps: - adb devices - adb reboot-bootloader - fastboot devices - fastboot reboot-bootloader - fastboot devices
This seems to be a timing issue. When I add a sleep between `fastboot reboot-bootloader` and the following `fastboot devices`, it works:
2020-08-10T20:04:22 + fastboot reboot-bootloader 2020-08-10T20:04:22 < waiting for 69E78A7B00325ACE > 2020-08-10T20:04:27 Sharing /dev/bus/usb/001/083 with docker container lava-docker-test-shell-380-3.3 2020-08-10T20:04:27 rebooting into bootloader... 2020-08-10T20:04:27 OKAY [ 0.001s] 2020-08-10T20:04:30 finished. total time: 3.011s 2020-08-10T20:04:30 + sleep 10s 2020-08-10T20:04:30 Sharing /dev/bus/usb/001/084 with docker container lava-docker-test-shell-380-3.3 2020-08-10T20:04:40 + fastboot devices 2020-08-10T20:04:40 69E78A7B00325ACE fastboot
of course sleeping is a lazy hack and not a real solution, the point is: when LAVA itself triggers reboots/resets, it usually also handles the waiting for you, but when you do it yourself, you need to do it yourself.