test: stop the test unit when it's not needed anymore

Otherwise it keeps printing stuff to the journal/console, adding
unnecessary noise.
This commit is contained in:
Frantisek Sumsal
2023-04-14 21:13:14 +02:00
parent e51d13d61d
commit 3a8b7e8b5f
+1
View File
@@ -175,6 +175,7 @@ sleep 3
systemctl kill --signal=SIGKILL systemd-journald
sleep 3
[[ ! -f "/i-lose-my-logs" ]]
systemctl stop forever-print-hola
# https://github.com/systemd/systemd/issues/15528
journalctl --follow --file=/var/log/journal/*/* | head -n1 || [[ $? -eq 1 ]]