Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/ui-smoke/_lib/crashdump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ crashdump_report() {
-ex "echo \n=== all threads ===\n" \
-ex "thread apply all bt" \
"${py:-python3}" "$core" 2>&1 | head -400
else
elif grep -qE "Fatal Python error|Segmentation fault|Aborted" linuxcnc.err 2>/dev/null; then
# No readable core. The Python faulthandler traceback in
# linuxcnc.err already names the crash site; the native backtrace
# is only a best-effort extra.
# is only a best-effort extra. Same markers as drive.py; without
# one there was no crash to report.
echo "=== crash: no readable core dump; see the Python traceback in linuxcnc.err above ==="
fi
rm -rf "$CORE_DIR"
Expand Down
16 changes: 12 additions & 4 deletions tests/ui-smoke/_lib/quit-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ DRIVER_TIMEOUT=90
# margin covers Cleanup of task/motion on slow CI.
QUIT_GRACE=15
# Seconds to wait, after task is reachable, for the GUI to show a window
# before declaring it never came up.
GUI_UP_TIMEOUT=60
# before declaring it never came up. The launcher still loads halui and
# the remaining HAL files before it starts the GUI; a slow runner took
# over 60s for that and the GUI startup.
GUI_UP_TIMEOUT=120

# Shared headless environment (software GL + audio silencing), kept in
# launch-env.sh so launch.sh and quit-launch.sh cannot drift apart.
Expand Down Expand Up @@ -117,6 +119,7 @@ xvfb-run -a --server-args="-screen 0 $UI_SMOKE_XVFB_SCREEN" \
return 1
}
GUI_PID=""
start=$SECONDS
waited=0
while [ "$waited" -lt "$GUI_UP_TIMEOUT" ]; do
[ -n "$GUI_PID" ] || GUI_PID=$(find_gui_pid)
Expand All @@ -125,10 +128,15 @@ xvfb-run -a --server-args="-screen 0 $UI_SMOKE_XVFB_SCREEN" \
fi
kill -0 "$LINUXCNC_PID" 2>/dev/null || break
sleep 1
waited=$((waited + 1))
waited=$((SECONDS - start))
done
if [ -z "$GUI_PID" ]; then
echo "UI_SMOKE_QUIT_FAIL: GUI process matching \"$GUI_MATCH\" not found"
if kill -0 "$LINUXCNC_PID" 2>/dev/null; then
state="linuxcnc still running"
else
state="linuxcnc exited"
fi
echo "UI_SMOKE_QUIT_FAIL: GUI process matching \"$GUI_MATCH\" not found after ${waited}s ($state)"
kill -KILL -- -"$LINUXCNC_PID" 2>/dev/null || true
bash "$LIB_DIR/cleanup-runtime.sh"
exit 1
Expand Down