From db0f96e742fe71bc4fa5d37fa49f6794004f1346 Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Sun, 18 Oct 2026 17:17:39 +1100 Subject: [PATCH 1/2] tests/ui-smoke: let linuxcnc shut down before signalling its group Once the GUI had quit, quit-launch.sh sent SIGTERM to the whole linuxcnc process group at once. linuxcnc was then already shutting down after its GUI, so under load the signal reached it while it unloaded: the halcmd and rtapi_app clients died halfway ("child did not exit normally"), linuxcnc's SIGTERM trap ran its cleanup a second time on top of the first, and the motion shared memory was left behind (SHMERR in touchy-quit, #4669). After a clean quit the launcher now waits up to 30 s for linuxcnc to exit by itself, and only then signals what is left. With a component that takes 1 s to unload, touchy-quit gave that SHMERR on every run and now passes. --- tests/ui-smoke/_lib/quit-launch.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/ui-smoke/_lib/quit-launch.sh b/tests/ui-smoke/_lib/quit-launch.sh index ebada34e249..6e2770bdf80 100755 --- a/tests/ui-smoke/_lib/quit-launch.sh +++ b/tests/ui-smoke/_lib/quit-launch.sh @@ -165,6 +165,17 @@ xvfb-run -a --server-args="-screen 0 $UI_SMOKE_XVFB_SCREEN" \ RC=0 fi + # A GUI that quit makes linuxcnc shut down by itself; let it. + # A SIGTERM to the group while it unloads kills the halcmd and + # rtapi_app clients halfway, and linuxcnc then unloads a second + # time on top of the first, leaving shared memory behind. + if [ "$RC" = 0 ]; then + for _ in $(seq 30); do + kill -0 "$LINUXCNC_PID" 2>/dev/null || break + sleep 1 + done + fi + # Tear down whatever is left (task/motion, or the GUI on failure). kill -TERM -- -"$LINUXCNC_PID" 2>/dev/null || true for _ in $(seq 30); do From deeeb709bde15915a700dd89e8a9f43249d74d11 Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Sun, 18 Oct 2026 17:17:40 +1100 Subject: [PATCH 2/2] tests/tp/circle-curvature: drop the leftover ${SUDO} runtests no longer sets SUDO since the tests stopped using sudo, and the skip file keeps the test off installed packages. --- tests/tp/circle-curvature/test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/tp/circle-curvature/test.sh b/tests/tp/circle-curvature/test.sh index 79e6a90edb8..81f0605a9bd 100755 --- a/tests/tp/circle-curvature/test.sh +++ b/tests/tp/circle-curvature/test.sh @@ -1,7 +1,6 @@ #!/bin/sh set -e -# shellcheck disable=SC2086 -${SUDO} halcompile --install curvaturecheck.c >/dev/null +halcompile --install curvaturecheck.c >/dev/null halrun curvature.hal echo 'circle curvature: OK'