NEW264458
[WPE] WPEQt API tests require /dev/dri GPU devices to run
https://bugs.webkit.org/show_bug.cgi?id=264458
Summary [WPE] WPEQt API tests require /dev/dri GPU devices to run
Carlos Alberto Lopez Perez
Reported 2023-11-08 17:12:09 PST
The WPEQt API tests don't work on a machine without GPU. The EWS WPE API test bots run on containers without GPU. That means this machines don't have /dev/dri/* devices. We are having an issue where the WPEQt tests work fine on the WPE Release test bot (post-commit) but not on the EWS API test bots. The first machine has a GPU with /dev/dri available but the second ones don't. I have tried to create a virtual Weston session with: weston --use-gl -B headless-backend.so And then run the test inside the weston session created but it doesn't make any difference. Checking the strace output I can see how it always try to access /dev/dri/ devices I also can reproduce the problem on the release test bot or any other machine with a GPU by applying this patch diff --git a/Tools/flatpak/flatpakutils.py b/Tools/flatpak/flatpakutils.py index 4b24bc9cd686..2557629cf42e 100644 --- a/Tools/flatpak/flatpakutils.py +++ b/Tools/flatpak/flatpakutils.py @@ -856,8 +856,6 @@ class WebkitFlatpak: if not building: flatpak_command.extend([ - "--device=all", - "--device=dri", "--share=ipc", "--share=network", "--socket=pulseaudio", So the /dev/dri devices are not available inside flatpak. Another way of reproducing the issue is changing the permissions on /dev/dri so your user can't access it. I also tried to use different QT QPA plugins other than wayland but no one of them works. [📦🌐🐱 org.webkit.Sdk WPE@Release build]$ QT_QPA_PLATFORM=offscreen QML2_IMPORT_PATH=$(pwd)/WebKitBuild/WPE/Release/lib/qt5/qml WebKitBuild/WPE/Release/bin/TestWebKitAPI/WPEQt/TestLoad ********* Start testing of TestLoad ********* Config: Using QtTest library 5.15.3, Qt 5.15.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 12.2.0), org.webkit.Platform 269034@main PASS : TestLoad::initTestCase() QFATAL : TestLoad::run() Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile) FAIL! : TestLoad::run() Received a fatal error. Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 1ms ********* Finished testing of TestLoad ********* Aborted
Attachments
Carlos Alberto Lopez Perez
Comment 1 2023-11-08 17:55:20 PST
I tried all possible Qt plugins via QT_QPA_PLATFORM env var and none of them work when /dev/dri is not available. I even tried the xcb (x11) plugin from my system by building WPE without flatpak (against my system) and running it inside Xvfb and the issue is reproducible as well if there is no /dev/dri available.
Carlos Alberto Lopez Perez
Comment 2 2023-11-08 18:30:15 PST
I just opened bug 264460 to skip this Qt tests when the system has no GPU
Note You need to log in before you can comment on or make changes to this bug.