More test fixes
cover More test fixes
The first patch changes the test exit status from skipped to hard error, for tests which fail due to missing dependencies in the environment.
The second is a trivial patch to parameterize all uses of parted in the partmap_test.
Glenn
Glenn Washburn (2):
tests: Test aborts due to missing requirements should be marked as
error instead of skipped
tests: In partmap_test, use ${parted} variable when checking for
binary
tests/btrfs_test.in | 4 ++-- tests/cpio_test.in | 2 +- tests/exfat_test.in | 4 ++-- tests/ext234_test.in | 8 ++++---- tests/f2fs_test.in | 4 ++-- tests/fat_test.in | 4 ++-- tests/gzcompress_test.in | 2 +- tests/hfs_test.in | 6 +++--- tests/hfsplus_test.in | 4 ++-- tests/iso9660_test.in | 2 +- tests/jfs_test.in | 4 ++-- tests/lzocompress_test.in | 2 +- tests/minixfs_test.in | 8 ++++---- tests/nilfs2_test.in | 4 ++-- tests/ntfs_test.in | 6 +++--- tests/partmap_test.in | 6 +++--- tests/reiserfs_test.in | 4 ++-- tests/romfs_test.in | 2 +- tests/squashfs_test.in | 2 +- tests/tar_test.in | 2 +- tests/udf_test.in | 4 ++-- tests/xfs_test.in | 4 ++-- tests/xzcompress_test.in | 2 +- tests/zfs_test.in | 4 ++-- 24 files changed, 47 insertions(+), 47 deletions(-)
Signature · 1 line
2.27.0
PATCH 1/2 tests: Test aborts due to missing requirements should be marked as error instead of skipped
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, eg. 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, eg. in these cases where a missing tool prevents the running of a test.
--- tests/btrfs_test.in | 4 ++-- tests/cpio_test.in | 2 +- tests/exfat_test.in | 4 ++-- tests/ext234_test.in | 8 ++++---- tests/f2fs_test.in | 4 ++-- tests/fat_test.in | 4 ++-- tests/gzcompress_test.in | 2 +- tests/hfs_test.in | 6 +++--- tests/hfsplus_test.in | 4 ++-- tests/iso9660_test.in | 2 +- tests/jfs_test.in | 4 ++-- tests/lzocompress_test.in | 2 +- tests/minixfs_test.in | 8 ++++---- tests/nilfs2_test.in | 4 ++-- tests/ntfs_test.in | 6 +++--- tests/partmap_test.in | 2 +- tests/reiserfs_test.in | 4 ++-- tests/romfs_test.in | 2 +- tests/squashfs_test.in | 2 +- tests/tar_test.in | 2 +- tests/udf_test.in | 4 ++-- tests/xfs_test.in | 4 ++-- tests/xzcompress_test.in | 2 +- tests/zfs_test.in | 4 ++-- 24 files changed, 45 insertions(+), 45 deletions(-)
tests/btrfs_test.in +2 -2
@@ -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
tests/cpio_test.in +1 -1
@@ -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
tests/exfat_test.in +2 -2
@@ -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
tests/ext234_test.in +4 -4
@@ -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
tests/f2fs_test.in +2 -2
@@ -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
tests/fat_test.in +2 -2
@@ -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
tests/gzcompress_test.in +1 -1
@@ -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 if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)" != "Hello World" ]; then
tests/hfs_test.in +3 -3
@@ -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
tests/hfsplus_test.in +2 -2
@@ -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
tests/iso9660_test.in +1 -1
@@ -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
tests/jfs_test.in +2 -2
@@ -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
tests/lzocompress_test.in +1 -1
@@ -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 if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)" != "Hello World" ]; then
tests/minixfs_test.in +4 -4
@@ -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
tests/nilfs2_test.in +2 -2
@@ -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
tests/ntfs_test.in +3 -3
@@ -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
tests/partmap_test.in +1 -1
@@ -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
tests/reiserfs_test.in +2 -2
@@ -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
tests/romfs_test.in +1 -1
@@ -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
tests/squashfs_test.in +1 -1
@@ -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
tests/tar_test.in +1 -1
@@ -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
tests/udf_test.in +2 -2
@@ -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
tests/xfs_test.in +2 -2
@@ -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
tests/xzcompress_test.in +1 -1
@@ -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 if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)" != "Hello World" ]; then
tests/zfs_test.in +2 -2
@@ -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
Signature · 1 line
2.27.0
PATCH 2/2 tests: In partmap_test, use ${parted} variable when checking for binary
In reply to Glenn Washburn--- tests/partmap_test.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/partmap_test.in +2 -2
@@ -96,8 +96,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in ;; esac -if ! which parted >/dev/null 2>&1; then - echo "parted not installed; cannot test partmap" +if ! which ${parted} >/dev/null 2>&1; then + echo "${parted} not installed; cannot test partmap" exit 99 fi
Signature · 1 line
2.27.0
Quoted 6 lines · Glenn Washburn
The first patch changes the test exit status from skipped to hard error, for tests which fail due to missing dependencies in the environment.
The second is a trivial patch to parameterize all uses of parted in the
partmap_test.
Quoted 7 lines
Glenn
Glenn Washburn (2):
tests: Test aborts due to missing requirements should be marked as
error instead of skipped
tests: Inpartmap_test, use ${parted} variable when checking for
binary
Daniel
Hey,
Quoted 6 lines · Glenn Washburn
The first patch changes the test exit status from skipped to hard error, for tests which fail due to missing dependencies in the environment.
The second is a trivial patch to parameterize all uses of parted in the
partmap_test.
Quoted 7 lines
Glenn
Glenn Washburn (2):
tests: Test aborts due to missing requirements should be marked as
error instead of skipped
tests: Inpartmap_test, use ${parted} variable when checking for
binary
I have pushed, I suppose, all your test patches except PowerPC one and two mentioned above. Those two does not apply on top of the other test patches. May I ask you to rebase them on latest master?
Daniel
Quoted 17 lines · On Thu, 14 Oct 2021 20:36:50 +0200 Daniel Kiper <[email protected]> wrote:
Hey,
Quoted 6 lines · Glenn Washburn
The first patch changes the test exit status from skipped to hard error, for tests which fail due to missing dependencies in the environment.
The second is a trivial patch to parameterize all uses of parted in the
partmap_test.Quoted 7 lines
Glenn
Glenn Washburn (2):
tests: Test aborts due to missing requirements should be marked as
error instead of skipped
tests: Inpartmap_test, use ${parted} variable when checking for
binary
Quoted 3 lines
I have pushed, I suppose, all your test patches except PowerPC one and two mentioned above. Those two does not apply on top of the other test patches. May I ask you to rebase them on latest master?
Yes, this is due to the changes in the patch series "Various fixes/improvements for tests". Rebased and resent.
Glenn