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>
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
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
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
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
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
if ! which mkfs.f2fs >/dev/null 2>&1; then
echo "mkfs.f2fs not installed; cannot test f2fs."
- exit 77
+ exit 99
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
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"'
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)
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
if ! which mkfs.xfs >/dev/null 2>&1; then
echo "mkfs.xfs not installed; cannot test xfs."
- exit 77
+ exit 99
fi
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)
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