]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test/TEST-41: use a file in /tmp and reset the contents
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 Mar 2020 20:59:54 +0000 (21:59 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 28 Mar 2020 10:46:48 +0000 (11:46 +0100)
If the test was run a second time from the same root, it would fail.

test/units/testsuite-41.sh

index 905f32e994b25192789534c3729097436077c27e..e3c5f1dad6c7347dd2d141f1454bc3b4db4205cd 100755 (executable)
@@ -19,9 +19,9 @@ if [[ "$(systemctl show one.service -p NRestarts --value)" -le 0 ]]; then
   exit 1
 fi
 
-TMP_FILE="/test-41-oneshot-restart-test"
+TMP_FILE="/tmp/test-41-oneshot-restart-test"
 
-touch $TMP_FILE
+: >$TMP_FILE
 
 # test two: make sure StartLimitBurst correctly limits the number of restarts
 # and restarts execution of the unit from the first ExecStart=