From: Benjamin Drung Date: Tue, 27 Jan 2026 19:20:57 +0000 (+0100) Subject: test: increase ext4 size in build_ext4_image X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=527d4b5abf55076300661b638082e2ec8ddce349;p=thirdparty%2Fdracut-ng.git test: increase ext4 size in build_ext4_image Adding a fixed amount of 10 MB to the ext4 image size might not be enough (for example when using `build_ext4_image` in test 60). So calculate the additional size by a percentaged and a fixed amount. --- diff --git a/test/test-functions b/test/test-functions index d6eeaf4dc..bf2ecfa2c 100644 --- a/test/test-functions +++ b/test/test-functions @@ -174,8 +174,8 @@ build_ext4_image() { local size size="$(du -s -b "${source_dir}" | cut -f 1)" - # Add 10 MB for ext4 journal - size="$((size + 10000000))" + # Add 5% extra + 5% for reserved blocks + 10% for metadata + 8 MB for ext4 journal + size="$((size * 120 / 100 + 8000000))" rm -f "$image" truncate -s "$size" "$image"