From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <daniel.kiper@oracle.com>
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH v3 4/4] tests: Exit with skipped exit code when test not performed
Date: Thu, 7 Oct 2021 15:33:27 -0500 [thread overview]
Message-ID: <20211007203327.159098-5-development@efficientek.com> (raw)
In-Reply-To: <20211007203327.159098-1-development@efficientek.com>
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>
---
tests/ahci_test.in | 8 ++++----
tests/cdboot_test.in | 8 ++++----
tests/core_compress_test.in | 2 +-
tests/ehci_test.in | 8 ++++----
tests/fddboot_test.in | 16 ++++++++--------
tests/grub_cmd_date.in | 2 +-
tests/grub_cmd_set_date.in | 6 +++---
tests/grub_cmd_sleep.in | 2 +-
tests/hddboot_test.in | 6 +++---
tests/netboot_test.in | 12 ++++++------
tests/ohci_test.in | 8 ++++----
tests/partmap_test.in | 8 ++++----
tests/pata_test.in | 6 +++---
tests/pseries_test.in | 2 +-
tests/uhci_test.in | 8 ++++----
15 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/tests/ahci_test.in b/tests/ahci_test.in
index 3f7645ad8..6d2e61d4e 100644
--- a/tests/ahci_test.in
+++ b/tests/ahci_test.in
@@ -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
diff --git a/tests/cdboot_test.in b/tests/cdboot_test.in
index 7229f79fb..c0a5212ff 100644
--- a/tests/cdboot_test.in
+++ b/tests/cdboot_test.in
@@ -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`
diff --git a/tests/core_compress_test.in b/tests/core_compress_test.in
index 90dd00607..72d2eca7d 100644
--- a/tests/core_compress_test.in
+++ b/tests/core_compress_test.in
@@ -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
diff --git a/tests/ehci_test.in b/tests/ehci_test.in
index df408d77a..df671b4b6 100644
--- a/tests/ehci_test.in
+++ b/tests/ehci_test.in
@@ -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
diff --git a/tests/fddboot_test.in b/tests/fddboot_test.in
index 1bbe60ee5..5348ac56b 100644
--- a/tests/fddboot_test.in
+++ b/tests/fddboot_test.in
@@ -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"`
diff --git a/tests/grub_cmd_date.in b/tests/grub_cmd_date.in
index f9156691e..409cb684a 100644
--- a/tests/grub_cmd_date.in
+++ b/tests/grub_cmd_date.in
@@ -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)"
diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in
index aac120a6c..17673cd8a 100644
--- a/tests/grub_cmd_set_date.in
+++ b/tests/grub_cmd_set_date.in
@@ -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
diff --git a/tests/grub_cmd_sleep.in b/tests/grub_cmd_sleep.in
index 8797f6632..1a57fb388 100644
--- a/tests/grub_cmd_sleep.in
+++ b/tests/grub_cmd_sleep.in
@@ -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.
diff --git a/tests/hddboot_test.in b/tests/hddboot_test.in
index abe3e0ae1..110c70950 100644
--- a/tests/hddboot_test.in
+++ b/tests/hddboot_test.in
@@ -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`
diff --git a/tests/netboot_test.in b/tests/netboot_test.in
index 6a1d95a22..e0b2c9d25 100644
--- a/tests/netboot_test.in
+++ b/tests/netboot_test.in
@@ -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`
diff --git a/tests/ohci_test.in b/tests/ohci_test.in
index c72618656..741ad881f 100644
--- a/tests/ohci_test.in
+++ b/tests/ohci_test.in
@@ -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
diff --git a/tests/partmap_test.in b/tests/partmap_test.in
index 7906db43d..e72af9ce4 100644
--- a/tests/partmap_test.in
+++ b/tests/partmap_test.in
@@ -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
;;
diff --git a/tests/pata_test.in b/tests/pata_test.in
index 0db4778d7..4a9c68ae4 100644
--- a/tests/pata_test.in
+++ b/tests/pata_test.in
@@ -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
diff --git a/tests/pseries_test.in b/tests/pseries_test.in
index 655eb4f3a..9b4090cf5 100644
--- a/tests/pseries_test.in
+++ b/tests/pseries_test.in
@@ -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
diff --git a/tests/uhci_test.in b/tests/uhci_test.in
index 7b8892c63..5aa5eb726 100644
--- a/tests/uhci_test.in
+++ b/tests/uhci_test.in
@@ -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
--
2.27.0
next prev parent reply other threads:[~2021-10-07 20:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 20:33 [PATCH v3 0/4] Various fixes/improvements for tests Glenn Washburn
2021-10-07 20:33 ` [PATCH v3 1/4] tests: Add set -e to missing tests Glenn Washburn
2021-10-11 14:04 ` Daniel Kiper
2021-10-07 20:33 ` [PATCH v3 2/4] tests: Do not occlude subshell error codes Glenn Washburn
2021-10-11 14:20 ` Daniel Kiper
2021-10-11 18:06 ` Glenn Washburn
2021-10-12 19:40 ` Daniel Kiper
2021-10-13 0:39 ` Glenn Washburn
2021-10-07 20:33 ` [PATCH v3 3/4] tests: Do not occlude grub-shell return code Glenn Washburn
2021-10-11 14:31 ` Daniel Kiper
2021-10-07 20:33 ` Glenn Washburn [this message]
2021-10-11 14:34 ` [PATCH v3 4/4] tests: Exit with skipped exit code when test not performed Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211007203327.159098-5-development@efficientek.com \
--to=development@efficientek.com \
--cc=daniel.kiper@oracle.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.