From 6b5d3d255695c558d3ef8677f57475e9ade5b079 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 1 Sep 2024 09:33:00 +0200 Subject: [PATCH] TEST-58-REPART: Only skip part of testcase_minimize() that requires root --- test/units/TEST-58-REPART.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/units/TEST-58-REPART.sh b/test/units/TEST-58-REPART.sh index 6a704648871..968d332f068 100755 --- a/test/units/TEST-58-REPART.sh +++ b/test/units/TEST-58-REPART.sh @@ -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" -- 2.47.3