Skip to contentSkip to conversation

Revert imprudent test changes

PATCH In review Glenn Washburn 3 participants 5 messages Nov 19, 2025 – Nov 20, 2025

lore
Share & tools
lore
#0 lore raw

cover Revert imprudent test changes

The two commit reverted in this series degrade the GRUB tests and must be reverted. The goal of any testing system for a project should be to find bugs. That goal is not served by reducing test coverage, which is what both of those commits did. Just because some (influential) users have a different objective, such as making the test harness not error so they can check the "GRUB tests pass" box after building, does not mean that GRUB should override the testing goal of the project. It should be fairly obvious when reading the results of the tests that there were issues in running some tests and why the issue occurred. The solution to this is not to pretend there was no issue, and the testing system should not help the user in pretending there was no issue (no matter how much the user would like it). These two reverted commits do just that, among other issues. Of course, if the test requirements are so onerous that no one runs the tests, that's also an issue, and patches are welcome to improve this. However, due to the nature of the GRUB project and thus the kind of testing it needs, GRUB will always require a complex testing environment. And test coverage should not be sacrificed to simplify this environment.

I would also like to add that there is a history of certain large distros submitting patches that are in the (percieved) interests of those distros and not in the interests of the GRUB project or community as a whole. In my estimation, mostly this has been due to ignorance as opposed to intent. Regardless, I hope in the future, people working for these distros can take off their distro hat and put on a GRUB hat before sending patches. Distros contribute a lot of valueable work to GRUB and I would like to continue to see high-quality patches that are in the interest of the project as a whole.

Glenn

Glenn Washburn (2):
Revert "tests: Skip tests if required tools are not available" Revert "tests: Remove -w param from mkfs.hfsplus command"

 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/util/grub-fs-tester.in     | 2 +-
 tests/xfs_test.in                | 2 +-
 tests/xzcompress_test.in         | 2 +-
 tests/zfs_test.in                | 2 +-
 30 files changed, 37 insertions(+), 37 deletions(-)
Signature · 7 lines
2.34.1


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

PATCH 1/2 Revert "tests: Skip tests if required tools are not available"

As explained in commit a21618c8a (tests: Test aborts due to missing requirements should be marked as error instead of skipped) and in the Automake manual[1], skipped tests are tests that should not be run, eg. running the ohci test on the powerpc-ieee1275 as there are no native ohci drivers for that platform. Test that fail for reasons other than there is a bug in GRUB code that is causing the test to fail are hard errors. Commonly this is because the test is run in an improperly configured environment, like required programs are missing. If a hard error condition is identified with a SKIP return code, the person running the tests can not know without investigating every skip if a SKIP in the tests was because the test does not apply to the target being tested or because the user had a misconfigured environment that was causing the test not to run. By ensuring that a test is skipped only when it should not run, the person running the test can be sure that there is no need to investigate why the test was skipped.

This reverts commit bf13fed5f (tests: Skip tests if required tools are not available).

[1] https://www.gnu.org/software/automake/manual/automake.html#Generalities-about-Testing

---
 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 84cfd95d8e46..900f56379fa7 100644
@@ -12,7 +12,7 @@ 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
index fb468564a900..74759419e67c 100644
@@ -4,7 +4,7 @@ set -ex
 
 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/erofs_test.in +1 -1
index f8cf3bb8b47f..e0dec8d3aba4 100644
@@ -4,7 +4,7 @@ set -ex
 
 if ! which mkfs.erofs >/dev/null 2>&1; then
    echo "mkfs.erofs not installed; cannot test erofs."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" erofs_compact
tests/exfat_test.in +1 -1
index ae2b209a1e8e..63300b8a50c2 100644
@@ -12,7 +12,7 @@ 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 +3 -3
index 2f8aafc9c6e7..3761238db701 100644
@@ -12,17 +12,17 @@ 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 +1 -1
index 4d16c2fabef1..0896810ea0e4 100644
@@ -12,7 +12,7 @@ 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 +1 -1
index 0e4b1ebaed44..966b2c9dbde4 100644
@@ -12,7 +12,7 @@ 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/grub_cmd_cryptomount.in +2 -2
index 97863c3e8f94..bcba7c74c1a5 100644
@@ -27,12 +27,12 @@ fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test cryptomount."
-   exit 77
+   exit 99
 fi
 
 if ! which mkfs.vfat >/dev/null 2>&1; then
    echo "mkfs.vfat not installed; cannot test cryptomount."
-   exit 77
+   exit 99
 fi
 
 COMMON_OPTS='${V:+--debug=$V} --cs-opts="--pbkdf-force-iterations 1000"'
tests/gzcompress_test.in +1 -1
index 471b6537edcf..0f80037fb134 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 77
+   exit 99
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)
tests/hfs_test.in +1 -1
index fc0e0e75c6dc..99432114f27f 100644
@@ -12,7 +12,7 @@ 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
tests/hfsplus_test.in +1 -1
index 7918a68bbd2f..402d1cd6650f 100644
@@ -12,7 +12,7 @@ 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
index 7a6816f94a4d..a36f3022a185 100644
@@ -4,7 +4,7 @@ set -ex
 
 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 +1 -1
index b1c18e9b16d0..07f1ca1935fb 100644
@@ -12,7 +12,7 @@ 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/luks1_test.in +2 -2
index 3344746c108f..1df4a2f5ff32 100644
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test luks."
-   exit 77
+   exit 99
 fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test luks."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" luks1
tests/luks2_test.in +2 -2
index 5368698f8274..75ac2c19108e 100644
@@ -12,12 +12,12 @@ fi
 
 if ! which mkfs.ext2 >/dev/null 2>&1; then
    echo "mkfs.ext2 not installed; cannot test luks2."
-   exit 77
+   exit 99
 fi
 
 if ! which cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test luks2."
-   exit 77
+   exit 99
 fi
 
 "@builddir@/grub-fs-tester" luks2
tests/lzocompress_test.in +1 -1
index 50145dd0cdd1..a89d014e96c1 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 77
+   exit 99
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)
tests/minixfs_test.in +1 -1
index 0d28a7226175..780f699faa9b 100644
@@ -12,7 +12,7 @@ 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
tests/nilfs2_test.in +1 -1
index 84b8b1a0b6fb..95ec7c3b40ac 100644
@@ -12,7 +12,7 @@ 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 +2 -2
index 5b1bebe16c92..b6432d2a16b6 100644
@@ -12,12 +12,12 @@ 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
index 8e12cf7ec4b6..6157a85372b7 100644
@@ -100,7 +100,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 +1 -1
index 48d3ab4cc6cf..6f8ebcf298a8 100644
@@ -12,7 +12,7 @@ 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
index 2c66cde3451c..e3b4a0210cec 100644
@@ -4,7 +4,7 @@ set -ex
 
 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
index b973f7bac0a8..36f8e97353c8 100644
@@ -4,7 +4,7 @@ set -ex
 
 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
index eafb6649ddd2..4f0c697acb41 100644
@@ -4,7 +4,7 @@ set -ex
 
 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/tpm2_key_protector_test.in +2 -2
index 6dbd697876d9..5dd86d6ee19d 100644
@@ -41,7 +41,7 @@ fi
 
 if ! command -v cryptsetup >/dev/null 2>&1; then
    echo "cryptsetup not installed; cannot test tpm2."
-   exit 77
+   exit 99
 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 77
+   exit 99
 fi
 
 if ! command -v tpm2_startup >/dev/null 2>&1; then
tests/udf_test.in +1 -1
index b84d0b674617..0723b3be0a25 100644
@@ -12,7 +12,7 @@ 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 +1 -1
index d6b3ab908a28..2c9e6e3484e6 100644
@@ -12,7 +12,7 @@ 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
index f0ac52e2d02c..62f0564db003 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 77
+   exit 99
 fi
 
 v=$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)
tests/zfs_test.in +1 -1
index cd547b4d2282..462a9b95fe42 100644
@@ -12,7 +12,7 @@ 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 · 7 lines
2.34.1


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

PATCH 2/2 Revert "tests: Remove -w param from mkfs.hfsplus command"

In reply to Glenn Washburn

The original commit removes testing of GRUB's support for HFS+ wrapping and replaces it with testing that is an exact duplicate of another test, namely HFS+ without wrapping. To start, the change is misleading in that it suggests that the testing of HFS+ wrapping is still taking place, when it is not. If it was desired to remove support for testing the HFS+ wrapping, then the test should have been removed entirely. Second, having a series of tests that are exactly the same is just a waste of testing resources. And third, the justification for the change is nonsensical. Just because a required program may not have a required feature on a particular distro is not a reason that a test should be removed. Reducing test coverage because some distros do not have the tools GRUB needs to run certain tests goes against the testing priority to have test coverage be as broad as possible. The fact is that Debian, the officially supported distro for running the tests, does have a mkfs.hfsplus that supports the -w parameter.

This reverts commit 2bc0929a2 (tests: Remove -w param from mkfs.hfsplus command).

---
 tests/util/grub-fs-tester.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/util/grub-fs-tester.in +1 -1
index bfb7b05536f7..7199322c61d5 100644
@@ -735,7 +735,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" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
+		    "mkfs.hfsplus" -w -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.34.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#3 lore raw
In reply to Glenn Washburn
Quoted 27 lines · Glenn Washburn

The two commit reverted in this series degrade the GRUB tests and must be reverted. The goal of any testing system for a project should be to find bugs. That goal is not served by reducing test coverage, which is what both of those commits did. Just because some (influential) users have a different objective, such as making the test harness not error so they can check the "GRUB tests pass" box after building, does not mean that GRUB should override the testing goal of the project. It should be fairly obvious when reading the results of the tests that there were issues in running some tests and why the issue occurred. The solution to this is not to pretend there was no issue, and the testing system should not help the user in pretending there was no issue (no matter how much the user would like it). These two reverted commits do just that, among other issues. Of course, if the test requirements are so onerous that no one runs the tests, that's also an issue, and patches are welcome to improve this. However, due to the nature of the GRUB project and thus the kind of testing it needs, GRUB will always require a complex testing environment. And test coverage should not be sacrificed to simplify this environment.

I would also like to add that there is a history of certain large distros submitting patches that are in the (percieved) interests of those distros and not in the interests of the GRUB project or community as a whole. In my estimation, mostly this has been due to ignorance as opposed to intent. Regardless, I hope in the future, people working for these distros can take off their distro hat and put on a GRUB hat before sending patches. Distros contribute a lot of valueable work to GRUB and I would like to continue to see high-quality patches that are in the interest of the project as a whole.

Quoted 5 lines

Glenn

Glenn Washburn (2):
Revert "tests: Skip tests if required tools are not available" Revert "tests: Remove -w param from mkfs.hfsplus command"

Taking into account the cover letter and updated GRUB Developers Manual I think these two patches have to be reverted.

So, Reviewed-by: Daniel Kiper <[email protected]>...

Daniel

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

#4 lore raw

Thanks Daniel & Glenn.

Sorry for introducing more workload on your hands and impacting the QA negatively, of course not intended.

Leo

Quoted 41 lines · Daniel Kiper
Quoted 4 lines · Glenn Washburn

The two commit reverted in this series degrade the GRUB tests and must be reverted. The goal of any testing system for a project should be to find bugs. That goal is not served by reducing test coverage, which is what both of those commits did. Just because some (influential) users have a

Quoted 8 lines

different objective, such as making the test harness not error so they can check the "GRUB tests pass" box after building, does not mean that GRUB should override the testing goal of the project. It should be fairly obvious when reading the results of the tests that there were issues in running some tests and why the issue occurred. The solution to this is not to pretend there was no issue, and the testing system should not help the user in pretending there was no issue (no matter how much the user would like it). These two reverted commits do just that, among other

issues.

Quoted 3 lines

Of course, if the test requirements are so onerous that no one runs the tests, that's also an issue, and patches are welcome to improve this. However, due to the nature of the GRUB project and thus the kind of

testing

Quoted 7 lines

it needs, GRUB will always require a complex testing environment. And test coverage should not be sacrificed to simplify this environment.

I would also like to add that there is a history of certain large distros submitting patches that are in the (percieved) interests of those distros and not in the interests of the GRUB project or community as a whole. In my estimation, mostly this has been due to ignorance as opposed to

intent.

Quoted 1 line

Regardless, I hope in the future, people working for these distros can

take

Quoted 1 line

off their distro hat and put on a GRUB hat before sending patches.

Distros

Quoted 1 line

contribute a lot of valueable work to GRUB and I would like to continue

to

Quoted 1 line

see high-quality patches that are in the interest of the project as a

whole.

Quoted 6 lines

Glenn

Glenn Washburn (2):
Revert "tests: Skip tests if required tools are not available" Revert "tests: Remove -w param from mkfs.hfsplus command"

Quoted 8 lines

Taking into account the cover letter and updated GRUB Developers Manual I think these two patches have to be reverted.

So, Reviewed-by: Daniel Kiper <[email protected]>...

Daniel

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