grub/tests/ext234_test.in
Glenn Washburn 1437647052 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 <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2025-11-20 17:38:15 +01:00

34 lines
668 B
Plaintext

#!@BUILD_SHEBANG@
set -ex
if [ "x$EUID" = "x" ] ; then
EUID=`id -u`
fi
if [ "$EUID" != 0 ] ; then
exit 99
fi
if ! which mkfs.ext2 >/dev/null 2>&1; then
echo "mkfs.ext2 not installed; cannot test ext2."
exit 99
fi
if ! which mkfs.ext3 >/dev/null 2>&1; then
echo "mkfs.ext3 not installed; cannot test ext3."
exit 99
fi
if ! which mkfs.ext4 >/dev/null 2>&1; then
echo "mkfs.ext4 not installed; cannot test ext4."
exit 99
fi
"@builddir@/grub-fs-tester" ext2_old
"@builddir@/grub-fs-tester" ext2
"@builddir@/grub-fs-tester" ext3
"@builddir@/grub-fs-tester" ext4
"@builddir@/grub-fs-tester" ext4_metabg
"@builddir@/grub-fs-tester" ext4_encrypt