From: Frantisek Sumsal Date: Wed, 5 Nov 2025 17:12:39 +0000 (+0100) Subject: test: terminate the test containers cleanly on SIGTERM X-Git-Tag: v258.2~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c8e3e54cf020736d564b4ec73d95d50fdf06a39;p=thirdparty%2Fsystemd.git test: terminate the test containers cleanly on SIGTERM So they exit with 0 instead of 143 when we call `machinectl terminate` on them. (cherry picked from commit 79a93bb7f52ce71b9d5027e640f59c0f08fbbbcc) --- diff --git a/test/units/TEST-13-NSPAWN.machined.sh b/test/units/TEST-13-NSPAWN.machined.sh index 76db239f916..304435d721e 100755 --- a/test/units/TEST-13-NSPAWN.machined.sh +++ b/test/units/TEST-13-NSPAWN.machined.sh @@ -50,6 +50,7 @@ trap 'touch /terminate; kill 0' RTMIN+3 trap 'touch /poweroff' RTMIN+4 trap 'touch /reboot' INT trap 'touch /trap' TRAP +trap 'exit 0' TERM trap 'kill $PID' EXIT # We need to wait for the sleep process asynchronously in order to allow @@ -327,6 +328,7 @@ ip address add 192.0.2.1/24 dev hoge PID=0 trap 'kill 0' RTMIN+3 +trap 'exit 0' TERM trap 'kill $PID' EXIT # We need to wait for the sleep process asynchronously in order to allow