From: Yu Watanabe Date: Mon, 3 Jul 2023 03:11:50 +0000 (+0900) Subject: test: add reproducer for issue #28225 X-Git-Tag: v254-rc1~35^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=beba8f2e1e5f08041d2a9955398a64d92dcc75a0;p=thirdparty%2Fsystemd.git test: add reproducer for issue #28225 --- diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh index 6ddb96d26e3..a170128de91 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" <