Various fixes/improvements for tests
v4 cover Various fixes/improvements for tests
Updates since v3:
* Dropped iso9660_test LANG patch
* Merged v3 in v2
* Rewrote commit message for #4 to hopefully be clearer
* Replace ... with $(...)
These are mostly test improvement and fixes that stand on their own.
Glenn
Glenn Washburn (9):
tests: Fix partmap_test for arm*-efi, disk numbering has changed
tests: When checking squashfs fstime, use superblock last modified
time
tests: Add set -e to missing tests
tests: Do not occlude subshell error codes when used as input to the
test command
tests: Do not occlude grub-shell return code
tests: Make setup errors in grub-fs-tester hard errors
tests: A failure of mktemp should cause the test script to exit with
code 99
tests: Exit with skipped exit code when test not performed
tests: Use @BUILD_SHEBANG@ autoconf var instead of literal shell
tests/ahci_test.in | 19 ++++++++++++------- tests/cdboot_test.in | 11 ++++++----- tests/core_compress_test.in | 8 +++++--- tests/ehci_test.in | 19 ++++++++++++------- tests/f2fs_test.in | 2 +- tests/fddboot_test.in | 19 ++++++++++--------- tests/gettext_strings_test.in | 2 +- tests/grub_cmd_date.in | 5 +++-- tests/grub_cmd_set_date.in | 6 +++--- tests/grub_cmd_sleep.in | 2 +- tests/grub_cmd_test.in | 7 ++++--- tests/grub_script_blockarg.in | 3 ++- tests/grub_script_expansion.in | 3 ++- tests/gzcompress_test.in | 3 ++- tests/hddboot_test.in | 9 +++++---- tests/lzocompress_test.in | 3 ++- tests/netboot_test.in | 15 ++++++++------- tests/ohci_test.in | 19 ++++++++++++------- tests/partmap_test.in | 18 +++++++++--------- tests/pata_test.in | 13 +++++++------ tests/pseries_test.in | 2 +- tests/syslinux_test.in | 2 +- tests/test_sha512sum.in | 7 ++++--- tests/uhci_test.in | 19 ++++++++++++------- tests/util/grub-fs-tester.in | 17 ++++++++++++----- tests/xzcompress_test.in | 3 ++- 26 files changed, 139 insertions(+), 97 deletions(-)
Range-diff against v3:
1: 3a2cc2738 = 1: 3a2cc2738 tests: Fix partmap_test for arm*-efi, disk numbering has changed
2: 3da044f56 = 2: 3da044f56 tests: When checking squashfs fstime, use superblock last modified time
3: a061a35f5 = 3: a061a35f5 tests: Add set -e to missing tests
4: ab85eb4c8 ! 4: 5828e4c79 tests: Do not occlude subshell error codes
@@ Metadata
Author: Glenn Washburn <[email protected]>
## Commit message ##
- tests: Do not occlude subshell error codes
+ tests: Do not occlude subshell error codes when used as input to the test command
- When a subshell's output is used as input to a "simple command", its return
- code is not checked. These subshells contain an execution of the grub-shell
- script which does the work of the actual test. If grub-shell returns an
- error code, the test should fail. So refactor to not have the subshell which
- contains grub-shell be direct input into a simple command (usually the test
- command). Mostly this is accomplished by having the output first go to a
- shell variable, and then using the shell variable in the simple command.
+ When using the output of a subshell as input, its error code is ignored in
+ the context of "set -e". Many test scripts use grub-shell in a subshell with
+ output used as an argument to the test command to test for expected output.
+ Refactor these tests so that the subshell output goes to a shell variable,
+ so that if the subshell errors the script will immediately exit with an
+ error code.
## tests/ahci_test.in ##
@@ tests/ahci_test.in: echo "hello" > "$outfile"
@@ tests/cdboot_test.in: case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}"
esac
-if [ "$(echo hello | "${grubshell}" --boot=cd)" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --boot=cd`
++v=$(echo hello | "${grubshell}" --boot=cd)
+if [ "$v" != "Hello World" ]; then
exit 1
fi
@@ tests/core_compress_test.in: case "${grub_modinfo_target_cpu}-${grub_modinfo_pla
-if [ "$(echo hello | "${grubshell}" --grub-mkimage-extra=--compress=xz)" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --grub-mkimage-extra=--compress=xz`
++v=$(echo hello | "${grubshell}" --grub-mkimage-extra=--compress=xz)
+if [ "$v" != "Hello World" ]; then
exit 1
fi
-if [ "$(echo hello | "${grubshell}" --grub-mkimage-extra=--compress=none)" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --grub-mkimage-extra=--compress=none`
++v=$(echo hello | "${grubshell}" --grub-mkimage-extra=--compress=none)
+if [ "$v" != "Hello World" ]; then
exit 1
fi
@@ tests/fddboot_test.in: case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}
esac
-if [ "$(echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes= -no-pad")" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes= -no-pad"`
++v=$(echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes= -no-pad")
+if [ "$v" != "Hello World" ]; then
exit 1
fi
@@ tests/gzcompress_test.in: if ! which gzip >/dev/null 2>&1; then
fi
-if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --mkrescue-arg=--compress=gz`
++v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)
+if [ "$v" != "Hello World" ]; then
exit 1
fi
@@ tests/hddboot_test.in: case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}
esac
-if [ "$(echo hello | "${grubshell}" --boot=hd)" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --boot=hd`
++v=$(echo hello | "${grubshell}" --boot=hd)
+if [ "$v" != "Hello World" ]; then
exit 1
fi
@@ tests/lzocompress_test.in: if ! which lzop >/dev/null 2>&1; then
fi
-if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo`
++v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)
+if [ "$v" != "Hello World" ]; then
exit 1
fi
@@ tests/netboot_test.in: case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}
esac
-if [ "$(echo hello | "${grubshell}" --boot=net)" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --boot=net`
++v=$(echo hello | "${grubshell}" --boot=net)
+if [ "$v" != "Hello World" ]; then
exit 1
fi
@@ tests/pata_test.in: echo "hello" > "$outfile"
tar cf "$imgfile" "$outfile"
-if [ "$(echo "nativedisk; source '($indisk)/$outfile';" | "${grubshell}" --qemu-opts="-$disk $imgfile")" != "Hello World" ]; then
-+v=`echo "nativedisk; source '($indisk)/$outfile';" | "${grubshell}" --qemu-opts="-$disk $imgfile"`
++v=$(echo "nativedisk; source '($indisk)/$outfile';" | "${grubshell}" --qemu-opts="-$disk $imgfile")
+if [ "$v" != "Hello World" ]; then
rm "$imgfile"
rm "$outfile"
@@ tests/xzcompress_test.in: if ! which xz >/dev/null 2>&1; then
fi
-if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)" != "Hello World" ]; then
-+v=`echo hello | "${grubshell}" --mkrescue-arg=--compress=xz`
++v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)
+if [ "$v" != "Hello World" ]; then
exit 1
fi
5: fac9d9cae = 5: 37097a173 tests: Do not occlude grub-shell return code
6: dae3591c4 = 6: c703a1b2f tests: Make setup errors in grub-fs-tester hard errors
7: 5f2fb19e9 = 7: 23a0d5358 tests: A failure of mktemp should cause the test script to exit with code 99
8: 2a2e491bd ! 8: a4d79a908 tests: Exit with skipped exit code when test not performed @@ tests/cdboot_test.in: grubshell=@builddir@/grub-shell
+ exit 77;;
esac
- v=echo hello | "${grubshell}" --boot=cd
+ v=$(echo hello | "${grubshell}" --boot=cd)
## tests/core_compress_test.in ##
@@ tests/core_compress_test.in: grubshell=@builddir@/grub-shell
@@ tests/fddboot_test.in: grubshell=@builddir@/grub-shell
+ exit 77;;
esac
- v=echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes= -no-pad"
+ v=$(echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes= -no-pad")
## tests/grub_cmd_date.in ##
@@ tests/grub_cmd_date.in: set -e
@@ tests/hddboot_test.in: grubshell=@builddir@/grub-shell
+ exit 77;;
esac
- v=echo hello | "${grubshell}" --boot=hd
+ v=$(echo hello | "${grubshell}" --boot=hd)
## tests/netboot_test.in ##
@@ tests/netboot_test.in: grubshell=@builddir@/grub-shell
@@ tests/netboot_test.in: grubshell=@builddir@/grub-shell
+ exit 77;;
esac
- v=echo hello | "${grubshell}" --boot=net
+ v=$(echo hello | "${grubshell}" --boot=net)
## tests/ohci_test.in ##
@@ tests/ohci_test.in: grubshell=@builddir@/grub-shell
9: 606b9b818 = 9: a7119dfc4 tests: Use @BUILD_SHEBANG@ autoconf var instead of literal shell
Signature · 1 line
2.27.0
PATCH v4 1/9 tests: Fix partmap_test for arm*-efi, disk numbering has changed
Perhaps using a newer UEFI firmware is the reason for the created test disk showing up as hd2 instead of hd3.
--- tests/partmap_test.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/partmap_test.in +1 -1
@@ -89,7 +89,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in disk=arc/scsi0/disk0/rdisk0 ;; arm*-efi) - disk=hd3 + disk=hd2 ;; *) disk=hd0
Signature · 1 line
2.27.0
PATCH v4 2/9 tests: When checking squashfs fstime, use superblock last modified time
In reply to Glenn WashburnCurrently, the filesystem timestamp check in grub-fs-tester uses the squashfs image file's last modified timestamp and checks to see if that time stamp is within 3 seconds of the superblock timestamp as determined by grub. The image file's timestamp could be more than 3 seconds off if mksquashfs takes more than 3 seconds to generate the image, as is the case on a virtual machine. Instead use squashfs tools to get the filesystem timestamp directly.
--- tests/util/grub-fs-tester.in | 6 ++++++ 1 file changed, 6 insertions(+)
tests/util/grub-fs-tester.in +6 -0
@@ -1356,6 +1356,12 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do # With some abstractions like mdraid flushing to disk # may be delayed for a long time. FSTIME="$UMOUNT_TIME";; + xsquash*) + # Creating the squash image may take more than a few + # seconds. Use the more accurate timestamp from the + # superblock. + FSTIME="$(unsquashfs -s "${FSIMAGEP}0.img" | grep ^Creation | awk '{print $6 " " $7 " " $8 " " $9 " " $10; }')" + FSTIME="$(date -d "$FSTIME" -u '+%Y-%m-%d %H:%M:%S')";; *) FSTIME="$(TZ=UTC ls --time-style="+%Y-%m-%d_%H:%M:%S" -l -d "${FSIMAGEP}0.img"|awk '{print $6; }'|sed 's,_, ,g')";; esac
Signature · 1 line
2.27.0
PATCH v4 3/9 tests: Add set -e to missing tests
In reply to Glenn WashburnThis helps to ensure that error codes do not get ignored.
--- tests/grub_cmd_test.in | 1 + tests/grub_script_blockarg.in | 1 + tests/test_sha512sum.in | 1 + 3 files changed, 3 insertions(+)
tests/grub_cmd_test.in +1 -0
@@ -1,4 +1,5 @@ #! @BUILD_SHEBANG@ +set -e # create a randome file empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
tests/grub_script_blockarg.in +1 -0
@@ -1,4 +1,5 @@ #! @BUILD_SHEBANG@ +set -e # Run GRUB script in a Qemu instance # Copyright (C) 2010 Free Software Foundation, Inc.
tests/test_sha512sum.in +1 -0
@@ -1,4 +1,5 @@ #! @BUILD_SHEBANG@ +set -e # create a randome file file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
Signature · 1 line
2.27.0
PATCH v4 4/9 tests: Do not occlude subshell error codes when used as input to the test command
In reply to Glenn WashburnWhen using the output of a subshell as input, its error code is ignored in the context of "set -e". Many test scripts use grub-shell in a subshell with output used as an argument to the test command to test for expected output. Refactor these tests so that the subshell output goes to a shell variable, so that if the subshell errors the script will immediately exit with an error code.
--- tests/ahci_test.in | 7 ++++++- tests/cdboot_test.in | 3 ++- tests/core_compress_test.in | 6 ++++-- tests/ehci_test.in | 7 ++++++- tests/fddboot_test.in | 3 ++- tests/gzcompress_test.in | 3 ++- tests/hddboot_test.in | 3 ++- tests/lzocompress_test.in | 3 ++- tests/netboot_test.in | 3 ++- tests/ohci_test.in | 7 ++++++- tests/pata_test.in | 3 ++- tests/uhci_test.in | 7 ++++++- tests/xzcompress_test.in | 3 ++- 13 files changed, 44 insertions(+), 14 deletions(-)
tests/ahci_test.in +6 -1
@@ -41,7 +41,12 @@ echo "hello" > "$outfile" tar cf "$imgfile" "$outfile" -if [ "$(echo "nativedisk; source '(ahci0)/$outfile';" | "${grubshell}" --qemu-opts="-drive id=disk,file=$imgfile,if=none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 " | tail -n 1)" != "Hello World" ]; then +v=$(echo "nativedisk; source '(ahci0)/$outfile';" | + "${grubshell}" --qemu-opts="-drive id=disk,file=$imgfile,if=none + -device ahci,id=ahci + -device ide-hd,drive=disk,bus=ahci.0" | + tail -n 1) +if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile" exit 1
tests/cdboot_test.in +2 -1
@@ -34,6 +34,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -if [ "$(echo hello | "${grubshell}" --boot=cd)" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --boot=cd) +if [ "$v" != "Hello World" ]; then exit 1 fi
tests/core_compress_test.in +4 -2
@@ -27,10 +27,12 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in esac -if [ "$(echo hello | "${grubshell}" --grub-mkimage-extra=--compress=xz)" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --grub-mkimage-extra=--compress=xz) +if [ "$v" != "Hello World" ]; then exit 1 fi -if [ "$(echo hello | "${grubshell}" --grub-mkimage-extra=--compress=none)" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --grub-mkimage-extra=--compress=none) +if [ "$v" != "Hello World" ]; then exit 1 fi
tests/ehci_test.in +6 -1
@@ -41,7 +41,12 @@ echo "hello" > "$outfile" tar cf "$imgfile" "$outfile" -if [ "$(echo "nativedisk; source '(usb0)/$outfile';" | "${grubshell}" --qemu-opts="-device ich9-usb-ehci1 -drive id=my_usb_disk,file=$imgfile,if=none -device usb-storage,drive=my_usb_disk" | tail -n 1)" != "Hello World" ]; then +v=$(echo "nativedisk; source '(usb0)/$outfile';" | + "${grubshell}" --qemu-opts="-device ich9-usb-ehci1 + -drive id=my_usb_disk,file=$imgfile,if=none + -device usb-storage,drive=my_usb_disk" | + tail -n 1) +if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile" exit 1
tests/fddboot_test.in +2 -1
@@ -46,6 +46,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -if [ "$(echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes= -no-pad")" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes= -no-pad") +if [ "$v" != "Hello World" ]; then exit 1 fi
tests/gzcompress_test.in +2 -1
@@ -24,6 +24,7 @@ if ! which gzip >/dev/null 2>&1; then exit 77 fi -if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz) +if [ "$v" != "Hello World" ]; then exit 1 fi
tests/hddboot_test.in +2 -1
@@ -31,7 +31,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -if [ "$(echo hello | "${grubshell}" --boot=hd)" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --boot=hd) +if [ "$v" != "Hello World" ]; then exit 1 fi
tests/lzocompress_test.in +2 -1
@@ -24,6 +24,7 @@ if ! which lzop >/dev/null 2>&1; then exit 77 fi -if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo) +if [ "$v" != "Hello World" ]; then exit 1 fi
tests/netboot_test.in +2 -1
@@ -40,6 +40,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -if [ "$(echo hello | "${grubshell}" --boot=net)" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --boot=net) +if [ "$v" != "Hello World" ]; then exit 1 fi
tests/ohci_test.in +6 -1
@@ -41,7 +41,12 @@ echo "hello" > "$outfile" tar cf "$imgfile" "$outfile" -if [ "$(echo "nativedisk; source '(usb0)/$outfile';" | "${grubshell}" --qemu-opts="-device pci-ohci -drive id=my_usb_disk,file=$imgfile,if=none -device usb-storage,drive=my_usb_disk" | tail -n 1)" != "Hello World" ]; then +v=$(echo "nativedisk; source '(usb0)/$outfile';" | + "${grubshell}" --qemu-opts="-device pci-ohci + -drive id=my_usb_disk,file=$imgfile,if=none + -device usb-storage,drive=my_usb_disk" | + tail -n 1) +if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile" exit 1
tests/pata_test.in +2 -1
@@ -45,7 +45,8 @@ echo "hello" > "$outfile" tar cf "$imgfile" "$outfile" -if [ "$(echo "nativedisk; source '($indisk)/$outfile';" | "${grubshell}" --qemu-opts="-$disk $imgfile")" != "Hello World" ]; then +v=$(echo "nativedisk; source '($indisk)/$outfile';" | "${grubshell}" --qemu-opts="-$disk $imgfile") +if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile" exit 1
tests/uhci_test.in +6 -1
@@ -41,7 +41,12 @@ echo "hello" > "$outfile" tar cf "$imgfile" "$outfile" -if [ "$(echo "nativedisk; source '(usb0)/$outfile';" | "${grubshell}" --qemu-opts="-device ich9-usb-uhci1 -drive id=my_usb_disk,file=$imgfile,if=none -device usb-storage,drive=my_usb_disk" | tail -n 1)" != "Hello World" ]; then +v=$(echo "nativedisk; source '(usb0)/$outfile';" | + "${grubshell}" --qemu-opts="-device ich9-usb-uhci1 + -drive id=my_usb_disk,file=$imgfile,if=none + -device usb-storage,drive=my_usb_disk" | + tail -n 1) +if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile" exit 1
tests/xzcompress_test.in +2 -1
@@ -24,6 +24,7 @@ if ! which xz >/dev/null 2>&1; then exit 77 fi -if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)" != "Hello World" ]; then +v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz) +if [ "$v" != "Hello World" ]; then exit 1 fi
Signature · 1 line
2.27.0
Re: [PATCH v4 4/9] tests: Do not occlude subshell error codes when used as input to the test command
Quoted 8 lines · Glenn Washburn
When using the output of a subshell as input, its error code is ignored in the context of "set -e". Many test scripts use grub-shell in a subshell with output used as an argument to the test command to test for expected output. Refactor these tests so that the subshell output goes to a shell variable, so that if the subshell errors the script will immediately exit with an error code.
Signed-off-by Glenn Washburn <[email protected]>
Daniel
PATCH v4 5/9 tests: Do not occlude grub-shell return code
In reply to Glenn WashburnThe script grub-shell does the bulk of the testing. If it returns an error code, that means that the test failed and the test should immediately exit with that error code. When grub-shell is used as a non-terminating command in a pipeline, eg. when data needs to be extracted from its output, its error code will be occluded by the last command in the pipeline. Refactor tests so that the shell will error with the exit code of grub-shell by breaking up pipelines such that grub-shell is always the last command in the pipeline that it is used in.
--- tests/ahci_test.in | 4 ++-- tests/ehci_test.in | 4 ++-- tests/grub_cmd_date.in | 3 ++- tests/grub_script_expansion.in | 3 ++- tests/ohci_test.in | 4 ++-- tests/partmap_test.in | 4 ++-- tests/uhci_test.in | 4 ++-- 7 files changed, 14 insertions(+), 12 deletions(-)
tests/ahci_test.in +2 -2
@@ -44,8 +44,8 @@ tar cf "$imgfile" "$outfile" v=$(echo "nativedisk; source '(ahci0)/$outfile';" | "${grubshell}" --qemu-opts="-drive id=disk,file=$imgfile,if=none -device ahci,id=ahci - -device ide-hd,drive=disk,bus=ahci.0" | - tail -n 1) + -device ide-hd,drive=disk,bus=ahci.0") +v=$(echo "$v" | tail -n 1) if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile"
tests/ehci_test.in +2 -2
@@ -44,8 +44,8 @@ tar cf "$imgfile" "$outfile" v=$(echo "nativedisk; source '(usb0)/$outfile';" | "${grubshell}" --qemu-opts="-device ich9-usb-ehci1 -drive id=my_usb_disk,file=$imgfile,if=none - -device usb-storage,drive=my_usb_disk" | - tail -n 1) + -device usb-storage,drive=my_usb_disk") +v=$(echo "$v" | tail -n 1) if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile"
tests/grub_cmd_date.in +2 -1
@@ -9,7 +9,8 @@ if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = sparc64-ieee1275 ]; fi pdt="$(date -u +%s)" -dt=`echo date | @builddir@/grub-shell | sed 's, [A-Z][a-z]*$,,'` +dt=`echo date | @builddir@/grub-shell` +dt=`echo "$dt" | sed 's, [A-Z][a-z]*$,,'` dtg="$(date -u -d "$dt" +%s)" ndt="$(date -u +%s)"
tests/grub_script_expansion.in +2 -1
@@ -17,7 +17,8 @@ set -e # You should have received a copy of the GNU General Public License # along with GRUB. If not, see <http://www.gnu.org/licenses/>. -disks=`echo ls | @builddir@/grub-shell| grep -av '^Network protocols:$'| grep -av '^tftp http $'` +disks=`echo ls | @builddir@/grub-shell` +disks=`echo "$disks"| grep -av '^Network protocols:$'| grep -av '^tftp http $'` other=`echo insmod regexp\; echo \* | @builddir@/grub-shell` for d in $disks; do if echo "$d" |grep ',' >/dev/null; then
tests/ohci_test.in +2 -2
@@ -44,8 +44,8 @@ tar cf "$imgfile" "$outfile" v=$(echo "nativedisk; source '(usb0)/$outfile';" | "${grubshell}" --qemu-opts="-device pci-ohci -drive id=my_usb_disk,file=$imgfile,if=none - -device usb-storage,drive=my_usb_disk" | - tail -n 1) + -device usb-storage,drive=my_usb_disk") +v=$(echo "$v" | tail -n 1) if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile"
tests/partmap_test.in +2 -2
@@ -58,8 +58,8 @@ list_parts () { shift echo ls | "${grubshell}" --disk="${imgfile}" \ - --modules=$mod | tr -d "\n\r" > "${outfile}" - cat "${outfile}" + --modules=$mod > "${outfile}" + cat "${outfile}" | tr -d "\n\r" echo }
tests/uhci_test.in +2 -2
@@ -44,8 +44,8 @@ tar cf "$imgfile" "$outfile" v=$(echo "nativedisk; source '(usb0)/$outfile';" | "${grubshell}" --qemu-opts="-device ich9-usb-uhci1 -drive id=my_usb_disk,file=$imgfile,if=none - -device usb-storage,drive=my_usb_disk" | - tail -n 1) + -device usb-storage,drive=my_usb_disk") +v=$(echo "$v" | tail -n 1) if [ "$v" != "Hello World" ]; then rm "$imgfile" rm "$outfile"
Signature · 1 line
2.27.0
PATCH v4 6/9 tests: Make setup errors in grub-fs-tester hard errors
In reply to Glenn WashburnWhen a test program fails because it failed to setup the test properly, this does not indicate a failure in what is attempting to be tested because the test is never run. So exit with a hard error exit status to note this difference. This will allow easier detection of tests that are not actually being run and those that are really failing.
--- tests/util/grub-fs-tester.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
tests/util/grub-fs-tester.in +6 -5
@@ -6,7 +6,8 @@ fs="$1" GRUBFSTEST="@builddir@/grub-fstest" -tempdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1 +tempdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || +{ echo "Failed to make temporary directory"; exit 99; } # xorriso -as mkisofs options to ignore locale when processing file names and # FSLABEL. This is especially needed for the conversion to Joliet UCS-2.
@@ -277,7 +278,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do done if test "$CFILESRC" = "" ; then echo "Couldn't find compressible file" >&2 - exit 1 + exit 99 fi case x"$fs" in # FS LIMITATION: 8.3 names
@@ -621,7 +622,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do mkdir -p "$MNTPOINTRO" for i in $(range 0 $((NDEVICES-1)) 1); do dd if=/dev/zero of="$FSIMAGEP${i}.img" count=1 bs=1 seek=$((DISKSIZE-1)) &> /dev/null - LODEVICE=$(losetup --find --show "$FSIMAGEP${i}.img") + LODEVICE=$(losetup --find --show "$FSIMAGEP${i}.img") || exit 99 LODEVICES="$LODEVICES $LODEVICE" if test "$i" = 0; then MOUNTDEVICE="$LODEVICE"
@@ -825,7 +826,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do "mkfs.xfs" -m crc=1 -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;; *) echo "Add appropriate mkfs command here" - exit 1 + exit 99 ;; esac BASEFILE="1.img"
@@ -931,7 +932,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do for i in $(range 0 $((NDEVICES-1)) 1); do rm "$FSIMAGEP${i}.img" done - exit 1; + exit 99; fi ;; esac
Signature · 1 line
2.27.0
PATCH v4 7/9 tests: A failure of mktemp should cause the test script to exit with code 99
In reply to Glenn WashburnA test exiting with code 99 means that there was an error in the test itself and not a failure in the thing being tested (also known as a hard error).
--- tests/ahci_test.in | 4 ++-- tests/ehci_test.in | 4 ++-- tests/gettext_strings_test.in | 2 +- tests/grub_cmd_test.in | 6 +++--- tests/grub_script_blockarg.in | 2 +- tests/ohci_test.in | 4 ++-- tests/partmap_test.in | 4 ++-- tests/pata_test.in | 4 ++-- tests/syslinux_test.in | 2 +- tests/test_sha512sum.in | 6 +++--- tests/uhci_test.in | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-)
tests/ahci_test.in +2 -2
@@ -34,8 +34,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile"
tests/ehci_test.in +2 -2
@@ -34,8 +34,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile"
tests/gettext_strings_test.in +1 -1
@@ -2,7 +2,7 @@ cd '@srcdir@' -tdir="$(mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX")" +tdir="$(mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX")" || exit 99 xgettext -f po/POTFILES.in -L C -o "$tdir/"skip.pot -x po/grub.pot --keyword=grub_util_info --keyword=grub_dprintf:1,2 --keyword=grub_register_command --keyword=grub_register_extcmd --keyword=grub_efiemu_resolve_symbol --keyword=grub_efiemu_register_symbol --keyword=grub_dl_load --keyword=grub_crypto_lookup_md_by_name --keyword=grub_crypto_lookup_cipher_by_name --keyword=grub_efiemu_resolve_symbol --keyword=alias --keyword=grub_ieee1275_get_property:2 --keyword=grub_ieee1275_find_device --keyword=grub_ieee1275_get_integer_property:2 --keyword=INIT_IEEE1275_COMMON:2 --keyword=grub_boot_time --keyword=grub_env_get --keyword=grub_env_set --keyword=grub_register_variable_hook --keyword=grub_fatal --keyword=__asm__ --keyword=volatile --keyword=__volatile__ --keyword=grub_error:2 --from-code=iso-8859-1 xgettext -f po/POTFILES.in -L C -o "$tdir/"skip2.pot -x po/grub.pot --keyword=volatile:2 --keyword=__volatile__:2 --keyword=grub_dprintf:2 --from-code=iso-8859-1
tests/grub_cmd_test.in +3 -3
@@ -2,8 +2,8 @@ set -e # create a randome file -empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -non_empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +non_empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 cat >$non_empty <<EOF hello world! EOF
@@ -21,7 +21,7 @@ else fi -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 @builddir@/grub-shell --files=$grub_empty=$empty --files=$grub_non_empty=$non_empty>$outfile <<EOF if ! test -f $grub_empty; then echo FAIL1
tests/grub_script_blockarg.in +1 -1
@@ -28,7 +28,7 @@ cmd='test_blockarg { true }' v=`echo "$cmd" | @builddir@/grub-shell` error_if_not "$v" '{ true }' -tmp=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1 +tmp=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 99 cmd='test_blockarg { test_blockarg { true } }' echo "$cmd" | @builddir@/grub-shell >$tmp error_if_not "`head -n1 $tmp|tail -n1`" '{ test_blockarg { true } }'
tests/ohci_test.in +2 -2
@@ -34,8 +34,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile"
tests/partmap_test.in +2 -2
@@ -101,8 +101,8 @@ if ! which parted >/dev/null 2>&1; then exit 77 fi -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 # # MSDOS partition types
tests/pata_test.in +2 -2
@@ -38,8 +38,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in ;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile"
tests/syslinux_test.in +1 -1
@@ -2,7 +2,7 @@ set -e -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 "@builddir@/grub-syslinux2cfg" -r "@abs_top_srcdir@/tests/syslinux/ubuntu10.04" "@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg" -o "$outfile"
tests/test_sha512sum.in +3 -3
@@ -2,7 +2,7 @@ set -e # create a randome file -file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 cat >$file <<EOF hello world! EOF
@@ -16,12 +16,12 @@ else fi -outfile1="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +outfile1="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 @builddir@/grub-shell --files=/boot/grub/file=$file >$outfile1 <<EOF sha512sum $grub_file EOF -outfile2="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +outfile2="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 sha512sum $file >$outfile2 SHA1=`cat $outfile1 | tr -d '\n' | cut -f1 -d\ `
tests/uhci_test.in +2 -2
@@ -34,8 +34,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in exit 0;; esac -imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 +imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 +outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99 echo "hello" > "$outfile"
Signature · 1 line
2.27.0
PATCH v4 8/9 tests: Exit with skipped exit code when test not performed
In reply to Glenn WashburnThese 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.
--- 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(-)
tests/ahci_test.in +4 -4
@@ -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
tests/cdboot_test.in +4 -4
@@ -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)
tests/core_compress_test.in +1 -1
@@ -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
tests/ehci_test.in +4 -4
@@ -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
tests/fddboot_test.in +8 -8
@@ -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")
tests/grub_cmd_date.in +1 -1
@@ -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)"
tests/grub_cmd_set_date.in +3 -3
@@ -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
tests/grub_cmd_sleep.in +1 -1
@@ -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.
tests/hddboot_test.in +3 -3
@@ -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)
tests/netboot_test.in +6 -6
@@ -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)
tests/ohci_test.in +4 -4
@@ -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
tests/partmap_test.in +4 -4
@@ -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 ;;
tests/pata_test.in +3 -3
@@ -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
tests/pseries_test.in +1 -1
@@ -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
tests/uhci_test.in +4 -4
@@ -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
Signature · 1 line
2.27.0
PATCH v4 9/9 tests: Use @BUILD_SHEBANG@ autoconf var instead of literal shell
In reply to Glenn WashburnThis bring this test in line with the rest of the test scripts.
--- tests/f2fs_test.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/f2fs_test.in +1 -1
@@ -1,4 +1,4 @@ -#!/bin/sh +#!@BUILD_SHEBANG@ set -e
Signature · 1 line
2.27.0