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
13 changes: 8 additions & 5 deletions tests/ui-smoke/_lib/quit-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,16 @@ xvfb-run -a --server-args="-screen 0 $UI_SMOKE_XVFB_SCREEN" \
# path or the embedded script text. Every such wrapper has a
# shell or xvfb-run as argv[0]; the real GUI is a python
# interpreter. Pick the first match whose argv[0] basename is a
# python binary.
# python binary. Under qemu-user binfmt (armhf CI on a host
# without AArch32) argv[0] is the emulator and the interpreter
# is argv[1], so look at both.
find_gui_pid() {
for p in $(pgrep -f "$GUI_MATCH"); do
arg0=$(tr "\0" "\n" <"/proc/$p/cmdline" 2>/dev/null | head -1)
case "$(basename "$arg0" 2>/dev/null)" in
python*) echo "$p"; return 0 ;;
esac
for a in $(tr "\0" "\n" <"/proc/$p/cmdline" 2>/dev/null | head -2); do
case "$(basename "$a" 2>/dev/null)" in
python*) echo "$p"; return 0 ;;
esac
done
done
return 1
}
Expand Down