Skip to contentSkip to conversation

tests: improvements and fixes for the test suite

PATCH In review Leo Sandoval via Grub-devel 3 participants 9 messages Sep 19, 2025 – Nov 9, 2025 PowerPC

lore
Share & tools
lore
#0 lore raw

cover tests: improvements and fixes for the test suite

With the goal to have a all-pass 'make check', these patches improve a bit tests, increasing bash verbosity and skipping those where tools are not available. Finally it removes the -w parameter on the mkfs.hfsplus.

Taking into account Andrew's series [1] and this series, I am still seeing 1 failure and 3 errors as shown below. So this work is no over but exposing these may lead to further fixes.

Finally, all these tests were done on a Fedora 42 VM. If containers are used like those at [2], I am seeing a bunch of errors due to the lack of the /dev/loop0 device but I will update the corresponding thread.

[1] https://lists.nongnu.org/archive/html/grub-devel/2025-08/msg00249.html
[2] https://lists.gnu.org/archive/html/grub-devel/2025-06/msg00139.html

=================================
GRUB 2.13: ./test-suite.log
=================================

# TOTAL: 89
# PASS:  80
# SKIP:  5
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 3

FAIL: zfs_test
==============

+ '[' x0 = x ']'
+ '[' 0 '!=' 0 ']'
+ which zpool
+ ./grub-fs-tester zfs
Defaulting to 4K blocksize (ashift=12) for '/dev/loop0'
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0128335 s, 81.7 MB/s
Device proc: Filesystem type procfs - Sector size 512B - Total size 0KiB
Device loop0: Filesystem type zfs - Label `grub_testieufiue r' - Last modification time 2025-09-19 19:30:17 Friday, UUID aeaca1e49e9167be - Sector size 512B - Total size 5939200KiB Device host: Filesystem type hostfs - Sector size 512B - Total size 0KiB
TIME FAIL
DIR          20250919193013 sdir/
DIR          20250919193013 0/
5242879      20250919193013 1.img
5242879      20250919193013 .?*\!"#%@$%&'()+ ,-.:;<=>^{_}[]`|~.
5242879      20250919193013 éàèüöäëñкирилица莭莽茝Ελληνικά
5242879      20250919193013 qwertzuiopasdfghjklyxcvbnm1234567890qwertzuiopasdfghjklyxcvbnm1234567890oiewqfiewioqoiqoiurqruewqoiuwoieoiiuewqroreqiufieiuwrnureweriuvceoiroiewqoiricdsalkcndsakfirefoiwqeoircorejwoij\
freoijojoiewjfwnfcoirenfoirefnreoifenoiwfnoi
5242879      20250919193013 CaSe
5242879      20250919193013 cAsE
1048576      20250919193013 american-english
5242879      20250919193013 sym
???????????? 20250919193013 longsym
???????????? 20250919193013 psym
5242879      20250919193013 Ελληνικάкирилица éàèüöäëñ莭莽茝
5242879      20250919193013 hard
total 25
drwxr-xr-x. 4 root root 16 Sep 19 19:30 grub fs
NAME                 SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
grub_testieufiue r  5.66G  43.8M  5.61G     0%  1.00x  ONLINE  /tmp/grub-fs-tester.20250919213012734622369.zfs.ztl/zfs_ro
FAIL zfs_test (exit status: 1)

ERROR: nilfs2_test
==================

+ '[' x0 = x ']'
+ '[' 0 '!=' 0 ']'
+ which mkfs.nilfs2
+ ./grub-fs-tester nilfs2 mount.nilfs2: preparing failed: No such device MOUNT FAILED.
ERROR nilfs2_test (exit status: 99)

ERROR: exfat_test
=================

+ '[' x0 = x ']'
+ '[' 0 '!=' 0 ']'
+ which mkfs.exfat
+ ./grub-fs-tester exfat
exfatprogs version : 1.2.8
Creating exFAT filesystem(/dev/loop0, cluster size=512)

Writing volume boot record: done
Writing backup volume boot record: done
Fat table creation: done
Allocation bitmap creation: done
Upcase table creation: done
Writing root directory entry: done
Synchronizing...

exFAT format complete!
mount: /tmp/grub-fs-tester.20250919212812088905104.exfat.WLh/exfat_rw: unknown filesystem type 'exfat-fuse'. dmesg(1) may have more information after failed mount system call.
MOUNT FAILED.
ERROR exfat_test (exit status: 99)

ERROR: zfs_zstd_test
====================

zfs zstd compression not supported; cannot test zfs zstd. ERROR zfs_zstd_test (exit status: 99)

Leo Sandoval (3):
tests: skip tests if required tools are not available
tests: include verbosity on tests.in checks
tests: remove -w param from mkfs.hfsplus

 tests/ahci_test.in                   | 2 +-
 tests/asn1_test.in                   | 2 +-
 tests/btrfs_test.in                  | 4 ++--
 tests/cdboot_test.in                 | 2 +-
 tests/core_compress_test.in          | 2 +-
 tests/cpio_test.in                   | 4 ++--
 tests/ehci_test.in                   | 2 +-
 tests/erofs_test.in                  | 4 ++--
 tests/example_scripted_test.in       | 2 +-
 tests/exfat_test.in                  | 4 ++--
 tests/ext234_test.in                 | 8 ++++----
 tests/f2fs_test.in                   | 4 ++--
 tests/fat_test.in                    | 4 ++--
 tests/fddboot_test.in                | 2 +-
 tests/file_filter_test.in            | 2 +-
 tests/grub_cmd_cryptomount.in        | 4 ++--
 tests/grub_cmd_date.in               | 2 +-
 tests/grub_cmd_regexp.in             | 2 +-
 tests/grub_cmd_set_date.in           | 2 +-
 tests/grub_cmd_sleep.in              | 2 +-
 tests/grub_cmd_test.in               | 2 +-
 tests/grub_func_test.in              | 2 +-
 tests/grub_script_blanklines.in      | 2 +-
 tests/grub_script_blockarg.in        | 2 +-
 tests/grub_script_dollar.in          | 2 +-
 tests/grub_script_expansion.in       | 2 +-
 tests/grub_script_final_semicolon.in | 2 +-
 tests/grub_script_no_commands.in     | 2 +-
 tests/gzcompress_test.in             | 4 ++--
 tests/hddboot_test.in                | 2 +-
 tests/help_test.in                   | 2 +-
 tests/hfs_test.in                    | 4 ++--
 tests/hfsplus_test.in                | 4 ++--
 tests/iso9660_test.in                | 4 ++--
 tests/jfs_test.in                    | 4 ++--
 tests/luks1_test.in                  | 6 +++---
 tests/luks2_test.in                  | 6 +++---
 tests/lzocompress_test.in            | 4 ++--
 tests/minixfs_test.in                | 4 ++--
 tests/netboot_test.in                | 2 +-
 tests/nilfs2_test.in                 | 4 ++--
 tests/ntfs_test.in                   | 6 +++---
 tests/ohci_test.in                   | 2 +-
 tests/partmap_test.in                | 4 ++--
 tests/pata_test.in                   | 2 +-
 tests/pseries_test.in                | 2 +-
 tests/reiserfs_test.in               | 4 ++--
 tests/romfs_test.in                  | 4 ++--
 tests/serial_test.in                 | 2 +-
 tests/squashfs_test.in               | 4 ++--
 tests/syslinux_test.in               | 2 +-
 tests/tar_test.in                    | 4 ++--
 tests/test_sha512sum.in              | 2 +-
 tests/tpm2_key_protector_test.in     | 4 ++--
 tests/udf_test.in                    | 4 ++--
 tests/uhci_test.in                   | 2 +-
 tests/util/grub-fs-tester.in         | 2 +-
 tests/xfs_test.in                    | 4 ++--
 tests/xzcompress_test.in             | 4 ++--
 tests/zfs_test.in                    | 4 ++--
 60 files changed, 94 insertions(+), 94 deletions(-)
Signature · 7 lines
2.50.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw

PATCH 1/3 tests: skip tests if required tools are not available

There is no reason to fail a test if the required testing tool is not present on the system, so skip the test instead of failing it.

---
 tests/btrfs_test.in              | 2 +-
 tests/cpio_test.in               | 2 +-
 tests/erofs_test.in              | 2 +-
 tests/exfat_test.in              | 2 +-
 tests/ext234_test.in             | 6 +++---
 tests/f2fs_test.in               | 2 +-
 tests/fat_test.in                | 2 +-
 tests/grub_cmd_cryptomount.in    | 4 ++--
 tests/gzcompress_test.in         | 2 +-
 tests/hfs_test.in                | 2 +-
 tests/hfsplus_test.in            | 2 +-
 tests/iso9660_test.in            | 2 +-
 tests/jfs_test.in                | 2 +-
 tests/luks1_test.in              | 4 ++--
 tests/luks2_test.in              | 4 ++--
 tests/lzocompress_test.in        | 2 +-
 tests/minixfs_test.in            | 2 +-
 tests/nilfs2_test.in             | 2 +-
 tests/ntfs_test.in               | 4 ++--
 tests/partmap_test.in            | 2 +-
 tests/reiserfs_test.in           | 2 +-
 tests/romfs_test.in              | 2 +-
 tests/squashfs_test.in           | 2 +-
 tests/tar_test.in                | 2 +-
 tests/tpm2_key_protector_test.in | 4 ++--
 tests/udf_test.in                | 2 +-
 tests/xfs_test.in                | 2 +-
 tests/xzcompress_test.in         | 2 +-
 tests/zfs_test.in                | 2 +-
 29 files changed, 36 insertions(+), 36 deletions(-)
tests/btrfs_test.in +1 -1
index 0d098c9a27..a07d2e5d18 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.btrfs >/dev/null 2>&1; then
    echo "mkfs.btrfs not installed; cannot test btrfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" btrfs
tests/cpio_test.in +1 -1
index e2e668cf6b..5742cf17b9 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which cpio >/dev/null 2>&1; then
    echo "cpio not installed; cannot test cpio."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" cpio_bin
tests/erofs_test.in +1 -1
index 51111627ac..436468dac6 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.erofs >/dev/null 2>&1; then
    echo "mkfs.erofs not installed; cannot test erofs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" erofs_compact
tests/exfat_test.in +1 -1
index 7939f25d27..7acde1977e 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.exfat >/dev/null 2>&1; then
    echo "mkfs.exfat not installed; cannot test exFAT."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" exfat
tests/ext234_test.in +3 -3
index 4df696710d..c9a8c1056a 100644
@@ -12,17 +12,17 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test ext2."
-   exit 99
+   exit 77
 fi
 
 if ! which mkfs.ext3 >/dev/null 2>&1; then
    echo "mkfs.ext3 not installed; cannot test ext3."
-   exit 99
+   exit 77
 fi
 
 if ! which mkfs.ext4 >/dev/null 2>&1; then
    echo "mkfs.ext4 not installed; cannot test ext4."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" ext2_old
tests/f2fs_test.in +1 -1
index 85f8cc8bc3..a020a0f96d 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.f2fs >/dev/null 2>&1; then
  echo "mkfs.f2fs not installed; cannot test f2fs."
- exit 99
+ exit 77
 fi
 
 
tests/fat_test.in +1 -1
index 8a2b37c5c6..77e3f16c67 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.vfat >/dev/null 2>&1; then
    echo "mkfs.vfat not installed; cannot test FAT."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" vfat16a
tests/grub_cmd_cryptomount.in +2 -2
index eaa187efad..25d7d8c368 100644
@@ -27,12 +27,12 @@ fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test cryptomount."
-   exit 99
+   exit 77
 fi
 
 if ! which mkfs.vfat >/dev/null 2>&1; then
    echo "mkfs.vfat not installed; cannot test cryptomount."
-   exit 99
+   exit 77
 fi
 
 COMMON_OPTS='${V:+--debug=$V} --cs-opts="--pbkdf-force-iterations 1000"'
tests/gzcompress_test.in +1 -1
index 8e7e6a6335..d7a594bb2c 100644
@@ -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 99
+   exit 77
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)
tests/hfs_test.in +1 -1
index 960f1cbd0f..c916b9bac9 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.hfs >/dev/null 2>&1; then
    echo "mkfs.hfs not installed; cannot test HFS."
-   exit 99
+   exit 77
 fi
 
 if ! grep -q mac_roman /proc/modules && ! modprobe mac_roman; then
tests/hfsplus_test.in +1 -1
index f727cf0e2e..cb36a3661c 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.hfsplus >/dev/null 2>&1; then
    echo "mkfs.hfsplus not installed; cannot test hfsplus."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" hfsplus
tests/iso9660_test.in +1 -1
index a1f752adfa..793664c874 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which xorriso >/dev/null 2>&1; then
    echo "xorriso not installed; cannot test iso9660."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" joliet
tests/jfs_test.in +1 -1
index d13780e230..86f9ebeaa0 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.jfs >/dev/null 2>&1; then
    echo "mkfs.jfs not installed; cannot test JFS."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" jfs
tests/luks1_test.in +2 -2
index cd28fd7149..0bfb53c98c 100644
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test luks."
-   exit 99
+   exit 77
 fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test luks."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" luks1
tests/luks2_test.in +2 -2
index 6a26ba6266..49db47380e 100644
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test luks2."
-   exit 99
+   exit 77
 fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test luks2."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" luks2
tests/lzocompress_test.in +1 -1
index 915f74bd9f..42e270df02 100644
@@ -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 99
+   exit 77
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)
tests/minixfs_test.in +1 -1
index c62f56c8b4..78577fec8c 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.minix >/dev/null 2>&1; then
    echo "mkfs.minix not installed; cannot test minixfs."
-   exit 99
+   exit 77
 fi
 
 if ! mkfs.minix -h | grep -- -v > /dev/null; then
tests/nilfs2_test.in +1 -1
index 8cc93754cd..719972f53f 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.nilfs2 >/dev/null 2>&1; then
    echo "mkfs.nilfs2 not installed; cannot test nilfs2."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" nilfs2
tests/ntfs_test.in +2 -2
index c2b08d27f8..da73c59f9e 100644
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ntfs >/dev/null 2>&1; then
    echo "mkfs.ntfs not installed; cannot test ntfs."
-   exit 99
+   exit 77
 fi
 
 if ! which setfattr >/dev/null 2>&1; then
    echo "setfattr not installed; cannot test ntfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" ntfs
tests/partmap_test.in +1 -1
index 4138e88fe9..9810cc1acc 100644
@@ -100,7 +100,7 @@ esac
 
 if ! which ${parted} >/dev/null 2>&1; then
    echo "${parted} not installed; cannot test partmap"
-   exit 99
+   exit 77
 fi
 
 imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
tests/reiserfs_test.in +1 -1
index 37226c01b7..36e34c3050 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.reiserfs >/dev/null 2>&1; then
    echo "mkfs.reiserfs not installed; cannot test reiserfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" reiserfs
tests/romfs_test.in +1 -1
index f968e9b7db..98bb50c324 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which genromfs >/dev/null 2>&1; then
    echo "genromfs not installed; cannot test romfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" romfs
tests/squashfs_test.in +1 -1
index 15e70218f2..2f044f95d9 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which mksquashfs >/dev/null 2>&1; then
    echo "mksquashfs not installed; cannot test squashfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" squash4_gzip
tests/tar_test.in +1 -1
index 97944b2433..6e2f2de8b7 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which tar >/dev/null 2>&1; then
    echo "tar not installed; cannot test tar."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" tarfs
tests/tpm2_key_protector_test.in +2 -2
index 1d80d5d260..6853434adc 100644
@@ -41,7 +41,7 @@ fi
 
 if ! command -v cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test tpm2."
-   exit 99
+   exit 77
 fi
 
 if ! grep -q tpm_vtpm_proxy /proc/modules && ! modprobe tpm_vtpm_proxy; then
@@ -51,7 +51,7 @@ fi
 
 if ! command -v swtpm >/dev/null 2>&1; then
    echo "swtpm not installed; cannot test tpm2."
-   exit 99
+   exit 77
 fi
 
 if ! command -v tpm2_startup >/dev/null 2>&1; then
tests/udf_test.in +1 -1
index 302b28ab26..8968fb1033 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkudffs >/dev/null 2>&1; then
    echo "mkudffs not installed; cannot test UDF."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" udf
tests/xfs_test.in +1 -1
index 5e029c1827..8a648aa4a7 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.xfs >/dev/null 2>&1; then
    echo "mkfs.xfs not installed; cannot test xfs."
-   exit 99
+   exit 77
 fi
 
 
tests/xzcompress_test.in +1 -1
index 6ef73e41e8..cfc6ccba66 100644
@@ -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 99
+   exit 77
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)
tests/zfs_test.in +1 -1
index 0d0a57f7d0..c8bb7937fe 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which zpool >/dev/null 2>&1; then
    echo "zpool not installed; cannot test zfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" zfs
Signature · 7 lines
2.50.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#2 lore raw

Re: [PATCH 1/3] tests: skip tests if required tools are not available

Quoted 2 lines · On Fri, 19 Sep 2025 15:45:03 -0600 Leo Sandoval via Grub-devel…

There is no reason to fail a test if the required testing tool is not present on the system, so skip the test instead of failing it.

TLDR; This should be reverted.

Wow, this got accepted too. I am disappointed.

I'm going to be blunt here. Yes, I am very opinionated on this matter and this is not personal. Also, I'm not happy this got included. I had to fend off Ubuntu wanting to make these same changes a couple years ago[1]. Unfortunately, I didn't catch this in time.

There is definitely a good reason to "fail a test if the required testing tool is not present on the system". And just because someone at some distro who got recently tasked with "fixing _their_ failing tests" can't think of a good reason doesn't mean there isn't one. In fact, it should be a huge red-flag to anyone looking at any system that they have little experience with to think "there's not reason for ___, I'm going to change that". That should be a cue to ask "hmm, why was this used?" Its quite another matter to desire to change something because one understands why its there and its limitations.

Let me copy verbatim part of the referenced reply, but I strongly encourage you to read it in its entirety as I believe all of it applies to this situation and has more in-depth explanation:

Quoted 9 lines

Let me be clear here, the purpose of GRUB tests is not so distros can run half of them after the build to see if it passes the smell test. The purpose of the tests are primarily to test regressions and functionality. To that end, the less tests that are run, the less useful the test suite. So the testing system should be implemented to try to run as many tests as possible and clearly note where tests are not being run. Of course, you're free to run tests how ever you want, but that does not mean that the GRUB project should support it, especially when its in conflict with the interests of the project.

GRUB and some distros have divergent interests. Apparently some distros want tests that do not fail and will sacrifice testing coverage in order to make that happen. I'm tempted to ask, why run the tests at all? But anyway that's their prerogative. GRUB is not telling them how they should package GRUB and what patches they should include. Neither should GRUB be accepting patches that are only in the "interests" of distros.
</rant>

Glenn

[1]
https://lore.kernel.org/grub-devel/20230719180355.73e1b480@crass-HP-ZBook-15-G2/

Quoted 448 lines
---
 tests/btrfs_test.in              | 2 +-
 tests/cpio_test.in               | 2 +-
 tests/erofs_test.in              | 2 +-
 tests/exfat_test.in              | 2 +-
 tests/ext234_test.in             | 6 +++---
 tests/f2fs_test.in               | 2 +-
 tests/fat_test.in                | 2 +-
 tests/grub_cmd_cryptomount.in    | 4 ++--
 tests/gzcompress_test.in         | 2 +-
 tests/hfs_test.in                | 2 +-
 tests/hfsplus_test.in            | 2 +-
 tests/iso9660_test.in            | 2 +-
 tests/jfs_test.in                | 2 +-
 tests/luks1_test.in              | 4 ++--
 tests/luks2_test.in              | 4 ++--
 tests/lzocompress_test.in        | 2 +-
 tests/minixfs_test.in            | 2 +-
 tests/nilfs2_test.in             | 2 +-
 tests/ntfs_test.in               | 4 ++--
 tests/partmap_test.in            | 2 +-
 tests/reiserfs_test.in           | 2 +-
 tests/romfs_test.in              | 2 +-
 tests/squashfs_test.in           | 2 +-
 tests/tar_test.in                | 2 +-
 tests/tpm2_key_protector_test.in | 4 ++--
 tests/udf_test.in                | 2 +-
 tests/xfs_test.in                | 2 +-
 tests/xzcompress_test.in         | 2 +-
 tests/zfs_test.in                | 2 +-
 29 files changed, 36 insertions(+), 36 deletions(-)
tests/btrfs_test.in +1 -1
index 0d098c9a27..a07d2e5d18 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.btrfs >/dev/null 2>&1; then
    echo "mkfs.btrfs not installed; cannot test btrfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" btrfs
tests/cpio_test.in +1 -1
index e2e668cf6b..5742cf17b9 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which cpio >/dev/null 2>&1; then
    echo "cpio not installed; cannot test cpio."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" cpio_bin
tests/erofs_test.in +1 -1
index 51111627ac..436468dac6 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.erofs >/dev/null 2>&1; then
    echo "mkfs.erofs not installed; cannot test erofs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" erofs_compact
tests/exfat_test.in +1 -1
index 7939f25d27..7acde1977e 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.exfat >/dev/null 2>&1; then
    echo "mkfs.exfat not installed; cannot test exFAT."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" exfat
tests/ext234_test.in +3 -3
index 4df696710d..c9a8c1056a 100644
@@ -12,17 +12,17 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test ext2."
-   exit 99
+   exit 77
 fi
 
 if ! which mkfs.ext3 >/dev/null 2>&1; then
    echo "mkfs.ext3 not installed; cannot test ext3."
-   exit 99
+   exit 77
 fi
 
 if ! which mkfs.ext4 >/dev/null 2>&1; then
    echo "mkfs.ext4 not installed; cannot test ext4."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" ext2_old
tests/f2fs_test.in +1 -1
index 85f8cc8bc3..a020a0f96d 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.f2fs >/dev/null 2>&1; then
  echo "mkfs.f2fs not installed; cannot test f2fs."
- exit 99
+ exit 77
 fi
 
 
tests/fat_test.in +1 -1
index 8a2b37c5c6..77e3f16c67 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.vfat >/dev/null 2>&1; then
    echo "mkfs.vfat not installed; cannot test FAT."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" vfat16a
tests/grub_cmd_cryptomount.in +2 -2
index eaa187efad..25d7d8c368 100644
@@ -27,12 +27,12 @@ fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test cryptomount."
-   exit 99
+   exit 77
 fi
 
 if ! which mkfs.vfat >/dev/null 2>&1; then
    echo "mkfs.vfat not installed; cannot test cryptomount."
-   exit 99
+   exit 77
 fi
 
 COMMON_OPTS='${V:+--debug=$V} --cs-opts="--pbkdf-force-iterations 1000"'
tests/gzcompress_test.in +1 -1
index 8e7e6a6335..d7a594bb2c 100644
@@ -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 99
+   exit 77
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)
tests/hfs_test.in +1 -1
index 960f1cbd0f..c916b9bac9 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.hfs >/dev/null 2>&1; then
    echo "mkfs.hfs not installed; cannot test HFS."
-   exit 99
+   exit 77
 fi
 
 if ! grep -q mac_roman /proc/modules && ! modprobe mac_roman; then
tests/hfsplus_test.in +1 -1
index f727cf0e2e..cb36a3661c 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.hfsplus >/dev/null 2>&1; then
    echo "mkfs.hfsplus not installed; cannot test hfsplus."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" hfsplus
tests/iso9660_test.in +1 -1
index a1f752adfa..793664c874 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which xorriso >/dev/null 2>&1; then
    echo "xorriso not installed; cannot test iso9660."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" joliet
tests/jfs_test.in +1 -1
index d13780e230..86f9ebeaa0 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.jfs >/dev/null 2>&1; then
    echo "mkfs.jfs not installed; cannot test JFS."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" jfs
tests/luks1_test.in +2 -2
index cd28fd7149..0bfb53c98c 100644
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test luks."
-   exit 99
+   exit 77
 fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test luks."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" luks1
tests/luks2_test.in +2 -2
index 6a26ba6266..49db47380e 100644
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test luks2."
-   exit 99
+   exit 77
 fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test luks2."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" luks2
tests/lzocompress_test.in +1 -1
index 915f74bd9f..42e270df02 100644
@@ -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 99
+   exit 77
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)
tests/minixfs_test.in +1 -1
index c62f56c8b4..78577fec8c 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.minix >/dev/null 2>&1; then
    echo "mkfs.minix not installed; cannot test minixfs."
-   exit 99
+   exit 77
 fi
 
 if ! mkfs.minix -h | grep -- -v > /dev/null; then
tests/nilfs2_test.in +1 -1
index 8cc93754cd..719972f53f 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.nilfs2 >/dev/null 2>&1; then
    echo "mkfs.nilfs2 not installed; cannot test nilfs2."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" nilfs2
tests/ntfs_test.in +2 -2
index c2b08d27f8..da73c59f9e 100644
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ntfs >/dev/null 2>&1; then
    echo "mkfs.ntfs not installed; cannot test ntfs."
-   exit 99
+   exit 77
 fi
 
 if ! which setfattr >/dev/null 2>&1; then
    echo "setfattr not installed; cannot test ntfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" ntfs
tests/partmap_test.in +1 -1
index 4138e88fe9..9810cc1acc 100644
@@ -100,7 +100,7 @@ esac
 
 if ! which ${parted} >/dev/null 2>&1; then
    echo "${parted} not installed; cannot test partmap"
-   exit 99
+   exit 77
 fi
 
 imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
tests/reiserfs_test.in +1 -1
index 37226c01b7..36e34c3050 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.reiserfs >/dev/null 2>&1; then
    echo "mkfs.reiserfs not installed; cannot test reiserfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" reiserfs
tests/romfs_test.in +1 -1
index f968e9b7db..98bb50c324 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which genromfs >/dev/null 2>&1; then
    echo "genromfs not installed; cannot test romfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" romfs
tests/squashfs_test.in +1 -1
index 15e70218f2..2f044f95d9 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which mksquashfs >/dev/null 2>&1; then
    echo "mksquashfs not installed; cannot test squashfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" squash4_gzip
tests/tar_test.in +1 -1
index 97944b2433..6e2f2de8b7 100644
@@ -4,7 +4,7 @@ set -e
 
 if ! which tar >/dev/null 2>&1; then
    echo "tar not installed; cannot test tar."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" tarfs
tests/tpm2_key_protector_test.in +2 -2
index 1d80d5d260..6853434adc 100644
@@ -41,7 +41,7 @@ fi
 
 if ! command -v cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test tpm2."
-   exit 99
+   exit 77
 fi
 
 if ! grep -q tpm_vtpm_proxy /proc/modules && ! modprobe tpm_vtpm_proxy; then
@@ -51,7 +51,7 @@ fi
 
 if ! command -v swtpm >/dev/null 2>&1; then
    echo "swtpm not installed; cannot test tpm2."
-   exit 99
+   exit 77
 fi
 
 if ! command -v tpm2_startup >/dev/null 2>&1; then
tests/udf_test.in +1 -1
index 302b28ab26..8968fb1033 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkudffs >/dev/null 2>&1; then
    echo "mkudffs not installed; cannot test UDF."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" udf
tests/xfs_test.in +1 -1
index 5e029c1827..8a648aa4a7 100644
@@ -12,7 +12,7 @@ fi
 
 if ! which mkfs.xfs >/dev/null 2>&1; then
    echo "mkfs.xfs not installed; cannot test xfs."
-   exit 99
+   exit 77
 fi
 
 
tests/xzcompress_test.in +1 -1
index 6ef73e41e8..cfc6ccba66 100644
@@ -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 99
+   exit 77
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)
tests/zfs_test.in +0 -0
index 0d0a57f7d0..c8bb7937fe 100644

tests/zfs_test.in fi · line 18

Quoted 8 lines
tests/zfs_test.in +1 -1
@@ -12,7 +12,7 @@ fi
 
 if ! which zpool >/dev/null 2>&1; then
    echo "zpool not installed; cannot test zfs."
-   exit 99
+   exit 77
 fi
 
 "@builddir@/grub-fs-tester" zfs

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw

PATCH 2/3 tests: include verbosity on tests.in checks

In reply to Leo Sandoval via Grub-devel

In this case, it does not hurt to increase bash execution verbosity so we can get more insight in case of issues.

---
 tests/ahci_test.in                   | 2 +-
 tests/asn1_test.in                   | 2 +-
 tests/btrfs_test.in                  | 2 +-
 tests/cdboot_test.in                 | 2 +-
 tests/core_compress_test.in          | 2 +-
 tests/cpio_test.in                   | 2 +-
 tests/ehci_test.in                   | 2 +-
 tests/erofs_test.in                  | 2 +-
 tests/example_scripted_test.in       | 2 +-
 tests/exfat_test.in                  | 2 +-
 tests/ext234_test.in                 | 2 +-
 tests/f2fs_test.in                   | 2 +-
 tests/fat_test.in                    | 2 +-
 tests/fddboot_test.in                | 2 +-
 tests/file_filter_test.in            | 2 +-
 tests/grub_cmd_date.in               | 2 +-
 tests/grub_cmd_regexp.in             | 2 +-
 tests/grub_cmd_set_date.in           | 2 +-
 tests/grub_cmd_sleep.in              | 2 +-
 tests/grub_cmd_test.in               | 2 +-
 tests/grub_func_test.in              | 2 +-
 tests/grub_script_blanklines.in      | 2 +-
 tests/grub_script_blockarg.in        | 2 +-
 tests/grub_script_dollar.in          | 2 +-
 tests/grub_script_expansion.in       | 2 +-
 tests/grub_script_final_semicolon.in | 2 +-
 tests/grub_script_no_commands.in     | 2 +-
 tests/gzcompress_test.in             | 2 +-
 tests/hddboot_test.in                | 2 +-
 tests/help_test.in                   | 2 +-
 tests/hfs_test.in                    | 2 +-
 tests/hfsplus_test.in                | 2 +-
 tests/iso9660_test.in                | 2 +-
 tests/jfs_test.in                    | 2 +-
 tests/luks1_test.in                  | 2 +-
 tests/luks2_test.in                  | 2 +-
 tests/lzocompress_test.in            | 2 +-
 tests/minixfs_test.in                | 2 +-
 tests/netboot_test.in                | 2 +-
 tests/nilfs2_test.in                 | 2 +-
 tests/ntfs_test.in                   | 2 +-
 tests/ohci_test.in                   | 2 +-
 tests/partmap_test.in                | 2 +-
 tests/pata_test.in                   | 2 +-
 tests/pseries_test.in                | 2 +-
 tests/reiserfs_test.in               | 2 +-
 tests/romfs_test.in                  | 2 +-
 tests/serial_test.in                 | 2 +-
 tests/squashfs_test.in               | 2 +-
 tests/syslinux_test.in               | 2 +-
 tests/tar_test.in                    | 2 +-
 tests/test_sha512sum.in              | 2 +-
 tests/udf_test.in                    | 2 +-
 tests/uhci_test.in                   | 2 +-
 tests/xfs_test.in                    | 2 +-
 tests/xzcompress_test.in             | 2 +-
 tests/zfs_test.in                    | 2 +-
 57 files changed, 57 insertions(+), 57 deletions(-)
tests/ahci_test.in +1 -1
index 70646a24ec..ffb7cf48d6 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/asn1_test.in +1 -1
index 8f18ee6bb6..a9b82dd0e4 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/btrfs_test.in +1 -1
index a07d2e5d18..84cfd95d8e 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/cdboot_test.in +1 -1
index f00cdec587..ec8943b16f 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/core_compress_test.in +1 -1
index 24a811418a..0b97c9557c 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/cpio_test.in +1 -1
index 5742cf17b9..fb468564a9 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which cpio >/dev/null 2>&1; then
    echo "cpio not installed; cannot test cpio."
tests/ehci_test.in +1 -1
index bf823a5de7..7aff6df941 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/erofs_test.in +1 -1
index 436468dac6..e3f3ea5eb4 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/example_scripted_test.in +1 -1
index 783b7f1385..0f32c79fad 100644
@@ -1,4 +1,4 @@
 #!@BUILD_SHEBANG@
-set -e
+set -ex
 
 true
tests/exfat_test.in +1 -1
index 7acde1977e..ae2b209a1e 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/ext234_test.in +1 -1
index c9a8c1056a..2f8aafc9c6 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/f2fs_test.in +1 -1
index a020a0f96d..4d16c2fabe 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
  EUID=`id -u`
tests/fat_test.in +1 -1
index 77e3f16c67..0e4b1ebaed 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/fddboot_test.in +1 -1
index 6ef49efcb2..74d2bcd874 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/file_filter_test.in +1 -1
index ed6abcb5af..c2748621f6 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/grub_cmd_date.in +1 -1
index 4903ad6cc3..359c624fce 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/grub_cmd_regexp.in +1 -1
index 6520bd6d79..13633bb052 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # Run GRUB script in a Qemu instance
 # Copyright (C) 2010  Free Software Foundation, Inc.
tests/grub_cmd_set_date.in +1 -1
index 17673cd8aa..5572535fa4 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/grub_cmd_sleep.in +1 -1
index 1a57fb388c..2da9d722ec 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/grub_cmd_test.in +1 -1
index 043c3a634b..a78a5d6ee3 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # create a randome file
 empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
tests/grub_func_test.in +1 -1
index 1fa3c43527..6065ff6df1 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/grub_script_blanklines.in +1 -1
index bd8735491b..9b84782c38 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 @builddir@/grub-script-check <<EOF
 # comment 1
tests/grub_script_blockarg.in +1 -1
index a91c7ca82a..1cc7c1a327 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # Run GRUB script in a Qemu instance
 # Copyright (C) 2010  Free Software Foundation, Inc.
tests/grub_script_dollar.in +1 -1
index 392fe2e7ab..fd8e5d8a42 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 @builddir@/grub-script-check << EOF
 echo "\\\$"
tests/grub_script_expansion.in +1 -1
index 98d5a9068a..452f8334ae 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # Run GRUB script in a Qemu instance
 # Copyright (C) 2010  Free Software Foundation, Inc.
tests/grub_script_final_semicolon.in +1 -1
index f17a9bf95e..6e15b95de6 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 @builddir@/grub-script-check <<EOF
 echo one;
tests/grub_script_no_commands.in +1 -1
index 996bb18104..b401f8feb4 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # grub-script-check refuses to pass a file with no commands; this usually
 # indicates a bug in the code generating that file.
tests/gzcompress_test.in +1 -1
index d7a594bb2c..471b6537ed 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/hddboot_test.in +1 -1
index 764e0da1c1..76704c379f 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/help_test.in +1 -1
index 9c8ca52c86..ca3d7f31b9 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/hfs_test.in +1 -1
index c916b9bac9..fc0e0e75c6 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/hfsplus_test.in +1 -1
index cb36a3661c..7918a68bbd 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/iso9660_test.in +1 -1
index 793664c874..7a6816f94a 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which xorriso >/dev/null 2>&1; then
    echo "xorriso not installed; cannot test iso9660."
tests/jfs_test.in +1 -1
index 86f9ebeaa0..b1c18e9b16 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/luks1_test.in +1 -1
index 0bfb53c98c..3344746c10 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/luks2_test.in +1 -1
index 49db47380e..5368698f82 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/lzocompress_test.in +1 -1
index 42e270df02..50145dd0cd 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/minixfs_test.in +1 -1
index 78577fec8c..0d28a72261 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/netboot_test.in +1 -1
index 510c9c34ba..b8a5f9abb8 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/nilfs2_test.in +1 -1
index 719972f53f..84b8b1a0b6 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/ntfs_test.in +1 -1
index da73c59f9e..5b1bebe16c 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/ohci_test.in +1 -1
index a40d3bc0a0..1652b7efc2 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/partmap_test.in +1 -1
index 9810cc1acc..8e12cf7ec4 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # Copyright (C) 2010  Free Software Foundation, Inc.
 #
tests/pata_test.in +1 -1
index 4d0e7d5731..6c2fa43ddb 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/pseries_test.in +1 -1
index 9b4090cf50..a1dd1670a0 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/reiserfs_test.in +1 -1
index 36e34c3050..48d3ab4cc6 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/romfs_test.in +1 -1
index 98bb50c324..2c66cde345 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which genromfs >/dev/null 2>&1; then
    echo "genromfs not installed; cannot test romfs."
tests/serial_test.in +1 -1
index 48655d4b97..331c3c3ad8 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/squashfs_test.in +1 -1
index 2f044f95d9..b973f7bac0 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which mksquashfs >/dev/null 2>&1; then
    echo "mksquashfs not installed; cannot test squashfs."
tests/syslinux_test.in +1 -1
index 44d3cdf7a5..e81c153107 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
 
tests/tar_test.in +1 -1
index 6e2f2de8b7..eafb6649dd 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which tar >/dev/null 2>&1; then
    echo "tar not installed; cannot test tar."
tests/test_sha512sum.in +1 -1
index b2bd89609c..3866f40c8d 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # create a randome file
 file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
tests/udf_test.in +1 -1
index 8968fb1033..b84d0b6746 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/uhci_test.in +1 -1
index de199a2810..46de98d921 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/xfs_test.in +1 -1
index 8a648aa4a7..d6b3ab908a 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/xzcompress_test.in +1 -1
index cfc6ccba66..f0ac52e2d0 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/zfs_test.in +1 -1
index c8bb7937fe..e1cb766a5d 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
Signature · 7 lines
2.50.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#4 lore raw

Re: [PATCH 2/3] tests: include verbosity on tests.in checks

Quoted 2 lines · On Fri, 19 Sep 2025 15:45:04 -0600 Leo Sandoval via Grub-devel…

In this case, it does not hurt to increase bash execution verbosity so we can get more insight in case of issues.

I also don't think this is a good change either, and would prefer it be reverted. But I'm less opinionated on it compared to the other two, which should certainly be reverted.

I also have had the problem that this is trying to solve. I've written a set of scripts to run the GRUB tests that allow for enabling shell tracing, without needing to make this change. Instead of this change, I'd be more in favor of one that allows conditional enabling of tracing, with tracing off by default. This could be as simple as changing every test file to have something like [ "x${SHELL_TRACE}" = "xy" ] && set -x. I'd prefer an even less intrusive change, like adding that condition in a log compiler (which is what my scripts do). As it is, this change feels a bit like a sledge hammer.

Glenn

Quoted 736 lines
---
 tests/ahci_test.in                   | 2 +-
 tests/asn1_test.in                   | 2 +-
 tests/btrfs_test.in                  | 2 +-
 tests/cdboot_test.in                 | 2 +-
 tests/core_compress_test.in          | 2 +-
 tests/cpio_test.in                   | 2 +-
 tests/ehci_test.in                   | 2 +-
 tests/erofs_test.in                  | 2 +-
 tests/example_scripted_test.in       | 2 +-
 tests/exfat_test.in                  | 2 +-
 tests/ext234_test.in                 | 2 +-
 tests/f2fs_test.in                   | 2 +-
 tests/fat_test.in                    | 2 +-
 tests/fddboot_test.in                | 2 +-
 tests/file_filter_test.in            | 2 +-
 tests/grub_cmd_date.in               | 2 +-
 tests/grub_cmd_regexp.in             | 2 +-
 tests/grub_cmd_set_date.in           | 2 +-
 tests/grub_cmd_sleep.in              | 2 +-
 tests/grub_cmd_test.in               | 2 +-
 tests/grub_func_test.in              | 2 +-
 tests/grub_script_blanklines.in      | 2 +-
 tests/grub_script_blockarg.in        | 2 +-
 tests/grub_script_dollar.in          | 2 +-
 tests/grub_script_expansion.in       | 2 +-
 tests/grub_script_final_semicolon.in | 2 +-
 tests/grub_script_no_commands.in     | 2 +-
 tests/gzcompress_test.in             | 2 +-
 tests/hddboot_test.in                | 2 +-
 tests/help_test.in                   | 2 +-
 tests/hfs_test.in                    | 2 +-
 tests/hfsplus_test.in                | 2 +-
 tests/iso9660_test.in                | 2 +-
 tests/jfs_test.in                    | 2 +-
 tests/luks1_test.in                  | 2 +-
 tests/luks2_test.in                  | 2 +-
 tests/lzocompress_test.in            | 2 +-
 tests/minixfs_test.in                | 2 +-
 tests/netboot_test.in                | 2 +-
 tests/nilfs2_test.in                 | 2 +-
 tests/ntfs_test.in                   | 2 +-
 tests/ohci_test.in                   | 2 +-
 tests/partmap_test.in                | 2 +-
 tests/pata_test.in                   | 2 +-
 tests/pseries_test.in                | 2 +-
 tests/reiserfs_test.in               | 2 +-
 tests/romfs_test.in                  | 2 +-
 tests/serial_test.in                 | 2 +-
 tests/squashfs_test.in               | 2 +-
 tests/syslinux_test.in               | 2 +-
 tests/tar_test.in                    | 2 +-
 tests/test_sha512sum.in              | 2 +-
 tests/udf_test.in                    | 2 +-
 tests/uhci_test.in                   | 2 +-
 tests/xfs_test.in                    | 2 +-
 tests/xzcompress_test.in             | 2 +-
 tests/zfs_test.in                    | 2 +-
 57 files changed, 57 insertions(+), 57 deletions(-)
tests/ahci_test.in +1 -1
index 70646a24ec..ffb7cf48d6 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/asn1_test.in +1 -1
index 8f18ee6bb6..a9b82dd0e4 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/btrfs_test.in +1 -1
index a07d2e5d18..84cfd95d8e 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/cdboot_test.in +1 -1
index f00cdec587..ec8943b16f 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/core_compress_test.in +1 -1
index 24a811418a..0b97c9557c 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/cpio_test.in +1 -1
index 5742cf17b9..fb468564a9 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which cpio >/dev/null 2>&1; then
    echo "cpio not installed; cannot test cpio."
tests/ehci_test.in +1 -1
index bf823a5de7..7aff6df941 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/erofs_test.in +1 -1
index 436468dac6..e3f3ea5eb4 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/example_scripted_test.in +1 -1
index 783b7f1385..0f32c79fad 100644
@@ -1,4 +1,4 @@
 #!@BUILD_SHEBANG@
-set -e
+set -ex
 
 true
tests/exfat_test.in +1 -1
index 7acde1977e..ae2b209a1e 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/ext234_test.in +1 -1
index c9a8c1056a..2f8aafc9c6 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/f2fs_test.in +1 -1
index a020a0f96d..4d16c2fabe 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
  EUID=`id -u`
tests/fat_test.in +1 -1
index 77e3f16c67..0e4b1ebaed 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/fddboot_test.in +1 -1
index 6ef49efcb2..74d2bcd874 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/file_filter_test.in +1 -1
index ed6abcb5af..c2748621f6 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/grub_cmd_date.in +1 -1
index 4903ad6cc3..359c624fce 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/grub_cmd_regexp.in +1 -1
index 6520bd6d79..13633bb052 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # Run GRUB script in a Qemu instance
 # Copyright (C) 2010  Free Software Foundation, Inc.
tests/grub_cmd_set_date.in +1 -1
index 17673cd8aa..5572535fa4 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/grub_cmd_sleep.in +1 -1
index 1a57fb388c..2da9d722ec 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/grub_cmd_test.in +1 -1
index 043c3a634b..a78a5d6ee3 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # create a randome file
 empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
tests/grub_func_test.in +1 -1
index 1fa3c43527..6065ff6df1 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/grub_script_blanklines.in +1 -1
index bd8735491b..9b84782c38 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 @builddir@/grub-script-check <<EOF
 # comment 1
tests/grub_script_blockarg.in +1 -1
index a91c7ca82a..1cc7c1a327 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # Run GRUB script in a Qemu instance
 # Copyright (C) 2010  Free Software Foundation, Inc.
tests/grub_script_dollar.in +1 -1
index 392fe2e7ab..fd8e5d8a42 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 @builddir@/grub-script-check << EOF
 echo "\\\$"
tests/grub_script_expansion.in +1 -1
index 98d5a9068a..452f8334ae 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # Run GRUB script in a Qemu instance
 # Copyright (C) 2010  Free Software Foundation, Inc.
tests/grub_script_final_semicolon.in +1 -1
index f17a9bf95e..6e15b95de6 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 @builddir@/grub-script-check <<EOF
 echo one;
tests/grub_script_no_commands.in +1 -1
index 996bb18104..b401f8feb4 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # grub-script-check refuses to pass a file with no commands; this usually
 # indicates a bug in the code generating that file.
tests/gzcompress_test.in +1 -1
index d7a594bb2c..471b6537ed 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/hddboot_test.in +1 -1
index 764e0da1c1..76704c379f 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/help_test.in +1 -1
index 9c8ca52c86..ca3d7f31b9 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 . "@builddir@/grub-core/modinfo.sh"
 
tests/hfs_test.in +1 -1
index c916b9bac9..fc0e0e75c6 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/hfsplus_test.in +1 -1
index cb36a3661c..7918a68bbd 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/iso9660_test.in +1 -1
index 793664c874..7a6816f94a 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which xorriso >/dev/null 2>&1; then
    echo "xorriso not installed; cannot test iso9660."
tests/jfs_test.in +1 -1
index 86f9ebeaa0..b1c18e9b16 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/luks1_test.in +1 -1
index 0bfb53c98c..3344746c10 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/luks2_test.in +1 -1
index 49db47380e..5368698f82 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/lzocompress_test.in +1 -1
index 42e270df02..50145dd0cd 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/minixfs_test.in +1 -1
index 78577fec8c..0d28a72261 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/netboot_test.in +1 -1
index 510c9c34ba..b8a5f9abb8 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/nilfs2_test.in +1 -1
index 719972f53f..84b8b1a0b6 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/ntfs_test.in +1 -1
index da73c59f9e..5b1bebe16c 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/ohci_test.in +1 -1
index a40d3bc0a0..1652b7efc2 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/partmap_test.in +1 -1
index 9810cc1acc..8e12cf7ec4 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # Copyright (C) 2010  Free Software Foundation, Inc.
 #
tests/pata_test.in +1 -1
index 4d0e7d5731..6c2fa43ddb 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/pseries_test.in +1 -1
index 9b4090cf50..a1dd1670a0 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/reiserfs_test.in +1 -1
index 36e34c3050..48d3ab4cc6 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/romfs_test.in +1 -1
index 98bb50c324..2c66cde345 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which genromfs >/dev/null 2>&1; then
    echo "genromfs not installed; cannot test romfs."
tests/serial_test.in +1 -1
index 48655d4b97..331c3c3ad8 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/squashfs_test.in +1 -1
index 2f044f95d9..b973f7bac0 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which mksquashfs >/dev/null 2>&1; then
    echo "mksquashfs not installed; cannot test squashfs."
tests/syslinux_test.in +1 -1
index 44d3cdf7a5..e81c153107 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
 
tests/tar_test.in +1 -1
index 6e2f2de8b7..eafb6649dd 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if ! which tar >/dev/null 2>&1; then
    echo "tar not installed; cannot test tar."
tests/test_sha512sum.in +1 -1
index b2bd89609c..3866f40c8d 100644
@@ -1,5 +1,5 @@
 #! @BUILD_SHEBANG@
-set -e
+set -ex
 
 # create a randome file
 file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
tests/udf_test.in +1 -1
index 8968fb1033..b84d0b6746 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/uhci_test.in +1 -1
index de199a2810..46de98d921 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/xfs_test.in +1 -1
index 8a648aa4a7..d6b3ab908a 100644
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`
tests/xzcompress_test.in +1 -1
index cfc6ccba66..f0ac52e2d0 100644
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
-set -e
+set -ex
 grubshell=@builddir@/grub-shell
 
 . "@builddir@/grub-core/modinfo.sh"
tests/zfs_test.in +0 -0
index c8bb7937fe..e1cb766a5d 100644

tests/zfs_test.in line 6

Quoted 7 lines
tests/zfs_test.in +1 -1
@@ -1,6 +1,6 @@
 #!@BUILD_SHEBANG@
 
-set -e
+set -ex
 
 if [ "x$EUID" = "x" ] ; then
   EUID=`id -u`

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#5 lore raw

PATCH 3/3 tests: remove -w param from mkfs.hfsplus

In reply to Leo Sandoval via Grub-devel

Apparently the man page is outdated because the option '-w' is shown but not on 'mkfs.hfsplus --usage'. According to Gemini

The -w option is usedto add an HFS wrapper around an HFS Plus file system, which is sometimes required for compatibility with older Mac OS 9 systems. However, this is not a standard or commonly used option and may not be available in all versions of the hfsprogs package, especially on Linux.

---
 tests/util/grub-fs-tester.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/util/grub-fs-tester.in +1 -1
index cac58dafa8..599b5f1762 100644
@@ -727,7 +727,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		    "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
 		    dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8 ;;
 		x"hfsplus_wrap")
-		    "mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
+		    "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
 		    dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8
 		    MOUNTFS="hfsplus";;
 		x"hfsplus_casesens")
Signature · 7 lines
2.50.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#6 lore raw

Re: [PATCH 3/3] tests: remove -w param from mkfs.hfsplus

Quoted 8 lines · On Fri, 19 Sep 2025 15:45:05 -0600 Leo Sandoval via Grub-devel…

Apparently the man page is outdated because the option '-w' is shown but not on 'mkfs.hfsplus --usage'. According to Gemini

The -w option is usedto add an HFS wrapper around an HFS Plus file system, which is sometimes required for compatibility with older Mac OS 9 systems. However, this is not a standard or commonly used option and may not be available in all versions of the hfsprogs package, especially on Linux.

So? This is not a reason to not test for something. The tests are meant to _test_ GRUB, not to be neutered the lowest common denominator so they can be run successfully on every OS. Unless something has changed recently, my understanding is that the tests are only officially supported on Debian. Even on Debian there are issues, because they neutered their hfs-progs so we can't test hfs fully on newer Debians.

Quoted 11 lines
---
 tests/util/grub-fs-tester.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/util/grub-fs-tester.in +0 -0
index cac58dafa8..599b5f1762 100644

tests/util/grub-fs-tester.in for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do · line 730

Quoted 5 lines
tests/util/grub-fs-tester.in +1 -1
@@ -727,7 +727,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		    "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
 		    dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8 ;;
 		x"hfsplus_wrap")
-		    "mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
+		    "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"

This is not a good change. Notice that now the test is the same as the one above. This test specifically tests that an HFS+ wrapped like this passes the filesystem test. That is that GRUB supports these types of filesystems. This change indicates that the tests are testing such a scenario, but is actually testing something else. So either we remove this test or we continue testing for this. But definitely do not pretend to test for something and do something else.

I believe this still works in Debian, so perhaps Redhat should include Debian's changes that make -w work.

One idea, which has its short comings, would be to create an fs image and use that, instead of requiring testing environments to build their own image.

Glenn

tests/util/grub-fs-tester.in for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do · line 733

Quoted 3 lines
tests/util/grub-fs-tester.in +0 -0
 		    dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8
 		    MOUNTFS="hfsplus";;
 		x"hfsplus_casesens")

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#7 lore raw

Re: [PATCH 3/3] tests: remove -w param from mkfs.hfsplus

Quoted 44 lines · On Sat, 8 Nov 2025 21:34:27 -0600 Glenn Washburn <[email protected]>…
Quoted 8 lines · On Fri, 19 Sep 2025 15:45:05 -0600 Leo Sandoval via Grub-devel…

Apparently the man page is outdated because the option '-w' is shown but not on 'mkfs.hfsplus --usage'. According to Gemini

The -w option is usedto add an HFS wrapper around an HFS Plus file system, which is sometimes required for compatibility with older Mac OS 9 systems. However, this is not a standard or commonly used option and may not be available in all versions of the hfsprogs package, especially on Linux.

So? This is not a reason to not test for something. The tests are meant to _test_ GRUB, not to be neutered the lowest common denominator so they can be run successfully on every OS. Unless something has changed recently, my understanding is that the tests are only officially supported on Debian. Even on Debian there are issues, because they neutered their hfs-progs so we can't test hfs fully on newer Debians.

Quoted 11 lines
---
 tests/util/grub-fs-tester.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/util/grub-fs-tester.in +0 -0
index cac58dafa8..599b5f1762 100644

tests/util/grub-fs-tester.in for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do · line 730

Quoted 5 lines
tests/util/grub-fs-tester.in +1 -1
@@ -727,7 +727,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		    "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
 		    dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8 ;;
 		x"hfsplus_wrap")
-		    "mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
+		    "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"

This is not a good change. Notice that now the test is the same as the one above. This test specifically tests that an HFS+ wrapped like this passes the filesystem test. That is that GRUB supports these types of filesystems. This change indicates that the tests are testing such a scenario, but is actually testing something else. So either we remove this test or we continue testing for this. But definitely do not pretend to test for something and do something else.

Quoted 6 lines

I believe this still works in Debian, so perhaps Redhat should include Debian's changes that make -w work.

One idea, which has its short comings, would be to create an fs image and use that, instead of requiring testing environments to build their own image.

Yikes! Too late, already been committed. This should be reverted, as it works on Debian 11, which is officially supported. I'd welcome patches that improve this for other OSes/distros, without removing the test.

Glenn

Quoted 4 lines

tests/util/grub-fs-tester.in for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do · line 733

Quoted 4 lines
tests/util/grub-fs-tester.in +0 -0
 		    dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468)) conv=notrunc count=8
 		    MOUNTFS="hfsplus";;
 		x"hfsplus_casesens")

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#8 lore raw
In reply to Leo Sandoval via Grub-devel
Quoted 103 lines · Leo Sandoval via Grub-devel

With the goal to have a all-pass 'make check', these patches improve a bit tests, increasing bash verbosity and skipping those where tools are not available. Finally it removes the -w parameter on the mkfs.hfsplus.

Taking into account Andrew's series [1] and this series, I am still seeing 1 failure and 3 errors as shown below. So this work is no over but exposing these may lead to further fixes.

Finally, all these tests were done on a Fedora 42 VM. If containers are used like those at [2], I am seeing a bunch of errors due to the lack of the /dev/loop0 device but I will update the corresponding thread.

[1] https://lists.nongnu.org/archive/html/grub-devel/2025-08/msg00249.html
[2] https://lists.gnu.org/archive/html/grub-devel/2025-06/msg00139.html

=================================
GRUB 2.13: ./test-suite.log
=================================

# TOTAL: 89
# PASS:  80
# SKIP:  5
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 3

FAIL: zfs_test
==============

+ '[' x0 = x ']'
+ '[' 0 '!=' 0 ']'
+ which zpool
+ ./grub-fs-tester zfs
Defaulting to 4K blocksize (ashift=12) for '/dev/loop0'
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0128335 s, 81.7 MB/s
Device proc: Filesystem type procfs - Sector size 512B - Total size 0KiB
Device loop0: Filesystem type zfs - Label `grub_testieufiue r' - Last modification time 2025-09-19 19:30:17 Friday, UUID aeaca1e49e9167be - Sector size 512B - Total size 5939200KiB Device host: Filesystem type hostfs - Sector size 512B - Total size 0KiB
TIME FAIL
DIR          20250919193013 sdir/
DIR          20250919193013 0/
5242879      20250919193013 1.img
5242879      20250919193013 .?*\!"#%@$%&'()+ ,-.:;<=>^{_}[]`|~.
5242879      20250919193013 éàèüöäëñкирилица莭莽茝Ελληνικά
5242879      20250919193013 qwertzuiopasdfghjklyxcvbnm1234567890qwertzuiopasdfghjklyxcvbnm1234567890oiewqfiewioqoiqoiurqruewqoiuwoieoiiuewqroreqiufieiuwrnureweriuvceoiroiewqoiricdsalkcndsakfirefoiwqeoircorejwoij\
freoijojoiewjfwnfcoirenfoirefnreoifenoiwfnoi
5242879      20250919193013 CaSe
5242879      20250919193013 cAsE
1048576      20250919193013 american-english
5242879      20250919193013 sym
???????????? 20250919193013 longsym
???????????? 20250919193013 psym
5242879      20250919193013 Ελληνικάкирилица éàèüöäëñ莭莽茝
5242879      20250919193013 hard
total 25
drwxr-xr-x. 4 root root 16 Sep 19 19:30 grub fs
NAME                 SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
grub_testieufiue r  5.66G  43.8M  5.61G     0%  1.00x  ONLINE  /tmp/grub-fs-tester.20250919213012734622369.zfs.ztl/zfs_ro
FAIL zfs_test (exit status: 1)

ERROR: nilfs2_test
==================

+ '[' x0 = x ']'
+ '[' 0 '!=' 0 ']'
+ which mkfs.nilfs2
+ ./grub-fs-tester nilfs2 mount.nilfs2: preparing failed: No such device MOUNT FAILED.
ERROR nilfs2_test (exit status: 99)

ERROR: exfat_test
=================

+ '[' x0 = x ']'
+ '[' 0 '!=' 0 ']'
+ which mkfs.exfat
+ ./grub-fs-tester exfat
exfatprogs version : 1.2.8
Creating exFAT filesystem(/dev/loop0, cluster size=512)

Writing volume boot record: done
Writing backup volume boot record: done
Fat table creation: done
Allocation bitmap creation: done
Upcase table creation: done
Writing root directory entry: done
Synchronizing...

exFAT format complete!
mount: /tmp/grub-fs-tester.20250919212812088905104.exfat.WLh/exfat_rw: unknown filesystem type 'exfat-fuse'. dmesg(1) may have more information after failed mount system call.
MOUNT FAILED.
ERROR exfat_test (exit status: 99)

ERROR: zfs_zstd_test
====================

Quoted 8 lines

zfs zstd compression not supported; cannot test zfs zstd. ERROR zfs_zstd_test (exit status: 99)

Leo Sandoval (3):
tests: skip tests if required tools are not available
tests: include verbosity on tests.in checks
tests: remove -w param from mkfs.hfsplus

For all patches Reviewed-by: Daniel Kiper <[email protected]>...

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel