]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-58: remove stale artifacts to not fail on repeated invocations
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Apr 2021 15:53:55 +0000 (17:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 23 Apr 2021 13:11:38 +0000 (15:11 +0200)
We would remove stuff only if successful, so repeated invocations would
trivially fail.

Also drop "-f", so that if we expect to remove something, it must be there.

test/units/testsuite-58.sh

index 1fcc882242ebf7aabe4175cbfa6b200b9e99e4d5..21ad7d5da2101b33fbec9c0a1f5db061357b761f 100755 (executable)
@@ -5,6 +5,7 @@ set -o pipefail
 export SYSTEMD_LOG_LEVEL=debug
 export PAGER=cat
 
+rm -f /var/tmp/testsuite-58.img /var/tmp/testsuite-58.2.img /tmp/testsuite-58.dump
 mkdir -p /tmp/testsuite-58-defs/
 
 # First part: create a disk image and verify its in order
@@ -74,8 +75,8 @@ systemd-repart --definitions=/tmp/testsuite-58-defs/ \
 
 cmp /var/tmp/testsuite-58.img /var/tmp/testsuite-58.2.img
 
-rm -f /var/tmp/testsuite-58.img /var/tmp/testsuite-58.2.img /tmp/testsuite-58.dump
-rm -rf /tmp/testsuite-58-defs/
+rm /var/tmp/testsuite-58.img /var/tmp/testsuite-58.2.img /tmp/testsuite-58.dump
+rm -r /tmp/testsuite-58-defs/
 
 echo OK >/testok