From 772bf9f87356d2619e66c97936cc60e8bae18de3 Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Sun, 21 Jun 2026 18:53:36 +0200 Subject: [PATCH] support/testing: usbip: wait for the keyboard be detected 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 Signed-off-by: Julien Olivain (cherry picked from commit 933a591d8a4a5423fb0dfae0937faa7eff0c1b00) Signed-off-by: Titouan Christophe --- 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")