]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: stop container when it is not necessary anymore
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 20 May 2024 17:54:06 +0000 (02:54 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 21 May 2024 14:09:38 +0000 (23:09 +0900)
test/units/TEST-74-AUX-UTILS.coredump.sh

index 3f3571639e3e30c821d9a19040a97a645a6470ae..b9c8fde2a33cb4c437967f3495cb34ddd798e793 100755 (executable)
@@ -105,7 +105,9 @@ EOF
     # Wait a bit for the coredumps to get processed
     timeout 30 bash -c "while [[ \$(systemd-run -M $CONTAINER -q --wait --pipe coredumpctl list -q --no-legend /usr/bin/sleep | wc -l) -lt 2 ]]; do sleep 1; done"
 
+    machinectl stop "$CONTAINER"
     rm -rf "/var/lib/machines/$CONTAINER"
+    unset CONTAINER
 fi
 
 coredumpctl