[Buildroot] [git commit] support/testing: usbip: wait for the keyboard be detected

Julien Olivain via buildroot <[email protected]> Sun, 2 Aug 2026 22:04:18 +0200
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/933a591d8a4a5423fb0dfae0937faa7eff0c1b00
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master

Running TestUsbIp may fail when checking if two QEMU USB Keyboards are
reported by lsusb. On fast host, the second QEMU USB keyboard may not
aleady detected when lsusb is executed. So wait a bit, to let the new
keyboard be detected.

Signed-off-by: Romain Naour <[email protected]>
Signed-off-by: Julien Olivain <[email protected]>
---
 support/testing/tests/package/test_usbip.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/support/testing/tests/package/test_usbip.py b/support/testing/tests/package/test_usbip.py
index 2fae8f7f6a..62c7b59814 100644
--- a/support/testing/tests/package/test_usbip.py
+++ b/support/testing/tests/package/test_usbip.py
@@ -1,4 +1,5 @@
 import os
+import time
 
 import infra.basetest
 
@@ -91,6 +92,9 @@ class TestUsbIp(infra.basetest.BRTest):
         # keyboard.
         self.assertRunOk("usbip attach --remote=127.0.0.1 --busid=1-1")
 
+        # Wait a bit, to let the new keyboard be detected.
+        time.sleep(1)
+
         # We check "lsusb" now sees exactly two QEMU USB Keyboards
         # (the original one, and a second one created by usbip).
         out, ret = self.emulator.run("lsusb")
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot