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>
54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
#!@BUILD_SHEBANG@
|
|
|
|
set -ex
|
|
|
|
if ! which xorriso >/dev/null 2>&1; then
|
|
echo "xorriso not installed; cannot test iso9660."
|
|
exit 99
|
|
fi
|
|
|
|
"@builddir@/grub-fs-tester" joliet
|
|
"@builddir@/grub-fs-tester" rockridge
|
|
"@builddir@/grub-fs-tester" rockridge_joliet
|
|
"@builddir@/grub-fs-tester" joliet_1999
|
|
"@builddir@/grub-fs-tester" rockridge_1999
|
|
"@builddir@/grub-fs-tester" rockridge_joliet_1999
|
|
|
|
echo "Testing for proper recognition of CE loops ... "
|
|
for fs in iso9660_ce_loop iso9660_ce_loop2; do
|
|
tempdir=`mktemp -d "${TMPDIR:-/tmp}/${0##*/}.$(date '+%Y%m%d%H%M%S%N').${fs}.XXX"` ||
|
|
{ echo "Failed to make temporary directory"; exit 99; }
|
|
gunzip <"$srcdir"/tests/${fs}.iso.gz >"${tempdir}/${fs}.iso" || exit 99
|
|
output=$(LC_ALL=C timeout -s KILL "60" \
|
|
"@builddir@/grub-fstest" "${tempdir}/${fs}.iso" ls / ) || ret=$?
|
|
rm -rf "$tempdir"
|
|
if [ "${ret:-0}" -ne 0 -o -n "$output" ]; then
|
|
echo "FAIL ($fs)"
|
|
exit 1
|
|
fi
|
|
done
|
|
echo "PASS"
|
|
|
|
echo "Testing for proper handling of early CE ... "
|
|
fs=iso9660_early_ce
|
|
tempdir=`mktemp -d "${TMPDIR:-/tmp}/${0##*/}.$(date '+%Y%m%d%H%M%S%N').${fs}.XXX"` ||
|
|
{ echo "Failed to make temporary directory"; exit 99; }
|
|
gunzip <"$srcdir"/tests/${fs}.iso.gz >"${tempdir}/${fs}.iso" || exit 99
|
|
ret=0
|
|
output=$(LC_ALL=C timeout -s KILL "60" \
|
|
"@builddir@/grub-fstest" "${tempdir}/${fs}.iso" ls / ) || ret=$?
|
|
rm -rf "$tempdir"
|
|
if [ "${ret:-0}" -ne 0 ]; then
|
|
echo "... grub-fstest returns $ret"
|
|
echo "FAIL ($fs)"
|
|
exit 1
|
|
fi
|
|
# Before comparing: remove trailing blank added by grub-fstest
|
|
output=$(echo -n $output)
|
|
if [ x"$output" != x"RockRidgeName:x" ]; then
|
|
echo "... found: '$output' , expected: 'RockRidgeName:x'"
|
|
echo "FAIL ($fs)"
|
|
exit 1
|
|
fi
|
|
echo "PASS"
|