]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: fix 'make clean' not removing shared image 18395/head
authorLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 28 Jan 2021 13:26:35 +0000 (13:26 +0000)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Fri, 29 Jan 2021 09:56:45 +0000 (09:56 +0000)
test/test-functions

index a9341445d5e3e36931fdd83c4cbe022abbdd7ec4..df6022982c2cdc0956b42a3c325cd47423c7361a 100644 (file)
@@ -2088,6 +2088,10 @@ _test_cleanup() {
         set +e
         _umount_dir $initdir
         rm -vf "$IMAGE_PUBLIC"
+        # If multiple setups/cleans are ran in parallel, this can cause a race
+        if [ ${TEST_PARALLELIZE} -ne 1 ]; then
+            rm -vf "${IMAGESTATEDIR}/default.img"
+        fi
         rm -vfr "$TESTDIR"
         rm -vf "$STATEFILE"
     ) || :