]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Revert "tests: Skip tests if required tools are not available"
authorGlenn Washburn <development@efficientek.com>
Wed, 19 Nov 2025 19:11:34 +0000 (13:11 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 20 Nov 2025 16:38:15 +0000 (17:38 +0100)
As explained in commit a21618c8a (tests: Test aborts due to missing
requirements should be marked as error instead of skipped) and in the
Automake manual[1], skipped tests are tests that should not be run, e.g.
running the ohci test on the powerpc-ieee1275 as there are no native ohci
drivers for that platform. Test that fail for reasons other than there is
a bug in GRUB code that is causing the test to fail are hard errors.
Commonly this is because the test is run in an improperly configured
environment, like required programs are missing. If a hard error condition
is identified with a SKIP return code, the person running the tests can not
know without investigating every skip if a SKIP in the tests was because
the test does not apply to the target being tested or because the user had
a misconfigured environment that was causing the test not to run. By
ensuring that a test is skipped only when it should not run, the person
running the test can be sure that there is no need to investigate why the
test was skipped.

This reverts commit bf13fed5f (tests: Skip tests if required tools are not available).

[1] https://www.gnu.org/software/automake/manual/automake.html#Generalities-about-Testing

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
29 files changed:
tests/btrfs_test.in
tests/cpio_test.in
tests/erofs_test.in
tests/exfat_test.in
tests/ext234_test.in
tests/f2fs_test.in
tests/fat_test.in
tests/grub_cmd_cryptomount.in
tests/gzcompress_test.in
tests/hfs_test.in
tests/hfsplus_test.in
tests/iso9660_test.in
tests/jfs_test.in
tests/luks1_test.in
tests/luks2_test.in
tests/lzocompress_test.in
tests/minixfs_test.in
tests/nilfs2_test.in
tests/ntfs_test.in
tests/partmap_test.in
tests/reiserfs_test.in
tests/romfs_test.in
tests/squashfs_test.in
tests/tar_test.in
tests/tpm2_key_protector_test.in
tests/udf_test.in
tests/xfs_test.in
tests/xzcompress_test.in
tests/zfs_test.in

index 84cfd95d8e4673caf93423a957a737a58f45d9cd..900f56379fa7c10e6b2937d1849c198ca3f8a475 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.btrfs >/dev/null 2>&1; then
    echo "mkfs.btrfs not installed; cannot test btrfs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" btrfs
index fb468564a900e4fa5fc01ed7087caacda1582165..74759419e67ce607c6b06e4ac967c731272b2239 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 if ! which cpio >/dev/null 2>&1; then
    echo "cpio not installed; cannot test cpio."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" cpio_bin
index f8cf3bb8b47fc9f4c5e67f17d5687aaea8501fab..e0dec8d3aba45f3fc9619a0a1245072d11e75c49 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 if ! which mkfs.erofs >/dev/null 2>&1; then
    echo "mkfs.erofs not installed; cannot test erofs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" erofs_compact
index ae2b209a1e8e51550ef5a3173629e005a76244b8..63300b8a50c26166398426b39d4ae3254e67bf1a 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.exfat >/dev/null 2>&1; then
    echo "mkfs.exfat not installed; cannot test exFAT."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" exfat
index 2f8aafc9c6e7080f21027a141ca3e3283e7ae1d8..3761238db7010e2814901d932c95e0363072831d 100644 (file)
@@ -12,17 +12,17 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test ext2."
-   exit 77
+   exit 99
 fi
 
 if ! which mkfs.ext3 >/dev/null 2>&1; then
    echo "mkfs.ext3 not installed; cannot test ext3."
-   exit 77
+   exit 99
 fi
 
 if ! which mkfs.ext4 >/dev/null 2>&1; then
    echo "mkfs.ext4 not installed; cannot test ext4."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" ext2_old
index 4d16c2fabef1aa398f8c5ec3e4b597a4bd061fc1..0896810ea0e492859b20ee6261b1abb6d132ad97 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.f2fs >/dev/null 2>&1; then
  echo "mkfs.f2fs not installed; cannot test f2fs."
- exit 77
+ exit 99
 fi
 
 
index 0e4b1ebaed44d8c2853659966814b6721af07644..966b2c9dbde42ad480bf8305b0764aa66bbf9ad7 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.vfat >/dev/null 2>&1; then
    echo "mkfs.vfat not installed; cannot test FAT."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" vfat16a
index 97863c3e8f9474a110fea1a2eef01ba2f31c6183..bcba7c74c1a5f4de709fa0e879e10b26262045e0 100644 (file)
@@ -27,12 +27,12 @@ fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test cryptomount."
-   exit 77
+   exit 99
 fi
 
 if ! which mkfs.vfat >/dev/null 2>&1; then
    echo "mkfs.vfat not installed; cannot test cryptomount."
-   exit 77
+   exit 99
 fi
 
 COMMON_OPTS='${V:+--debug=$V} --cs-opts="--pbkdf-force-iterations 1000"'
index 471b6537edcfb2c28c6b1c40e705f460ac2034a3..0f80037fb134b6ce8be22f3ab9a2fab30b1da1d2 100644 (file)
@@ -21,7 +21,7 @@ grubshell=@builddir@/grub-shell
 
 if ! which gzip >/dev/null 2>&1; then
    echo "gzip not installed; cannot test gzip compression."
-   exit 77
+   exit 99
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)
index fc0e0e75c6dce76d1d7f41bee291ea4e12c28a00..99432114f27f20d5d11b15311c662183e77b7aef 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.hfs >/dev/null 2>&1; then
    echo "mkfs.hfs not installed; cannot test HFS."
-   exit 77
+   exit 99
 fi
 
 if ! grep -q mac_roman /proc/modules && ! modprobe mac_roman; then
index 7918a68bbd2f8b52e06488b640ff10fc0960ab42..402d1cd6650f128548403c814a16e4175ba706c1 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.hfsplus >/dev/null 2>&1; then
    echo "mkfs.hfsplus not installed; cannot test hfsplus."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" hfsplus
index 7a6816f94a4d9c85697fdae860670c38ac0cfed9..a36f3022a185998304d60393f765fa74f3efc72f 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 if ! which xorriso >/dev/null 2>&1; then
    echo "xorriso not installed; cannot test iso9660."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" joliet
index b1c18e9b16d074b6e3024fb482106b5ddd029fd7..07f1ca1935fb32854d714d87f171c7db777cdfb0 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.jfs >/dev/null 2>&1; then
    echo "mkfs.jfs not installed; cannot test JFS."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" jfs
index 3344746c108f93df90256fa0dd7b7f61a397bf85..1df4a2f5ff326d1ef7a0b38c3bee4be1359489de 100644 (file)
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test luks."
-   exit 77
+   exit 99
 fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test luks."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" luks1
index 5368698f8274ab4c8a97d5f2f0fbb74c3ebf7dd7..75ac2c19108e49d3cb6b78e5d5cedd384fdbac46 100644 (file)
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test luks2."
-   exit 77
+   exit 99
 fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test luks2."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" luks2
index 50145dd0cdd12b4cfa49e05caba202322d3c9c9a..a89d014e96c10d88587085f9a7ef6926ab8990cf 100644 (file)
@@ -21,7 +21,7 @@ grubshell=@builddir@/grub-shell
 
 if ! which lzop >/dev/null 2>&1; then
    echo "lzop not installed; cannot test lzo compression."
-   exit 77
+   exit 99
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)
index 0d28a72261758be3c959196b05db8db47387e8f7..780f699faa9b43be166419cfae1d9abb4e8f2826 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.minix >/dev/null 2>&1; then
    echo "mkfs.minix not installed; cannot test minixfs."
-   exit 77
+   exit 99
 fi
 
 if ! mkfs.minix -h | grep -- -v > /dev/null; then
index 84b8b1a0b6fb76350e922e77b03b869d7e0556e4..95ec7c3b40acc0ab82fce59a994781e7fb614844 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.nilfs2 >/dev/null 2>&1; then
    echo "mkfs.nilfs2 not installed; cannot test nilfs2."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" nilfs2
index 5b1bebe16c921356a80cb510a58fdfb1b81ec740..b6432d2a16b6a954e73a8f9dc557b8c5570b137b 100644 (file)
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ntfs >/dev/null 2>&1; then
    echo "mkfs.ntfs not installed; cannot test ntfs."
-   exit 77
+   exit 99
 fi
 
 if ! which setfattr >/dev/null 2>&1; then
    echo "setfattr not installed; cannot test ntfs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" ntfs
index 8e12cf7ec4b6be31a4e1fcf316d76ef90de1cf00..6157a85372b7166140701610f819b2e9bd0ef165 100644 (file)
@@ -100,7 +100,7 @@ esac
 
 if ! which ${parted} >/dev/null 2>&1; then
    echo "${parted} not installed; cannot test partmap"
-   exit 77
+   exit 99
 fi
 
 imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
index 48d3ab4cc6cf11fee5ca5f4ebf3e2079daaa0489..6f8ebcf298a81fc5165f2de4dc3a5421b747837e 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.reiserfs >/dev/null 2>&1; then
    echo "mkfs.reiserfs not installed; cannot test reiserfs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" reiserfs
index 2c66cde3451cb3f78f2908baa0c3d65e441edd0c..e3b4a0210cec27638108736fa3d5982736dc59d2 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 if ! which genromfs >/dev/null 2>&1; then
    echo "genromfs not installed; cannot test romfs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" romfs
index b973f7bac0a8ee28119786821c70003eb42e5b18..36f8e97353c8d63558a30c4c2182e68018dd497d 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 if ! which mksquashfs >/dev/null 2>&1; then
    echo "mksquashfs not installed; cannot test squashfs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" squash4_gzip
index eafb6649ddd2e78ec7d03d1ecad6474e8f4f019b..4f0c697acb41ac698f0f257d7684ccdf8eb0661a 100644 (file)
@@ -4,7 +4,7 @@ set -ex
 
 if ! which tar >/dev/null 2>&1; then
    echo "tar not installed; cannot test tar."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" tarfs
index 6dbd697876d946f2d5442c52e2706e24aad8d929..5dd86d6ee19d0f99240a200f7ac0a965bcedadf9 100644 (file)
@@ -41,7 +41,7 @@ fi
 
 if ! command -v cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test tpm2."
-   exit 77
+   exit 99
 fi
 
 if ! grep -q tpm_vtpm_proxy /proc/modules && ! modprobe tpm_vtpm_proxy; then
@@ -51,7 +51,7 @@ fi
 
 if ! command -v swtpm >/dev/null 2>&1; then
    echo "swtpm not installed; cannot test tpm2."
-   exit 77
+   exit 99
 fi
 
 if ! command -v tpm2_startup >/dev/null 2>&1; then
index b84d0b674617e547d37d45a8adce86c30a19f0a3..0723b3be0a259deac8b7dad28c61311b54c4f0f2 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkudffs >/dev/null 2>&1; then
    echo "mkudffs not installed; cannot test UDF."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" udf
index d6b3ab908a28dbbf8544c9c6b811435a4a5ee503..2c9e6e3484e63570ef882f02ec2044cf56937035 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.xfs >/dev/null 2>&1; then
    echo "mkfs.xfs not installed; cannot test xfs."
-   exit 77
+   exit 99
 fi
 
 
index f0ac52e2d02c1fcd78ce637e22b0d69c4bcaebe7..62f0564db003a9de61b66b18fe6b0373d8cc77e6 100644 (file)
@@ -21,7 +21,7 @@ grubshell=@builddir@/grub-shell
 
 if ! which xz >/dev/null 2>&1; then
    echo "xz not installed; cannot test xz compression."
-   exit 77
+   exit 99
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)
index cd547b4d2282054911716cb2a0dad4e3e75d5171..462a9b95fe428d470e85e5af734730b22b53c54e 100644 (file)
@@ -12,7 +12,7 @@ fi
 
 if ! which zpool >/dev/null 2>&1; then
    echo "zpool not installed; cannot test zfs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" zfs