From e5c0d5247e59dde061c5cd2fa10b74cdf2549600 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 30 Jul 2024 16:52:49 +0200 Subject: [PATCH] simplify interactive USB HID test metric To circumvent recurring false-positives whenever things in the USB drivers or its environment changes, limit the checks to the event listener itself. --- repos/dde_linux/run/usb_hid_raw.run | 31 ++---------------- repos/ports/run/vbox5_genode_usb_hid_raw.run | 34 ++------------------ 2 files changed, 5 insertions(+), 60 deletions(-) diff --git a/repos/dde_linux/run/usb_hid_raw.run b/repos/dde_linux/run/usb_hid_raw.run index e74cd0a685..71e874820a 100644 --- a/repos/dde_linux/run/usb_hid_raw.run +++ b/repos/dde_linux/run/usb_hid_raw.run @@ -206,28 +206,10 @@ if { [have_include "power_on/qemu"] || ![get_cmd_switch --autopilot] } { run_gen # autopilot test -run_genode_until {\[init -\> event_dump\] Input event #0\t} 60 - -# remove everything before the first interesting line -regexp {(\[init -\> event_dump\] Input event #0\t.*)} $output all output - -run_genode_until {\[init -\> event_dump\] Input event #11.*\n} 40 [output_spawn_id] +run_genode_until {\[init -\> event_dump\] Input event #11.*\n} 100 # pay only attention to the output of init and its children -grep_output {^\[init } - -# filter out KVM switch messages during the nightly test -unify_output {(?n).*0557:2213.*} "" - -unify_output {(?n) on usb-usbbus.*$} "" -unify_output {(?n) at usb-usbbus.*\)} ")" -unify_output {(?n)hid-generic.*input:} "hid-generic: input:" -unify_output {(?n)usb-[0-9]-[0-9]: USB disconnect, device number [0-9]} "usb-X-X: USB disconnect, device number X" -unify_output {(?n)input[0-9]} "inputX" -unify_output {(?n) as /devices/.*} "" -unify_output {(?n)^\[init -\> usb -\>.*} "" -unify_output {(?n)^\[init -\> usb_hid\] Connected device: inputX \(ATEN CS1764A V1.1.110\).*} "" -trim_lines +grep_output {^\[init -\> event_dump\]} compare_output_to { [init -> event_dump] Input event #0 PRESS KEY_X 65534 key count: 1 @@ -235,15 +217,6 @@ compare_output_to { [init -> event_dump] Input event #2 REL_MOTION -1+1 key count: 0 [init -> event_dump] Input event #3 PRESS BTN_LEFT 65534 key count: 1 [init -> event_dump] Input event #4 RELEASE BTN_LEFT key count: 0 -[init -> usb_hid] usb usb-X-X: USB disconnect, device number X -[init -> usb_hid] Disconnected device: inputX -[init -> usb_hid] Disconnected device: inputX -[init -> usb_hid] input: Dean Camera LUFA Mouse and Keyboard Demo -[init -> usb_hid] Connected device: inputX (Dean Camera LUFA Mouse and Keyboard Demo) -[init -> usb_hid] hid-generic: input: USB HID v1.11 Keyboard [Dean Camera LUFA Mouse and Keyboard Demo] -[init -> usb_hid] input: Dean Camera LUFA Mouse and Keyboard Demo -[init -> usb_hid] Connected device: inputX (Dean Camera LUFA Mouse and Keyboard Demo) MOUSE -[init -> usb_hid] hid-generic: input: USB HID v1.11 Mouse [Dean Camera LUFA Mouse and Keyboard Demo] [init -> event_dump] Input event #5 PRESS KEY_X 65534 key count: 1 [init -> event_dump] Input event #6 RELEASE KEY_X key count: 0 [init -> event_dump] Input event #7 REL_MOTION -1+1 key count: 0 diff --git a/repos/ports/run/vbox5_genode_usb_hid_raw.run b/repos/ports/run/vbox5_genode_usb_hid_raw.run index 04d702f298..113fd93ab7 100644 --- a/repos/ports/run/vbox5_genode_usb_hid_raw.run +++ b/repos/ports/run/vbox5_genode_usb_hid_raw.run @@ -217,29 +217,10 @@ if { ![get_cmd_switch --autopilot] } { run_genode_until forever } # autopilot test -run_genode_until {\[init -\> log_terminal\] \[init -\> event_dump\] Input event #0\t} 90 +run_genode_until {\[init -\> log_terminal\] \[init -\> event_dump\] Input event #11\t} 150 -# remove everything before the first interesting line -regexp {(\[init -\> log_terminal\] \[init -\> event_dump\] Input event #0\t.*)} $output all output - -run_genode_until {.*\[init -\> event_dump\] Input event #11.*\n} 60 [output_spawn_id] - -# pay only attention to the output of init and its children -grep_output {^\[init } - -unify_output {(?n)^\[init -\> log_terminal\] \[init -\> usb_hid\] usb usb-[0-9]-[0-9]: input irq status -19 received} "" -unify_output {(?n) on usb-usbbus.*$} "" -unify_output {(?n) at usb-usbbus.*\)} ")" -unify_output {(?n)hid-generic.*input:} "hid-generic: input:" -unify_output {(?n)usb-[0-9]-[0-9]: USB disconnect, device number [0-9]} "usb-X-X: USB disconnect, device number X" -unify_output {(?n)device number [0-9]+} "device number X" -unify_output {(?n)input[0-9]} "inputX" -unify_output {(?n) as /devices/.*} "" -unify_output {(?n)^\[init -\> usb.*} "" -unify_output {(?n)^\[init -\> log_terminal\] \[init -\> usb.*} "" -unify_output {(?n)^.*dangling allocation.*$} "" -unify_output {(?n)^.*usbfs: process .* did not claim interface.*$} "" -trim_lines +# pay only attention to the output of event_dump +grep_output {^\[init -\> log_terminal\] \[init -\> event_dump\]} compare_output_to { [init -> log_terminal] [init -> event_dump] Input event #0 PRESS KEY_X 65534 key count: 1 @@ -247,15 +228,6 @@ compare_output_to { [init -> log_terminal] [init -> event_dump] Input event #2 REL_MOTION -1+1 key count: 0 [init -> log_terminal] [init -> event_dump] Input event #3 PRESS BTN_LEFT 65534 key count: 1 [init -> log_terminal] [init -> event_dump] Input event #4 RELEASE BTN_LEFT key count: 0 -[init -> log_terminal] [init -> usb_hid] usb usb-X-X: USB disconnect, device number X -[init -> log_terminal] [init -> usb_hid] Disconnected device: inputX -[init -> log_terminal] [init -> usb_hid] Disconnected device: inputX -[init -> log_terminal] [init -> usb_hid] input: Dean Camera LUFA Mouse and Keyboard Demo -[init -> log_terminal] [init -> usb_hid] Connected device: inputX (Dean Camera LUFA Mouse and Keyboard Demo) -[init -> log_terminal] [init -> usb_hid] hid-generic: input: USB HID v1.11 Keyboard [Dean Camera LUFA Mouse and Keyboard Demo] -[init -> log_terminal] [init -> usb_hid] input: Dean Camera LUFA Mouse and Keyboard Demo -[init -> log_terminal] [init -> usb_hid] Connected device: inputX (Dean Camera LUFA Mouse and Keyboard Demo) MOUSE -[init -> log_terminal] [init -> usb_hid] hid-generic: input: USB HID v1.11 Mouse [Dean Camera LUFA Mouse and Keyboard Demo] [init -> log_terminal] [init -> event_dump] Input event #5 PRESS KEY_X 65534 key count: 1 [init -> log_terminal] [init -> event_dump] Input event #6 RELEASE KEY_X key count: 0 [init -> log_terminal] [init -> event_dump] Input event #7 REL_MOTION -1+1 key count: 0