From 722e464bffdcfc7c4beb00e0995c105bc431d0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Fri, 22 Sep 2023 15:58:20 +0200 Subject: [PATCH] test: Xwayland doesn't start when another X server is running MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running the xserver:xwayland / XTS test in an environment where an X server is running for :0, Xwayland fails to start with error: (EE) Fatal server error: (EE) Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. (EE) And the `timeout` command fails instead of waiting for Weston to initialize. Add the `-displayfd` parameter to Xwayland to avoid this issue. The `-displayfd` parameter lets Xwayland pick an unused display number, avoiding the start up error when an X server is already active for :0, the default display number. Suggested-by: Michel Dänzer Signed-off-by: José Expósito --- test/scripts/xwayland-piglit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/scripts/xwayland-piglit.sh b/test/scripts/xwayland-piglit.sh index 14f7dec107..7eac3d6c57 100755 --- a/test/scripts/xwayland-piglit.sh +++ b/test/scripts/xwayland-piglit.sh @@ -18,7 +18,7 @@ WESTON_PID=$! export WAYLAND_DISPLAY=wayland-$$ # Wait for weston to initialize before starting Xwayland -timeout --preserve-status 60s bash -c "while ! $XSERVER_BUILDDIR/hw/xwayland/Xwayland -pogo &>/dev/null; do sleep 1; done" +timeout --preserve-status 60s bash -c "while ! $XSERVER_BUILDDIR/hw/xwayland/Xwayland -pogo -displayfd 1 &>/dev/null; do sleep 1; done" # Start an Xwayland server export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xwayland