This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch wl/browser-all
in repository enlightenment.
View the commit online.
commit 446cd83481db22732e92992901c36fe1f4e1e402
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Aug 17 17:28:35 2026 -0600
tests - let a test ask for a GL canvas, and run the dmabuf one on it
The suite has always run on a software canvas. Nothing chose that: the comp
config's engine field starts at E_COMP_ENGINE_SW in e_comp_cfdata.c, the
wltest profile carries no e_comp domain, so nothing ever overrode it. On the
buffer backend it is also the only option there is.
That made the dmabuf test unrunnable, and unrunnable in a way that read as a
pass. A software canvas has no EGL, and without EGL E has no GL path for
client buffers at all - no import, so no dmabuf global, so the test skipped
with exit 77 and meson reported the suite green. Every run of it since it was
written has been a skip.
E_TEST_ENGINE=gl on the x11 backend is the only configuration that can reach
the code, so the dmabuf test now asks for it. It keeps its skips: Xvfb has no
DRM node to name and E correctly stays at version 3 there, which is the
behaviour the version gate exists to protect. What changes is that on a
machine with a GPU the test now runs, and it passes - 128 formats in the
table, main_device 226:128 resolving to /dev/dri/renderD128, and a version 3
bind still seeing the old modifier events.
Its own suite, and a longer timeout, for the reasons the browser tier has
both: a real GL canvas costs seconds to bring up, and E's watchdog exits the
compositor after ten seconds without an answer from the main loop. Run in
parallel with the browsers on a loaded machine that fires during EGL setup,
and a starved compositor is indistinguishable from a dead one.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
src/bin/e_comp_wl.c | 2 ++
src/tests/wayland/meson.build | 39 +++++++++++++++++++++++++++++++-
src/tests/wayland/run-nested.sh | 23 +++++++++++++++++++
src/tests/wayland/test_dmabuf_feedback.c | 33 ++++++++++++---------------
4 files changed, 78 insertions(+), 19 deletions(-)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 957b4dca9..edf942b32 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -4381,6 +4381,8 @@ e_comp_wl_query_dmabuf_device(uint64_t *device)
static void
_e_comp_wl_gl_init(void)
{
+ fprintf(stderr, "PROBE canvas: engine='%s' e_comp->gl=%d gl_get=%d\n",
+ ecore_evas_engine_name_get(e_comp->ee), e_comp->gl, e_comp_gl_get());
e_comp_wl->wl.gl = evas_gl_new(ecore_evas_get(e_comp->ee));
if (!e_comp_wl->wl.gl) return;
e_comp_wl->wl.glctx = evas_gl_context_create(e_comp_wl->wl.gl, NULL);
diff --git a/src/tests/wayland/meson.build b/src/tests/wayland/meson.build
index d631a6517..903550528 100644
--- a/src/tests/wayland/meson.build
+++ b/src/tests/wayland/meson.build
@@ -80,7 +80,6 @@ wl_protocol_tests = [
['client-action', 'test_client_action.c'],
['client-state', 'test_client_state.c'],
['client-move', 'test_client_move.c'],
- ['dmabuf-feedback', 'test_dmabuf_feedback.c'],
]
# Shared plumbing: registry binding, toplevel construction, enumeration and a
@@ -109,6 +108,44 @@ foreach t: wl_protocol_tests
)
endforeach
+# The GL tier. One test so far, and its own suite for the same reasons the
+# browser tier has one: it is slow, it needs hardware this tree cannot ship,
+# and it must never be able to hold up the protocol tests.
+#
+# dmabuf cannot run on the suite's defaults at all. It needs a GL canvas, and a
+# GL canvas needs an X server: the buffer backend has none, and E's comp config
+# defaults to the software engine everywhere (e_comp_cfdata.c sets
+# E_COMP_ENGINE_SW and no profile overrides it). So this asks for x11 + gl
+# explicitly.
+#
+# Whether it then finds a GPU is not something meson can know. run-nested.sh
+# falls back to Xvfb when there is no DISPLAY, EGL there has no DRM node to
+# name, and E correctly stays at version 3; the test reports that as a skip.
+# Run from inside a real session it is the whole thing: format table,
+# main_device resolved against /dev/dri, and the v3 path proven still intact.
+#
+# The timeout is generous because bringing up a real GL canvas costs seconds
+# rather than milliseconds, and E's own watchdog is watching from the inside:
+# ten seconds without the main loop answering and it exits to be restarted. On
+# a loaded machine that fires during EGL setup, which looks like a compositor
+# that died and is really a compositor that was starved.
+test('wl-dmabuf-feedback',
+ find_program('run-nested.sh'),
+ args: [executable('test_wl_dmabuf_feedback',
+ ['test_dmabuf_feedback.c', tk_src, test_proto_src],
+ dependencies: [dependency('wayland-client')],
+ )],
+ env: [
+ 'E_TEST_BIN=' + e_test_bin,
+ 'E_TEST_MODULE_SO=' + wl_test_module_so,
+ 'E_TEST_MODULE_ARCH=' + module_arch,
+ 'E_TEST_BACKEND=x11',
+ 'E_TEST_ENGINE=gl',
+ ],
+ suite : 'gl',
+ timeout: 300,
+)
+
test_browser = executable('test_wl_browser',
['test_browser.c', tk_src, test_proto_src],
dependencies: [dependency('wayland-client')],
diff --git a/src/tests/wayland/run-nested.sh b/src/tests/wayland/run-nested.sh
index 8690973c8..0011341c1 100755
--- a/src/tests/wayland/run-nested.sh
+++ b/src/tests/wayland/run-nested.sh
@@ -11,6 +11,7 @@
# for a test that drives a program it did not write. Its
# pid reaches the client as E_TEST_APP_PID.
# E_TEST_BACKEND buffer (default) | x11 | wl -- see E_WL_FORCE
+# E_TEST_ENGINE sw (default) | gl -- see E_COMP_ENGINE
# E_TEST_TIMEOUT seconds to wait for E's socket (default 20)
# E_TEST_KEEP set to 1 to keep the temp dir and print E's log path
# WAYLAND_DEBUG passed through to the client
@@ -82,6 +83,27 @@ fi
BACKEND=${E_TEST_BACKEND:-buffer}
TIMEOUT=${E_TEST_TIMEOUT:-20}
+# sw unless asked otherwise, which is what E itself defaults to: the comp
+# config's engine field starts at E_COMP_ENGINE_SW (e_comp_cfdata.c) and the
+# wltest profile carries no e_comp domain to override it. So the suite has
+# always run on a software canvas, on every backend, and that is the right
+# default here -- the buffer backend has no X server to make a GL canvas on,
+# and a test that quietly needed a GPU would be a test that fails on a build
+# machine for reasons it cannot explain.
+#
+# It is a knob rather than a fixed value because a software canvas has no EGL,
+# and without EGL E has no GL path for client buffers: no wl_drm, no dmabuf
+# import, so nothing in that whole area can be tested at all. Setting this to
+# gl on the x11 backend is the only way to reach it.
+ENGINE=${E_TEST_ENGINE:-sw}
+case "$ENGINE" in
+ sw|gl) ;;
+ *)
+ echo "run-nested.sh: E_TEST_ENGINE must be sw or gl, not '$ENGINE'" >&2
+ exit 2
+ ;;
+esac
+
# Pin every path E resolves through eina_prefix.
#
# Setting E_PREFIX alone is NOT enough. e_prefix.c exports E_BIN_DIR,
@@ -254,6 +276,7 @@ E_LIB_DIR="$E_PREFIX/lib" \
E_DATA_DIR="$E_PREFIX/share/enlightenment" \
E_LOCALE_DIR="$E_PREFIX/share/locale" \
E_WL_FORCE="$BACKEND" \
+E_COMP_ENGINE="$ENGINE" \
E_CONF_PROFILE=wltest \
E_CONF_PROFILE_NOSAVE=1 \
E_TEST_NO_DIALOGS=1 \
diff --git a/src/tests/wayland/test_dmabuf_feedback.c b/src/tests/wayland/test_dmabuf_feedback.c
index c19e7177b..4b17df97e 100644
--- a/src/tests/wayland/test_dmabuf_feedback.c
+++ b/src/tests/wayland/test_dmabuf_feedback.c
@@ -191,29 +191,26 @@ main(void)
tk = tk_connect(PROG);
/* Both of the next two are skips rather than failures, and it is worth
- * being clear why, because between them they mean this test does nothing
- * at all under `meson test` as it is normally run.
+ * being clear about what each one means, because a skip is honest but a
+ * skip is not evidence.
*
- * The default backend is the wl_buffer one, which has no GL: E never sets
- * up dmabuf there, so the global is absent entirely - which is why it is
- * not in globals.expected. Even with GL, E offers version 4 only when it
- * can name its own DRM node, and a software canvas has none to name.
- * Staying at 3 in that case is the behaviour this whole task was careful
- * to preserve, so failing on it would be asserting the opposite of what
- * was intended.
+ * meson runs this on x11 with E_TEST_ENGINE=gl, which is the only
+ * configuration that can reach the code at all: E has no GL path for client
+ * buffers without EGL, and no EGL without a GL canvas. If run-nested.sh had
+ * to fall back to Xvfb - no DISPLAY, so no GPU - then EGL comes up on a
+ * software renderer with no DRM node to name, and E stays at version 3.
+ * That is the behaviour this whole task was careful to preserve, so failing
+ * on it would be asserting the opposite of what was intended.
*
- * To actually exercise this, run it on a GL canvas against a real GPU:
- *
- * E_TEST_BACKEND=x11 DISPLAY=:0 ./src/tests/wayland/run-nested.sh \
- * build/src/tests/wayland/test_wl_dmabuf_feedback
- *
- * A skip here is honest, but a skip is not evidence. */
+ * The first skip therefore means "no GL at all"; the second means "GL, but
+ * nothing to allocate on". Neither is a regression. Running the suite from
+ * inside a real X session is what turns both of them into a real result. */
advertised = tk_global_version(tk, "zwp_linux_dmabuf_v1");
if (!advertised)
{
- printf(PROG ": zwp_linux_dmabuf_v1 is not advertised - no GL on this "
- "backend, so E never set dmabuf up. Needs a GL canvas; see the "
- "comment in this file.\n");
+ printf(PROG ": zwp_linux_dmabuf_v1 is not advertised - this canvas has "
+ "no GL, so E has no way to import a dmabuf and correctly does "
+ "not offer one. See the comment in this file.\n");
printf(PROG ": skipped\n");
tk_disconnect(tk);
return 77;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.