From 14376470520d3106e32f5c0db4d15a86e7eaf33a Mon Sep 17 00:00:00 2001 From: Glenn Washburn Date: Wed, 19 Nov 2025 13:11:34 -0600 Subject: [PATCH] Revert "tests: Skip tests if required tools are not available" 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 Reviewed-by: Daniel Kiper --- tests/btrfs_test.in | 2 +- tests/cpio_test.in | 2 +- tests/erofs_test.in | 2 +- tests/exfat_test.in | 2 +- tests/ext234_test.in | 6 +++--- tests/f2fs_test.in | 2 +- tests/fat_test.in | 2 +- tests/grub_cmd_cryptomount.in | 4 ++-- tests/gzcompress_test.in | 2 +- tests/hfs_test.in | 2 +- tests/hfsplus_test.in | 2 +- tests/iso9660_test.in | 2 +- tests/jfs_test.in | 2 +- tests/luks1_test.in | 4 ++-- tests/luks2_test.in | 4 ++-- tests/lzocompress_test.in | 2 +- tests/minixfs_test.in | 2 +- tests/nilfs2_test.in | 2 +- tests/ntfs_test.in | 4 ++-- tests/partmap_test.in | 2 +- tests/reiserfs_test.in | 2 +- tests/romfs_test.in | 2 +- tests/squashfs_test.in | 2 +- tests/tar_test.in | 2 +- tests/tpm2_key_protector_test.in | 4 ++-- tests/udf_test.in | 2 +- tests/xfs_test.in | 2 +- tests/xzcompress_test.in | 2 +- tests/zfs_test.in | 2 +- 29 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/btrfs_test.in b/tests/btrfs_test.in index 84cfd95d8..900f56379 100644 --- a/tests/btrfs_test.in +++ b/tests/btrfs_test.in @@ -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 diff --git a/tests/cpio_test.in b/tests/cpio_test.in index fb468564a..74759419e 100644 --- a/tests/cpio_test.in +++ b/tests/cpio_test.in @@ -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 diff --git a/tests/erofs_test.in b/tests/erofs_test.in index f8cf3bb8b..e0dec8d3a 100644 --- a/tests/erofs_test.in +++ b/tests/erofs_test.in @@ -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 diff --git a/tests/exfat_test.in b/tests/exfat_test.in index ae2b209a1..63300b8a5 100644 --- a/tests/exfat_test.in +++ b/tests/exfat_test.in @@ -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 diff --git a/tests/ext234_test.in b/tests/ext234_test.in index 2f8aafc9c..3761238db 100644 --- a/tests/ext234_test.in +++ b/tests/ext234_test.in @@ -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 diff --git a/tests/f2fs_test.in b/tests/f2fs_test.in index 4d16c2fab..0896810ea 100644 --- a/tests/f2fs_test.in +++ b/tests/f2fs_test.in @@ -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 diff --git a/tests/fat_test.in b/tests/fat_test.in index 0e4b1ebae..966b2c9db 100644 --- a/tests/fat_test.in +++ b/tests/fat_test.in @@ -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 diff --git a/tests/grub_cmd_cryptomount.in b/tests/grub_cmd_cryptomount.in index 97863c3e8..bcba7c74c 100644 --- a/tests/grub_cmd_cryptomount.in +++ b/tests/grub_cmd_cryptomount.in @@ -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"' diff --git a/tests/gzcompress_test.in b/tests/gzcompress_test.in index 471b6537e..0f80037fb 100644 --- a/tests/gzcompress_test.in +++ b/tests/gzcompress_test.in @@ -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) diff --git a/tests/hfs_test.in b/tests/hfs_test.in index fc0e0e75c..99432114f 100644 --- a/tests/hfs_test.in +++ b/tests/hfs_test.in @@ -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 diff --git a/tests/hfsplus_test.in b/tests/hfsplus_test.in index 7918a68bb..402d1cd66 100644 --- a/tests/hfsplus_test.in +++ b/tests/hfsplus_test.in @@ -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 diff --git a/tests/iso9660_test.in b/tests/iso9660_test.in index 7a6816f94..a36f3022a 100644 --- a/tests/iso9660_test.in +++ b/tests/iso9660_test.in @@ -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 diff --git a/tests/jfs_test.in b/tests/jfs_test.in index b1c18e9b1..07f1ca193 100644 --- a/tests/jfs_test.in +++ b/tests/jfs_test.in @@ -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 diff --git a/tests/luks1_test.in b/tests/luks1_test.in index 3344746c1..1df4a2f5f 100644 --- a/tests/luks1_test.in +++ b/tests/luks1_test.in @@ -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 diff --git a/tests/luks2_test.in b/tests/luks2_test.in index 5368698f8..75ac2c191 100644 --- a/tests/luks2_test.in +++ b/tests/luks2_test.in @@ -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 diff --git a/tests/lzocompress_test.in b/tests/lzocompress_test.in index 50145dd0c..a89d014e9 100644 --- a/tests/lzocompress_test.in +++ b/tests/lzocompress_test.in @@ -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) diff --git a/tests/minixfs_test.in b/tests/minixfs_test.in index 0d28a7226..780f699fa 100644 --- a/tests/minixfs_test.in +++ b/tests/minixfs_test.in @@ -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 diff --git a/tests/nilfs2_test.in b/tests/nilfs2_test.in index 84b8b1a0b..95ec7c3b4 100644 --- a/tests/nilfs2_test.in +++ b/tests/nilfs2_test.in @@ -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 diff --git a/tests/ntfs_test.in b/tests/ntfs_test.in index 5b1bebe16..b6432d2a1 100644 --- a/tests/ntfs_test.in +++ b/tests/ntfs_test.in @@ -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 diff --git a/tests/partmap_test.in b/tests/partmap_test.in index 8e12cf7ec..6157a8537 100644 --- a/tests/partmap_test.in +++ b/tests/partmap_test.in @@ -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 diff --git a/tests/reiserfs_test.in b/tests/reiserfs_test.in index 48d3ab4cc..6f8ebcf29 100644 --- a/tests/reiserfs_test.in +++ b/tests/reiserfs_test.in @@ -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 diff --git a/tests/romfs_test.in b/tests/romfs_test.in index 2c66cde34..e3b4a0210 100644 --- a/tests/romfs_test.in +++ b/tests/romfs_test.in @@ -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 diff --git a/tests/squashfs_test.in b/tests/squashfs_test.in index b973f7bac..36f8e9735 100644 --- a/tests/squashfs_test.in +++ b/tests/squashfs_test.in @@ -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 diff --git a/tests/tar_test.in b/tests/tar_test.in index eafb6649d..4f0c697ac 100644 --- a/tests/tar_test.in +++ b/tests/tar_test.in @@ -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 diff --git a/tests/tpm2_key_protector_test.in b/tests/tpm2_key_protector_test.in index 6dbd69787..5dd86d6ee 100644 --- a/tests/tpm2_key_protector_test.in +++ b/tests/tpm2_key_protector_test.in @@ -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 diff --git a/tests/udf_test.in b/tests/udf_test.in index b84d0b674..0723b3be0 100644 --- a/tests/udf_test.in +++ b/tests/udf_test.in @@ -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 diff --git a/tests/xfs_test.in b/tests/xfs_test.in index d6b3ab908..2c9e6e348 100644 --- a/tests/xfs_test.in +++ b/tests/xfs_test.in @@ -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 diff --git a/tests/xzcompress_test.in b/tests/xzcompress_test.in index f0ac52e2d..62f0564db 100644 --- a/tests/xzcompress_test.in +++ b/tests/xzcompress_test.in @@ -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) diff --git a/tests/zfs_test.in b/tests/zfs_test.in index cd547b4d2..462a9b95f 100644 --- a/tests/zfs_test.in +++ b/tests/zfs_test.in @@ -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