diff --git a/tests/ui-smoke/_lib/crashdump.sh b/tests/ui-smoke/_lib/crashdump.sh index d81895bac4e..a6ec22fd020 100644 --- a/tests/ui-smoke/_lib/crashdump.sh +++ b/tests/ui-smoke/_lib/crashdump.sh @@ -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" diff --git a/tests/ui-smoke/_lib/quit-launch.sh b/tests/ui-smoke/_lib/quit-launch.sh index 6e2770bdf80..2e83b547cd8 100755 --- a/tests/ui-smoke/_lib/quit-launch.sh +++ b/tests/ui-smoke/_lib/quit-launch.sh @@ -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 }