test/py: dfu: wait for USB device to go away at boot
PATCH 1/1 test/py: dfu: wait for USB device to go away at boot
From: Stephen Warren <[email protected]>
It can take a while for a host machine to notice that a USB device has disconnected, and process the change. At the end of the DFU test, we wait up to 10 seconds for this to happen. This change makes the test wait the same (up to) 10 seconds at the start of the test for any previously active USB device-mode session to be cleaned up. Such as session might have been used to download U-Boot into memory for example; this is certainly true on my Tegra test systems. This changes should solve the DFU test intermittency issues I've been seeing on some Tegra devices.
--- test/py/tests/test_dfu.py | 2 ++ 1 file changed, 2 insertions(+)
test/py/tests/test_dfu.py +2 -0
@@ -136,6 +136,8 @@ def test_dfu(u_boot_console, env__usb_dev_port, env__dfu_config): Nothing. """ + u_boot_utils.wait_until_file_open_fails( + env__usb_dev_port['host_usb_dev_node'], True) fh = u_boot_utils.attempt_to_open_file( env__usb_dev_port['host_usb_dev_node']) if fh:
Signature · 1 line
2.8.2
PATCH 1/1 test/py: dfu: wait for USB device to go away at boot
Quoted 11 lines · Stephen Warren
From: Stephen Warren <[email protected]>
It can take a while for a host machine to notice that a USB device has disconnected, and process the change. At the end of the DFU test, we wait up to 10 seconds for this to happen. This change makes the test wait the same (up to) 10 seconds at the start of the test for any previously active USB device-mode session to be cleaned up. Such as session might have been used to download U-Boot into memory for example; this is certainly true on my Tegra test systems. This changes should solve the DFU test intermittency issues I've been seeing on some Tegra devices.
Quoted 1 line
Signed-off-by Stephen Warren <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160506/6dbab0f1/attachment.sig>