]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
tests: Test aborts due to missing requirements should be marked as error instead...
authorGlenn Washburn <development@efficientek.com>
Thu, 14 Oct 2021 20:58:07 +0000 (15:58 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 25 Oct 2021 14:23:34 +0000 (16:23 +0200)
Many tests abort due to not being root or missing tools, for instance mkfs
commands for file system tests. The tests are exited with code 77, which
means they were skipped. A skipped test is a test that should not be run,
e.g. a test specific to ARM64 should not be run on an x86 build. These aborts
are actually a hard error, code 99. That means that the test could not be
completed, but not because what was supposed to be tested failed, e.g. in
these cases where a missing tool prevents the running of a test.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
24 files changed:
tests/btrfs_test.in
tests/cpio_test.in
tests/exfat_test.in
tests/ext234_test.in
tests/f2fs_test.in
tests/fat_test.in
tests/gzcompress_test.in
tests/hfs_test.in
tests/hfsplus_test.in
tests/iso9660_test.in
tests/jfs_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/udf_test.in
tests/xfs_test.in
tests/xzcompress_test.in
tests/zfs_test.in

index 0c9bf3a685cfa21160be0e594994ad646903f657..0d098c9a27bc6e58c82af16a71f221312579b12d 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 5742cf17b9d8f587d00590d481f0a00aaf6cada8..e2e668cf6be1d7fece8e46c4ce128600f5d4d9cf 100644 (file)
@@ -4,7 +4,7 @@ set -e
 
 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 cd3cd4cb2f70bb99df7edbfa8b5697f4316548ac..7939f25d2728979b3afa09e57c0c3d05b342ea3e 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 4f1eb527eb2ed41095266dba6d5013ead77d9be3..4df696710d283a709f1f1993d131182d866a09a6 100644 (file)
@@ -7,22 +7,22 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 8c415db61a215e09437221244aeed0a76dc4d02f..85f8cc8bc391472b961924271ad358c1c9fc912c 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
- exit 77
+ exit 99
 fi
 
 if ! which mkfs.f2fs >/dev/null 2>&1; then
  echo "mkfs.f2fs not installed; cannot test f2fs."
- exit 77
+ exit 99
 fi
 
 
index b6b4748ca694b59337441a2f3111863e01799884..8a2b37c5c676c4c9505e493a69eea1e94c8fdad8 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   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
index d7a594bb2c3b8c3608a4502cb54300c051e5a89c..8e7e6a63351c39d2c281f009d0c264569a521dc3 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 5b0c5e33e39474d748e6c9d574db1497f4652a38..960f1cbd0f4215e02d5beba2b21b4b574262c2e3 100644 (file)
@@ -7,17 +7,17 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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
    echo "no mac-roman support; cannot test HFS."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" hfs
index 85f1c37dce6a0c5a217d75b051b1ab426d06a2be..f727cf0e2e209ac6bf63d472f067d07943b4b174 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 571b938d7a08b14ca21dd6497bd0092f3d6d40cb..ed0a5bf8d42d4ca7808bd5898d0d9b95fd99316d 100644 (file)
@@ -4,7 +4,7 @@ set -e
 
 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 6cf7576b35ed8ce4b86036ed67df02b698fbc062..d13780e230c35245d7b4046b222d06d4abb019b9 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 42e270df02643c8ecc2e0217ed621c4203a6185b..915f74bd9f567c54b21d9cf6d4cd106c890fb3da 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 437d92df641a11aa640b4f7dfc377bd7cba47297..c62f56c8b44af5c60f7c7593090343cb340f8c73 100644 (file)
@@ -7,22 +7,22 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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
     echo "mkfs.minix doesn't support minix2fs; cannot test minix*fs."
-   exit 77
+   exit 99
 fi
 
 if ! mkfs.minix -h | grep -- -3 > /dev/null; then
     echo "mkfs.minix doesn't support minix3fs; cannot test minix*fs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" minix
index ad44d5b33c8af3ab9f62b7c8ca866c025a51d24a..8cc93754cd64eb2d153462cb527540ee83739ff5 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 9eb7b01f66e923009939abf7b839276a15fa67a3..c2b08d27f892018ad2320fe9dbc9d18088ef7452 100644 (file)
@@ -7,17 +7,17 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 0043bcf4c74138b08a97201f7de15f5dbe29981b..bc2be78aa299df603b99dc447ff3ec5485ecd0c5 100644 (file)
@@ -98,7 +98,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 8ecfe740b19ce2c0073a21061723d3fd3a93cd2c..37226c01b7630c83b1d06ff62885f541f45e7fd7 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 98bb50c324b6e8cd1163c772a78271b64768ae57..f968e9b7dbd2c40cd103e7eaf528b977404c2d8f 100644 (file)
@@ -4,7 +4,7 @@ set -e
 
 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 2f044f95d99b2ee7a6ddf1d2b2e54be3944f235f..15e70218f2dd4636b9f251e1f343173979e64e63 100644 (file)
@@ -4,7 +4,7 @@ set -e
 
 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 6e2f2de8b7ff78ca84401213dadd011a0b65f281..97944b2433768b0515527a7cad13b63f82938509 100644 (file)
@@ -4,7 +4,7 @@ set -e
 
 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 fb92f0173cc74151d7fdc722522d654efa2233b5..302b28ab26afebe7562c45e04f6500c98279b5fd 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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 03a3513595dc719cd72b4d9b7198f22b338cb588..5e029c18278e341c0b0eb11303d909febaa6bdc9 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 fi
 
 if ! which mkfs.xfs >/dev/null 2>&1; then
    echo "mkfs.xfs not installed; cannot test xfs."
-   exit 77
+   exit 99
 fi
 
 
index cfc6ccba66352c5c37d026f0f354b7902a14db17..6ef73e41e8cc17ae4cb5c44d5a2cf13fb83b7f62 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 eee62c10d704ec42b090eba5ac16b4966ff760ad..58cc25b2270f8ecd38d6eead9be054e8463f96de 100644 (file)
@@ -7,12 +7,12 @@ if [ "x$EUID" = "x" ] ; then
 fi
 
 if [ "$EUID" != 0 ] ; then
-   exit 77
+   exit 99
 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