]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-58-REPART: Only skip part of testcase_minimize() that requires root
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 1 Sep 2024 07:33:00 +0000 (09:33 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 3 Sep 2024 06:48:34 +0000 (08:48 +0200)
test/units/TEST-58-REPART.sh

index 6a704648871eec6207b417450a8e71ee4668c7a3..968d332f068e54fbd7808e0e4fb35c5dec0f7630 100755 (executable)
@@ -1067,11 +1067,6 @@ EOF
 testcase_minimize() {
     local defs imgs output
 
-    if systemd-detect-virt --quiet --container; then
-        echo "Skipping minimize test in container."
-        return
-    fi
-
     echo "*** minimization ***"
 
     defs="$(mktemp --directory "/tmp/test-repart.defs.XXXXXXXXXX")"
@@ -1114,6 +1109,11 @@ EOF
 
     # Check that we can dissect, mount and unmount a minimized image.
 
+    if systemd-detect-virt --quiet --container; then
+        echo "Skipping minimize dissect, mount and unmount test in container."
+        return
+    fi
+
     systemd-dissect "$imgs/zzz"
     systemd-dissect "$imgs/zzz" -M "$imgs/mnt"
     systemd-dissect -U "$imgs/mnt"