From 88c347ee00236abe8fc38c5e5160e307ba502497 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 20 Feb 2024 15:03:47 +0100 Subject: [PATCH] usb_hid_reconnect.run: use distinct device-ids Newer Qemu variants quit with an error about already existing devices if the same device-id is add and removed in a loop fast. To circumvent this strange behaviour, simply use consecutive device id numbers. Ref genodelabs/genode#5021 --- repos/dde_linux/run/usb_hid_reconnect.run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/dde_linux/run/usb_hid_reconnect.run b/repos/dde_linux/run/usb_hid_reconnect.run index 84b024a409..a2350570d4 100644 --- a/repos/dde_linux/run/usb_hid_reconnect.run +++ b/repos/dde_linux/run/usb_hid_reconnect.run @@ -149,13 +149,13 @@ run_genode_until {(qemu)} 20 $spawn_id for {set i 0} {$i < 50} {incr i} { # connect keyboard - send "device_add usb-kbd,id=ukb1\n" + send "device_add usb-kbd,id=ukb$i\n" # wait for keyboard run_genode_until {.*USB HID.*Keyboard.*\n} 10 $spawn_id # disconnect keyboard - send "device_del ukb1\n" + send "device_del ukb$i\n" # wait for disconnect run_genode_until {.*USB disconnect.*\n} 10 $spawn_id