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

Titouan Christophe via buildroot <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/772bf9f87356d2619e66c97936cc60e8bae18de3
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/2026.05.x

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]>
(cherry picked from commit 933a591d8a4a5423fb0dfae0937faa7eff0c1b00)
Signed-off-by: Titouan Christophe <[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.