diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh index 6ddb96d26e..a170128de9 100755 --- a/test/units/testsuite-58.sh +++ b/test/units/testsuite-58.sh @@ -1021,6 +1021,86 @@ EOF systemd-dissect -U "$imgs/mnt" } +testcase_free_area_calculation() { + local defs imgs output + + if ! command -v mksquashfs >/dev/null; then + echo "Skipping free area calculation test without squashfs." + return + fi + + defs="$(mktemp --directory "/tmp/test-repart.defs.XXXXXXXXXX")" + imgs="$(mktemp --directory "/var/tmp/test-repart.imgs.XXXXXXXXXX")" + # shellcheck disable=SC2064 + trap "rm -rf '$defs' '$imgs'" RETURN + chmod a+rx "$defs" + + # https://github.com/systemd/systemd/issues/28225 + echo "*** free area calculation ***" + + tee "$defs/00-ESP.conf" <