New issue
Advanced search Search tips

Issue 923403 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

tast.ui.KeyboardShortcutViewerPainting fails with "didn't find keyboard device"

Project Member Reported by xiy...@chromium.org, Jan 18 (4 days ago)

Issue description

Examples:
https://stainless.corp.google.com/browse/chromeos-autotest-results/277846318-chromeos-test/

I am wondering how reliable is the keyboard detection. Last time I saw it happening on veyron-minnie. it is because isKeyboard in device.go somehow returns false. It is checking "1, Q, and Space" key must be present [1]. However, in input_playback.py where the logic is migrated, it checks that any of these key exist. So maybe we should change from "AND" to "OR" ?

[1] https://cs.corp.google.com/chromeos_public/src/platform/tast-tests/src/chromiumos/tast/local/input/device.go?rcl=c9894d03d0890612db708e368c09fc9b3a6f642a&l=62

[2] https://cs.corp.google.com/chromeos_public/src/third_party/autotest/files/client/cros/input_playback/input_playback.py?rcl=33812266cd2e2559ba38d953cbab7a1f0cc38349&l=233

Log snippet:
====
...
2019/01/17 07:52:06 [07:52:06.775] Invoking KSV via accelerator
2019/01/17 07:52:06 [07:52:06.776] Error at keyboard_shortcut_viewer_painting.go:46: Failed to open keyboard device: didn't find keyboard device
2019/01/17 07:52:06 [07:52:06.776] Stack trace:
Failed to open keyboard device
	at chromiumos/tast/local/bundles/cros/ui.KeyboardShortcutViewerPainting (keyboard_shortcut_viewer_painting.go:46)
	at chromiumos/tast/testing.(*Test).Run.func4 (test.go:228)
	at chromiumos/tast/testing.runStages.func1.1 (stage.go:39)
	at chromiumos/tast/testing.runAndRecover.func1 (stage.go:69)
	at runtime.goexit (asm_amd64.s:1333)
didn't find keyboard device
	at chromiumos/tast/local/input.Keyboard (keyboard.go:38)
	at chromiumos/tast/local/bundles/cros/ui.KeyboardShortcutViewerPainting (keyboard_shortcut_viewer_painting.go:44)
	at chromiumos/tast/testing.(*Test).Run.func4 (test.go:228)
	at chromiumos/tast/testing.runStages.func1.1 (stage.go:39)
	at chromiumos/tast/testing.runAndRecover.func1 (stage.go:69)
	at runtime.goexit (asm_amd64.s:1333)
2019/01/17 07:52:06 Completed test ui.KeyboardShortcutViewerPainting in 7.581s with 1 error(s)
 

Comment 1 by derat@chromium.org, Jan 18 (4 days ago)

It seems like we'd want any real keyboard to have all of those keys, not just one of them.

veyron-minnie is a convertible device, I believe. I wonder if this device might've been in tablet mode when the test ran. If so, issue 915965 might help here. If it's easy for you to test (e.g. using a different convertible device that's in tablet mode), does https://crrev.com/c/1407138 help? (As discussed there, you may need to add a short sleep statement after the keyboard is created.)

Sign in to add a comment