Skip to content

Commit 10fe7bf

Browse files
committed
test: force QT_QPA_PLATFORM=offscreen for qtdragon
xvfb + xcb + xcb_egl was not enough for Ubuntu 24.04 rip-and-test: qtvcp still segfaults during widget construction even with opencv and qtwebengine paths quiet, and the same code passes on Debian package-arch. Offscreen renders entirely in memory and exercises a different Qt plugin entirely, dodging the xcb-stack instability. scripts/linuxcnc itself forces QT_QPA_PLATFORM=xcb unless LINUXCNC_OPENGL_PLATFORM is set to a non-glx value, so pin both. Only qtdragon needs this; axis (Tk), touchy and gmoccapy (GTK) are unaffected. Trade-off: no Phase 3 screenshot from qtdragon under this config; Phase 3 would need an opt-out for offscreen tests.
1 parent e7f797d commit 10fe7bf

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/ui-smoke/qtdragon/test.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
# linuxcnc tears down before our driver can do anything. Mirror the
77
# config dir to a writable tmp location and patch LOG_FILE to be
88
# rooted at $HOME so the log lands in a directory we can write to.
9+
#
10+
# Force the Qt offscreen platform plugin. qtvcp under xvfb + xcb on
11+
# Ubuntu 24.04 segfaults during widget construction (no backtrace);
12+
# Debian containers in the same CI matrix do not. Offscreen renders
13+
# entirely in memory, no X server needed (xvfb-run still wraps the
14+
# call so the rest of scripts/linuxcnc's X-display assumptions hold).
15+
# scripts/linuxcnc itself forces QT_QPA_PLATFORM=xcb unless
16+
# LINUXCNC_OPENGL_PLATFORM is set to something other than glx, so we
17+
# pin both env vars.
918
set -u
1019

1120
LIB_DIR="$(cd "$(dirname "$0")/../_lib" && pwd)"
@@ -17,5 +26,8 @@ cp -r "$SRC_DIR/." "$WORK_DIR/"
1726
sed -i 's|^LOG_FILE = qtdragon\.log$|LOG_FILE = ~/qtdragon.log|' \
1827
"$WORK_DIR/qtdragon_metric.ini"
1928

29+
export LINUXCNC_OPENGL_PLATFORM=offscreen
30+
export QT_QPA_PLATFORM=offscreen
31+
2032
exec "$LIB_DIR/run-gui.sh" "$WORK_DIR/qtdragon_metric.ini" \
2133
--run-program "$LIB_DIR/smoke.ngc" --expect-delta-mm 1,1,0

0 commit comments

Comments
 (0)