Fix Several Test Failures
cover Fix Several Test Failures
Correct several test failures observed while running GRUB 'make check' on Debian 13. The test failures fixed here are:
1. ZFS ZSTD - Test was failing zfs_test due to lack of support in zfs-fuse for zstd compression. This specific test case was split into a new test file allowing skipping the test if zstd is not supported to avoid masking other possible (future) zfs test failures.
2. Correct test failure in erofs_test in newer Linux distros caused by a change in mkfs.erofs to limit the maximum file system label length to 15 characters. Reduce the label used for testing to work within this limit.
3. Correct test failure in ext234_test in newer Linux distros caused by a change in e2fsprogs that removed the ability to set "version 0" ext2 file systems using the "-r" flag. Instead a new flag is added to support this. Update the test to support the old method in older distros and the new method in newer distros.
In addition, a few stray binaries / generated files were added to .gitignore along with the new zfs_zstd_test file.
Andrew Hamilton (3):
tests: Split ZFS ZSTD Test Into New File
tests: Avoid Test Failure in erofs for label length
tests: Support Changed mkfs.ext2 Behavior for -r Flag
.gitignore | 7 +++++++ Makefile.util.def | 6 ++++++ tests/util/grub-fs-tester.in | 13 ++++++++++--- tests/zfs_test.in | 1 - tests/zfs_zstd_test.in | 30 ++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 tests/zfs_zstd_test.in
Signature · 7 lines
2.39.5 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 1/3 tests: Split ZFS ZSTD Test Into New File
Split ZFS ZSTD test into its own test script. Add a check to the new test script to see if the zfs utility installed on the host supports "zstd" compression before running the test and skip the test if not. It seems at least some zfs-fuse binaries do not support zstd compression and the current test will fail in that case. Splitting into a new file will avoid masking other test failures due to missing zstd support.
--- .gitignore | 7 +++++++ Makefile.util.def | 6 ++++++ tests/zfs_test.in | 1 - tests/zfs_zstd_test.in | 30 ++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/zfs_zstd_test.in
.gitignore +7 -0
@@ -62,6 +62,7 @@ widthspec.bin /00_header /10_* /20_linux_xen +/25_bli /30_os-prober /30_uefi-firmware /40_custom
@@ -74,6 +75,7 @@ widthspec.bin /aclocal.m4 /ahci_test /ascii.h +/asn1_test /autom4te.cache/ /btrfs_test /build-aux/
@@ -180,11 +182,13 @@ widthspec.bin /grub-script-check.exe /grub-set-default /grub-shell +/grub-shell-luks-tester /grub-shell-tester /grub-sparc64-setup /grub-sparc64-setup.exe /grub-syslinux2cfg /grub-syslinux2cfg.exe +/grub_cmd_cryptomount /grub_cmd_date /grub_cmd_echo /grub_cmd_regexp
@@ -266,6 +270,7 @@ widthspec.bin /pseries_test /reiserfs_test /romfs_test +/serial_test /squashfs_test /stamp-h /stamp-h.in
@@ -276,6 +281,7 @@ widthspec.bin /test_unset /tests/syslinux/ubuntu10.04_grub.cfg /texinfo.tex +/tpm2_key_protector_test /udf_test /uhci_test /util/bash-completion.d/grub
@@ -283,3 +289,4 @@ widthspec.bin /xfs_test /xzcompress_test /zfs_test +/zfs_zstd_test
Makefile.util.def +6 -0
@@ -911,6 +911,12 @@ script = { common = tests/zfs_test.in; }; +script = { + testcase = native; + name = zfs_zstd_test; + common = tests/zfs_zstd_test.in; +}; + script = { testcase = native; name = cpio_test;
tests/zfs_test.in +0 -1
@@ -19,7 +19,6 @@ fi "@builddir@/grub-fs-tester" zfs_lzjb "@builddir@/grub-fs-tester" zfs_gzip "@builddir@/grub-fs-tester" zfs_zle -"@builddir@/grub-fs-tester" zfs_zstd "@builddir@/grub-fs-tester" zfs_raidz3 "@builddir@/grub-fs-tester" zfs_raidz2 "@builddir@/grub-fs-tester" zfs_raidz
tests/zfs_zstd_test.in new file +30 -0
@@ -0,0 +1,30 @@ +#!@BUILD_SHEBANG@ + +set -e + +if [ "x$EUID" = "x" ] ; then + EUID=`id -u` +fi + +if [ "$EUID" != 0 ] ; then + exit 99 +fi + +if ! which zpool >/dev/null 2>&1; then + echo "zpool not installed; cannot test zfs." + exit 99 +fi + +if ! which zfs >/dev/null 2>&1; then + echo "zfs not installed; cannot test zfs." + exit 99 +fi + +# If OpenZFS is not installed (only zfs-fuse for example) then +# skip ZSTD compression testing. +if ! zfs get 2>&1 | grep -F "compression" | grep -F "zstd"; then + echo "zfs zstd compression not supported; cannot test zfs zstd." + exit 77 +fi + +"@builddir@/grub-fs-tester" zfs_zstd
Signature · 7 lines
2.39.5 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 3/3 tests: Support Changed mkfs.ext2 Behavior for -r Flag
In reply to Andrew HamiltonCorrect nuisance ext234_test failure on newer Linux distros.
Recently, the mkfs.ext2 utility removed support for the -r flag to specify old (version 0) formats of ext2. A new flag was added to allow the same behavior. Support both ways of specifying version 0 ext2 file systems when testing ext2 in GRUB.
--- tests/util/grub-fs-tester.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tests/util/grub-fs-tester.in +5 -1
@@ -874,7 +874,11 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do xnilfs2) "mkfs.nilfs2" -L "$FSLABEL" -b $BLKSIZE -q "${MOUNTDEVICE}" ;; xext2_old) - MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext2" -r 0 -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" + if "mkfs.ext2" -r 0 2>&1 | grep -F "the -r option has been removed"; then + MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext2" -E revision=0 -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" + else + MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext2" -r 0 -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" + fi MOUNTFS=ext2 ;; xext4_metabg)
Signature · 7 lines
2.39.5 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 2/3 tests: Avoid Test Failure in erofs for label length
In reply to Andrew HamiltonRecently, mkfs.erofs began to enforce that the file system label is 15 characters or less (exluding NULL terminator). This causes the current erofs test in GRUB to fail. Reduce the test label used to fit in this limit allowing the test to work as expected.
--- tests/util/grub-fs-tester.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
tests/util/grub-fs-tester.in +5 -2
@@ -386,9 +386,12 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do FSLABEL="g;/_é䏌䐓䏕䎛䎾䏴кит u" #FSLABEL="g;/_é莭莽😁кит u" ;; - # FS LIMITATION: reiserfs, extN, jfs and erofs label is at most 16 UTF-8 characters - x"reiserfs_old" | x"reiserfs" | x"ext"* | x"lvm"* | x"luks"* | x"mdraid"* | x"jfs" | x"jfs_caseins" | x"erofs_"*) + # FS LIMITATION: reiserfs, extN, and jfs label is at most 16 UTF-8 characters + x"reiserfs_old" | x"reiserfs" | x"ext"* | x"lvm"* | x"luks"* | x"mdraid"* | x"jfs" | x"jfs_caseins") FSLABEL="g;/éт 莭😁";; + # FS LIMITATION: erofs label is at most 15 UTF-8 characters + x"erofs_"*) + FSLABEL="g;/é 莭😁";; # FS LIMITATION: No underscore, space, semicolon, slash or international characters in UFS* in label. Limited to 32 UTF-8 characters x"ufs1" | x"ufs1_sun" | x"ufs2") FSLABEL="grubtest""ieurrucnenreeiurueurewf";;
Signature · 7 lines
2.39.5 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH 1/3] tests: Split ZFS ZSTD Test Into New File
In reply to Andrew HamiltonThis patch contains unrelated changes to .gitignore
Regards
Vladimir 'phcoder' Serbinenko
Quoted 141 lines · Andrew Hamilton
Split ZFS ZSTD test into its own test script. Add a check to the new test script to see if the zfs utility installed on the host supports "zstd" compression before running the test and skip the test if not. It seems at least some zfs-fuse binaries do not support zstd compression and the current test will fail in that case. Splitting into a new file will avoid masking other test failures due to missing zstd support.
Signed-off-by Andrew Hamilton <[email protected]>--- .gitignore | 7 +++++++ Makefile.util.def | 6 ++++++ tests/zfs_test.in | 1 - tests/zfs_zstd_test.in | 30 ++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/zfs_zstd_test.in.gitignore +7
-0@@ -62,6 +62,7 @@ widthspec.bin /00_header /10_* /20_linux_xen +/25_bli /30_os-prober /30_uefi-firmware /40_custom@@ -74,6 +75,7 @@ widthspec.bin /aclocal.m4 /ahci_test /ascii.h +/asn1_test /autom4te.cache/ /btrfs_test /build-aux/@@ -180,11 +182,13 @@ widthspec.bin /grub-script-check.exe /grub-set-default /grub-shell +/grub-shell-luks-tester /grub-shell-tester /grub-sparc64-setup /grub-sparc64-setup.exe /grub-syslinux2cfg /grub-syslinux2cfg.exe +/grub_cmd_cryptomount /grub_cmd_date /grub_cmd_echo /grub_cmd_regexp@@ -266,6 +270,7 @@ widthspec.bin /pseries_test /reiserfs_test /romfs_test +/serial_test /squashfs_test /stamp-h /stamp-h.in@@ -276,6 +281,7 @@ widthspec.bin /test_unset /tests/syslinux/ubuntu10.04_grub.cfg /texinfo.tex +/tpm2_key_protector_test /udf_test /uhci_test /util/bash-completion.d/grub@@ -283,3 +289,4 @@ widthspec.bin /xfs_test /xzcompress_test /zfs_test +/zfs_zstd_testMakefile.util.def +6
-0@@ -911,6 +911,12 @@ script = { common = tests/zfs_test.in; }; +script = { + testcase = native; + name = zfs_zstd_test; + common = tests/zfs_zstd_test.in; +}; + script = { testcase = native; name = cpio_test;tests/zfs_test.in +0
-1@@ -19,7 +19,6 @@ fi "@builddir@/grub-fs-tester" zfs_lzjb "@builddir@/grub-fs-tester" zfs_gzip "@builddir@/grub-fs-tester" zfs_zle -"@builddir@/grub-fs-tester" zfs_zstd "@builddir@/grub-fs-tester" zfs_raidz3 "@builddir@/grub-fs-tester" zfs_raidz2 "@builddir@/grub-fs-tester" zfs_raidztests/zfs_zstd_test.in new file +30
-1@@ -0,0 +1,30 @@ +#!@BUILD_SHEBANG@ + +set -e + +if [ "x$EUID" = "x" ] ; then + EUID=`id -u` +fi + +if [ "$EUID" != 0 ] ; then + exit 99 +fi + +if ! which zpool >/dev/null 2>&1; then + echo "zpool not installed; cannot test zfs." + exit 99 +fi + +if ! which zfs >/dev/null 2>&1; then + echo "zfs not installed; cannot test zfs." + exit 99 +fi + +# If OpenZFS is not installed (only zfs-fuse for example) then +# skip ZSTD compression testing. +if ! zfs get 2>&1 | grep -F "compression" | grep -F "zstd"; then + echo "zfs zstd compression not supported; cannot test zfs zstd." + exit 77 +fi + +"@builddir@/grub-fs-tester" zfs_zstd --2.39.5
Quoted 5 lines
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH 1/3] tests: Split ZFS ZSTD Test Into New File
I will fix that in the next version.
Thanks,
Andrew
Quoted 149 lines · Vladimir 'phcoder' Serbinenko
This patch contains unrelated changes to .gitignore
Regards
Vladimir 'phcoder' SerbinenkoLe lun. 25 août 2025, 05:39, Andrew Hamilton <[email protected]> a écrit :
Quoted 141 lines
Split ZFS ZSTD test into its own test script. Add a check to the new test script to see if the zfs utility installed on the host supports "zstd" compression before running the test and skip the test if not. It seems at least some zfs-fuse binaries do not support zstd compression and the current test will fail in that case. Splitting into a new file will avoid masking other test failures due to missing zstd support.
Signed-off-by Andrew Hamilton <[email protected]>--- .gitignore | 7 +++++++ Makefile.util.def | 6 ++++++ tests/zfs_test.in | 1 - tests/zfs_zstd_test.in | 30 ++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/zfs_zstd_test.in.gitignore +7
-0@@ -62,6 +62,7 @@ widthspec.bin /00_header /10_* /20_linux_xen +/25_bli /30_os-prober /30_uefi-firmware /40_custom@@ -74,6 +75,7 @@ widthspec.bin /aclocal.m4 /ahci_test /ascii.h +/asn1_test /autom4te.cache/ /btrfs_test /build-aux/@@ -180,11 +182,13 @@ widthspec.bin /grub-script-check.exe /grub-set-default /grub-shell +/grub-shell-luks-tester /grub-shell-tester /grub-sparc64-setup /grub-sparc64-setup.exe /grub-syslinux2cfg /grub-syslinux2cfg.exe +/grub_cmd_cryptomount /grub_cmd_date /grub_cmd_echo /grub_cmd_regexp@@ -266,6 +270,7 @@ widthspec.bin /pseries_test /reiserfs_test /romfs_test +/serial_test /squashfs_test /stamp-h /stamp-h.in@@ -276,6 +281,7 @@ widthspec.bin /test_unset /tests/syslinux/ubuntu10.04_grub.cfg /texinfo.tex +/tpm2_key_protector_test /udf_test /uhci_test /util/bash-completion.d/grub@@ -283,3 +289,4 @@ widthspec.bin /xfs_test /xzcompress_test /zfs_test +/zfs_zstd_testMakefile.util.def +6
-0@@ -911,6 +911,12 @@ script = { common = tests/zfs_test.in; }; +script = { + testcase = native; + name = zfs_zstd_test; + common = tests/zfs_zstd_test.in; +}; + script = { testcase = native; name = cpio_test;tests/zfs_test.in +0
-1@@ -19,7 +19,6 @@ fi "@builddir@/grub-fs-tester" zfs_lzjb "@builddir@/grub-fs-tester" zfs_gzip "@builddir@/grub-fs-tester" zfs_zle -"@builddir@/grub-fs-tester" zfs_zstd "@builddir@/grub-fs-tester" zfs_raidz3 "@builddir@/grub-fs-tester" zfs_raidz2 "@builddir@/grub-fs-tester" zfs_raidztests/zfs_zstd_test.in new file +30
-1@@ -0,0 +1,30 @@ +#!@BUILD_SHEBANG@ + +set -e + +if [ "x$EUID" = "x" ] ; then + EUID=`id -u` +fi + +if [ "$EUID" != 0 ] ; then + exit 99 +fi + +if ! which zpool >/dev/null 2>&1; then + echo "zpool not installed; cannot test zfs." + exit 99 +fi + +if ! which zfs >/dev/null 2>&1; then + echo "zfs not installed; cannot test zfs." + exit 99 +fi + +# If OpenZFS is not installed (only zfs-fuse for example) then +# skip ZSTD compression testing. +if ! zfs get 2>&1 | grep -F "compression" | grep -F "zstd"; then + echo "zfs zstd compression not supported; cannot test zfs zstd." + exit 77 +fi + +"@builddir@/grub-fs-tester" zfs_zstd --2.39.5
Quoted 6 lines
Quoted 5 lines
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel