WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
279016
[GTK4] Gamepad tests are timing out when run with run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=279016
Summary
[GTK4] Gamepad tests are timing out when run with run-webkit-tests
Claudio Saavedra
Reported
2024-09-02 05:47:28 PDT
It seems that the permissions from the flatpak sandbox are not enough for the gamepad tests to work, so they are timing out in GTK4. I am going to skip them for now. Extending a bit on the reasons: I am not entirely sure but it might be lack of input device access. Reading the flatpak documentation, it's mentioned that from 1.15.6, one can use 'input' to request input device acess, but that's a very recent version (
https://docs.flatpak.org/en/latest/sandbox-permissions.html#device-access
). I am not sure how that should be handled in older versions.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2024-09-02 07:38:09 PDT
Yes, Georges determined in
https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1428
that we should use --device=input and that it's not a sandbox escape.
Philippe Normand
Comment 2
2024-09-02 09:10:16 PDT
Aren't these tests supposed to rely on some gamepad fake/mock infra? I guess we're not plugging a real gamepad to each and every test bot :)
Claudio Saavedra
Comment 3
2024-09-02 23:29:47 PDT
(In reply to Philippe Normand from
comment #2
)
> Aren't these tests supposed to rely on some gamepad fake/mock infra? > > I guess we're not plugging a real gamepad to each and every test bot :)
I'm really not familiar with this area. But here is what I found out: if you run the tests directly with WebKitTestRunner (webkit-flatpak --gtk -c WebKitTestRunner gamepad/....) the tests run correctly and pass. If you use run-webkit-tests, they time out. First difference between these scripts I noticed is that run-webkit-tests runs sandboxed, whereas webkit-flatpak doesn't seem to. So maybe you're right and it's not input related, but something in the sandbox is preventing the tests from running.
Philippe Normand
Comment 4
2024-09-03 02:54:10 PDT
This has nothing to do with the sandbox. The issue is that UIGamepadProvider::platformWebPageProxyForGamepadInput() returns nullptr when invoked from run-webkit-tests because the gtk_window_is_active(window) call there returns false. This is a bug in the GTK4 ifdefs of that code.
Claudio Saavedra
Comment 5
2024-09-03 04:03:33 PDT
Thanks for debugging this, Phil! It seems that the problem is that there's no direct replacement for gtk_window_has_toplevel_focus(). gtk_window_is_active() is not equivalent because the window is not visible while the tests run? I am not so familiar with this, and a quick test with gtk_window_get_focus() and gtk_widget_has_focus() didn't really solve the issue, so I defer to other people who might know GTK better.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug