]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
tests: Exit with skipped exit code when test not performed
authorGlenn Washburn <development@efficientek.com>
Wed, 13 Oct 2021 00:40:02 +0000 (19:40 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 14 Oct 2021 13:03:41 +0000 (15:03 +0200)
These tests were not performed and therefore did not pass, nor fail. This
fixes misleading test exit code where, for instance, the pseries_test will
pass on i386-pc, which is not a pseries architecture.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
15 files changed:
tests/ahci_test.in
tests/cdboot_test.in
tests/core_compress_test.in
tests/ehci_test.in
tests/fddboot_test.in
tests/grub_cmd_date.in
tests/grub_cmd_set_date.in
tests/grub_cmd_sleep.in
tests/hddboot_test.in
tests/netboot_test.in
tests/ohci_test.in
tests/partmap_test.in
tests/pata_test.in
tests/pseries_test.in
tests/uhci_test.in

index 3f7645ad8f403072e4ca23d91997d9d947176563..6d2e61d4eff7741be2bdc0ea808d1b7b321a25c6 100644 (file)
@@ -22,16 +22,16 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
-       exit 0;;
+       exit 77;;
     # FIXME: qemu gets bonito DMA wrong
     mipsel-loongson)
-       exit 0;;
+       exit 77;;
     # PLATFORM: no AHCI on ARC and qemu-mips platforms
     mips*-arc | mips*-qemu_mips)
-       exit 0;;
+       exit 77;;
     # FIXME: No native drivers are available for those
     powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi)
-       exit 0;;
+       exit 77;;
 esac
 
 imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
index bf9549a6be49e93c11dc57a1c725c7f7666e7ba0..f00cdec587bfa9bb7102d31e0ecab455521c7873 100644 (file)
@@ -22,16 +22,16 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: emu is different
     *-emu)
-       exit 0;;
+       exit 77;;
     # PLATFORM: Flash targets
     i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
-       exit 0;;
+       exit 77;;
     # FIXME: currently grub-shell uses only -kernel for loongson
     mipsel-loongson)
-       exit 0;;
+       exit 77;;
     # FIXME: OFW fails to open CD-ROM
     i386-ieee1275)
-       exit 0;;
+       exit 77;;
 esac
 
 v=$(echo hello | "${grubshell}" --boot=cd)
index 52708fd831206678d3285f2b1597b31d15cf73c2..24a811418aad8dfae9395991913ec15ac9edf1bb 100644 (file)
@@ -22,7 +22,7 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # FIXME: Only mips currently supports configurable core compression
     *-emu | i386-* | x86_64-* | sparc64-* | ia64-*)
-       exit 0
+       exit 77
        ;;
 esac
 
index df408d77a08c6c94493a58d9d4829e392210f525..df671b4b6a5ba129c81e2b58d0d5be298ececc3b 100644 (file)
@@ -22,16 +22,16 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
-       exit 0;;
+       exit 77;;
     # FIXME: qemu gets bonito DMA wrong
     mipsel-loongson)
-       exit 0;;
+       exit 77;;
     # PLATFORM: no USB on ARC and qemu-mips platforms
     mips*-arc | mips*-qemu_mips)
-       exit 0;;
+       exit 77;;
     # FIXME: No native drivers are available for those
     powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi)
-       exit 0;;
+       exit 77;;
 esac
 
 imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
index 32281c75f112cbc3adff970079a2b876a04ce284..6ef49efcb21b9b8ac2986e5b6a9efb3c96c5bf15 100644 (file)
@@ -22,28 +22,28 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: emu is different
     *-emu)
-       exit 0;;
+       exit 77;;
     # PLATFORM: Flash targets
     i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
-       exit 0;;
+       exit 77;;
     # FIXME: currently grub-shell uses only -kernel for loongson
     mipsel-loongson)
-       exit 0;;
+       exit 77;;
     # FIXME: We don't support EFI floppy boot in grub-mkrescue
     *-efi)
-       exit 0;;
+       exit 77;;
     # FIXME: no floppy support
     i386-multiboot)
-       exit 0;;
+       exit 77;;
     # FIXME: QEMU firmware crashes when trying to boot from floppy
     sparc64-ieee1275)
-       exit 0;;
+       exit 77;;
     # FIXME: QEMU doesn't emulate SCSI floppies
     mipsel-arc | mips-arc)
-       exit 0;;
+       exit 77;;
     # PLATFORM: powerpc doesn't boot from floppy except OldWorld Macs which we don't support anyway
     powerpc-ieee1275)
-       exit 0;;
+       exit 77;;
 esac
 
 v=$(echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes= -no-pad")
index 737a278e6dc5343f0a8e3b4a14801c6218112be1..4903ad6cc325645d76a7dedd262845cbd301ce6d 100644 (file)
@@ -5,7 +5,7 @@ set -e
 
 # FIXME: OpenBIOS on sparc64 doesn't implement RTC
 if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = sparc64-ieee1275 ]; then
-    exit 0
+    exit 77
 fi
 
 pdt="$(date -u +%s)"
index aac120a6c52731649678549d34372af14fef52d9..17673cd8aabbad67d6af1e948e2042c08e1ee78b 100644 (file)
@@ -6,15 +6,15 @@ set -e
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # FIXME: OpenBIOS on sparc64 doesn't implement RTC
     sparc64-ieee1275)
-       exit 0;;
+       exit 77;;
     # PLATFORM: ARC doesn't provide any way to set time
     *-arc)
-       exit 0;;
+       exit 77;;
     # PLATFORM: EMU doesn't provide any way to set time
     # Even if it did we'd need some kind of sandbox to avoid
     # modifying real system time.
     *-emu)
-       exit 0;;
+       exit 77;;
 esac
 
 out=$(cat <<EOF | @builddir@/grub-shell
index 8797f6632845f5a76ac22b813c223897ceddd672..1a57fb388cf4ba3ec34b147f7aee4e946707e6a3 100644 (file)
@@ -5,7 +5,7 @@ set -e
 
 # FIXME: OpenBIOS on sparc64 doesn't implement RTC
 if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = sparc64-ieee1275 ]; then
-    exit 0
+    exit 77
 fi
 
 # Compare RTC with interval timer.
index ded2cde7ba14395806ec162da0f65747939225f5..764e0da1c17aad8f59e9c3cb297ff8c83e7be461 100644 (file)
@@ -22,13 +22,13 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: emu is different
     *-emu)
-       exit 0;;
+       exit 77;;
     # PLATFORM: Flash targets
     i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
-       exit 0;;
+       exit 77;;
     # FIXME: currently grub-shell uses only -kernel for loongson
     mipsel-loongson)
-       exit 0;;
+       exit 77;;
 esac
 
 v=$(echo hello | "${grubshell}" --boot=hd)
index b274f3e2de3b072a624a6ab174599b228ddcf45b..510c9c34ba42a6a52a0c7de41305bc77ddf023a1 100644 (file)
@@ -22,22 +22,22 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: emu is different
     *-emu)
-       exit 0;;
+       exit 77;;
     # PLATFORM: Flash targets
     i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
-       exit 0;;
+       exit 77;;
     # FIXME: currently grub-shell uses only -kernel for loongson
     mipsel-loongson)
-       exit 0;;
+       exit 77;;
     # FIXME: no rtl8139 support
     i386-multiboot)
-       exit 0;;
+       exit 77;;
     # FIXME: We don't fully support netboot on ARC
     *-arc)
-       exit 0;;
+       exit 77;;
     # FIXME: Many QEMU firmware have no netboot capability
     *-efi | i386-ieee1275 | powerpc-ieee1275 | sparc64-ieee1275)
-       exit 0;;
+       exit 77;;
 esac
 
 v=$(echo hello | "${grubshell}" --boot=net)
index c72618656f6c43f454b0a7301e89a0f212e93c3d..741ad881f71883260a97f79db1ab31158801f8da 100644 (file)
@@ -22,16 +22,16 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
-       exit 0;;
+       exit 77;;
     # FIXME: qemu gets bonito DMA wrong
     mipsel-loongson)
-       exit 0;;
+       exit 77;;
     # PLATFORM: no USB on ARC and qemu-mips platforms
     mips*-arc | mips*-qemu_mips)
-       exit 0;;
+       exit 77;;
     # FIXME: No native drivers are available for those
     powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi)
-       exit 0;;
+       exit 77;;
 esac
 
 imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
index 7906db43d6b70cf2c843f43d655fd47ab3997790..e72af9ce4710300e8bcaafd16c4b3b716b3f5987 100644 (file)
@@ -70,21 +70,21 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     powerpc-ieee1275)
        disk=ieee1275//pci@80000000/mac-io@4/ata-3@20000/disk@0
        # FIXME: QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
-       exit 0
+       exit 77
        ;;
     sparc64-ieee1275)
        disk=ieee1275//pci@1fe\,0/pci-ata@5/ide0@500/disk@0
        # FIXME: QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
-       exit 0
+       exit 77
        ;;
     i386-ieee1275)
        disk=ieee1275/d
        # FIXME: QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
-       exit 0
+       exit 77
        ;;
     mips-arc)
        # FIXME: ARC firmware has bugs which prevent it from accessing hard disk w/o dvh disklabel.
-       exit 0 ;;
+       exit 77 ;;
     mipsel-arc)
        disk=arc/scsi0/disk0/rdisk0
        ;;
index a69719bf5007dcaf2a6f1fe3f17443bfc83c1ae9..4fee0b0fbcd2fe307cb1f9cb001d6fd3ce4e8bad 100644 (file)
@@ -25,13 +25,13 @@ indisk=ata0
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
-       exit 0;;
+       exit 77;;
     # PLATFORM: no ATA on ARC platforms (they use SCSI)
     *-arc)
-       exit 0;;
+       exit 77;;
     # FIXME: No native drivers are available for those
     powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi)
-       exit 0;;
+       exit 77;;
     i386-ieee1275)
        disk=hdb
        indisk=ata1
index 655eb4f3a63a210ffd1271ac16da47bcbad70434..9b4090cf50fc8c408fa176cbdf618be2b0e2140b 100644 (file)
@@ -20,7 +20,7 @@ grubshell=@builddir@/grub-shell
 . "@builddir@/grub-core/modinfo.sh"
 
 if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" != powerpc-ieee1275 ]; then
-   exit 0
+   exit 77
 fi
 
 if [ "$(echo hello | "${grubshell}" --pseries --timeout=180 --boot=cd)" != "Hello World" ]; then
index 7b8892c638e75d6b4dbf22d0f4b1b7ebe080fe68..5aa5eb7262678c927d10d4159ae14010457d486b 100644 (file)
@@ -22,16 +22,16 @@ grubshell=@builddir@/grub-shell
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
     # PLATFORM: Don't mess with real devices when OS is active
     *-emu)
-       exit 0;;
+       exit 77;;
     # FIXME: qemu gets bonito DMA wrong
     mipsel-loongson)
-       exit 0;;
+       exit 77;;
     # PLATFORM: no USB on ARC and qemu-mips platforms
     mips*-arc | mips*-qemu_mips)
-       exit 0;;
+       exit 77;;
     # FIXME: No native drivers are available for those
     powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi)
-       exit 0;;
+       exit 77;;
 esac
 
 imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99