* [PATCH v6 0/3] Fix Several Test Failures
@ 2025-11-14 1:08 Andrew Hamilton
2025-11-14 1:08 ` [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File Andrew Hamilton
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Andrew Hamilton @ 2025-11-14 1:08 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, lsandova, development, Andrew Hamilton
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 failing early 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.
Changes since v5:
- Change return code from 77 to 99 in zstd test
Changes since v4:
- Change return code from 99 to 77 in zstd test
Changes since v3:
- Rebase changes against current master branch.
Changes since v2:
- Change return code from 77 to 99 in zstd test
Changes since v1:
- Remove unrelated changes to .gitignore
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 | 1 +
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, 47 insertions(+), 4 deletions(-)
create mode 100644 tests/zfs_zstd_test.in
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File
2025-11-14 1:08 [PATCH v6 0/3] Fix Several Test Failures Andrew Hamilton
@ 2025-11-14 1:08 ` Andrew Hamilton
2025-11-14 5:32 ` Glenn Washburn
2025-11-14 1:08 ` [PATCH v6 2/3] tests: Avoid Test Failure in erofs for label length Andrew Hamilton
2025-11-14 1:08 ` [PATCH v6 3/3] tests: Support Changed mkfs.ext2 Behavior for -r Flag Andrew Hamilton
2 siblings, 1 reply; 8+ messages in thread
From: Andrew Hamilton @ 2025-11-14 1:08 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, lsandova, development, 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 fail 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 <adhamilt@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
.gitignore | 1 +
Makefile.util.def | 6 ++++++
tests/zfs_test.in | 1 -
tests/zfs_zstd_test.in | 30 ++++++++++++++++++++++++++++++
4 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 tests/zfs_zstd_test.in
diff --git a/.gitignore b/.gitignore
index 524f2e6d0..67ad2d26d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -283,3 +283,4 @@ widthspec.bin
/xfs_test
/xzcompress_test
/zfs_test
+/zfs_zstd_test
diff --git a/Makefile.util.def b/Makefile.util.def
index 91720e627..7b91c0b61 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -914,6 +914,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;
diff --git a/tests/zfs_test.in b/tests/zfs_test.in
index e1cb766a5..cd547b4d2 100644
--- a/tests/zfs_test.in
+++ b/tests/zfs_test.in
@@ -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
diff --git a/tests/zfs_zstd_test.in b/tests/zfs_zstd_test.in
new file mode 100644
index 000000000..d5654d760
--- /dev/null
+++ b/tests/zfs_zstd_test.in
@@ -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 ZFS ZSTD compression is not supported (as is the case with zfs-fuse
+# for example at the time of writing) then fail early the 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 99
+fi
+
+"@builddir@/grub-fs-tester" zfs_zstd
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v6 2/3] tests: Avoid Test Failure in erofs for label length
2025-11-14 1:08 [PATCH v6 0/3] Fix Several Test Failures Andrew Hamilton
2025-11-14 1:08 ` [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File Andrew Hamilton
@ 2025-11-14 1:08 ` Andrew Hamilton
2025-11-14 1:08 ` [PATCH v6 3/3] tests: Support Changed mkfs.ext2 Behavior for -r Flag Andrew Hamilton
2 siblings, 0 replies; 8+ messages in thread
From: Andrew Hamilton @ 2025-11-14 1:08 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, lsandova, development, Andrew Hamilton
Recently, 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.
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
tests/util/grub-fs-tester.in | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
index 2302c2ab1..54add3b73 100644
--- a/tests/util/grub-fs-tester.in
+++ b/tests/util/grub-fs-tester.in
@@ -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";;
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v6 3/3] tests: Support Changed mkfs.ext2 Behavior for -r Flag
2025-11-14 1:08 [PATCH v6 0/3] Fix Several Test Failures Andrew Hamilton
2025-11-14 1:08 ` [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File Andrew Hamilton
2025-11-14 1:08 ` [PATCH v6 2/3] tests: Avoid Test Failure in erofs for label length Andrew Hamilton
@ 2025-11-14 1:08 ` Andrew Hamilton
2025-11-14 5:27 ` Glenn Washburn
2 siblings, 1 reply; 8+ messages in thread
From: Andrew Hamilton @ 2025-11-14 1:08 UTC (permalink / raw)
To: grub-devel; +Cc: daniel.kiper, lsandova, development, Andrew Hamilton
Correct 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.
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
tests/util/grub-fs-tester.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
index 54add3b73..87ff8bc6f 100644
--- a/tests/util/grub-fs-tester.in
+++ b/tests/util/grub-fs-tester.in
@@ -880,7 +880,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)
--
2.43.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v6 3/3] tests: Support Changed mkfs.ext2 Behavior for -r Flag
2025-11-14 1:08 ` [PATCH v6 3/3] tests: Support Changed mkfs.ext2 Behavior for -r Flag Andrew Hamilton
@ 2025-11-14 5:27 ` Glenn Washburn
0 siblings, 0 replies; 8+ messages in thread
From: Glenn Washburn @ 2025-11-14 5:27 UTC (permalink / raw)
To: Andrew Hamilton; +Cc: grub-devel, daniel.kiper, lsandova
On Thu, 13 Nov 2025 19:08:06 -0600
Andrew Hamilton <adhamilt@gmail.com> wrote:
> Correct 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.
>
> Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
> tests/util/grub-fs-tester.in | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
> index 54add3b73..87ff8bc6f 100644
> --- a/tests/util/grub-fs-tester.in
> +++ b/tests/util/grub-fs-tester.in
> @@ -880,7 +880,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
Add -q to grep command so as not to write to stdout.
Glenn
> + 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)
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File
2025-11-14 1:08 ` [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File Andrew Hamilton
@ 2025-11-14 5:32 ` Glenn Washburn
2025-11-14 23:19 ` Andrew Hamilton
0 siblings, 1 reply; 8+ messages in thread
From: Glenn Washburn @ 2025-11-14 5:32 UTC (permalink / raw)
To: Andrew Hamilton; +Cc: grub-devel, daniel.kiper, lsandova
On Thu, 13 Nov 2025 19:08:04 -0600
Andrew Hamilton <adhamilt@gmail.com> wrote:
> 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 fail 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 <adhamilt@gmail.com>
> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
> .gitignore | 1 +
> Makefile.util.def | 6 ++++++
> tests/zfs_test.in | 1 -
> tests/zfs_zstd_test.in | 30 ++++++++++++++++++++++++++++++
> 4 files changed, 37 insertions(+), 1 deletion(-)
> create mode 100644 tests/zfs_zstd_test.in
>
> diff --git a/.gitignore b/.gitignore
> index 524f2e6d0..67ad2d26d 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -283,3 +283,4 @@ widthspec.bin
> /xfs_test
> /xzcompress_test
> /zfs_test
> +/zfs_zstd_test
> diff --git a/Makefile.util.def b/Makefile.util.def
> index 91720e627..7b91c0b61 100644
> --- a/Makefile.util.def
> +++ b/Makefile.util.def
> @@ -914,6 +914,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;
> diff --git a/tests/zfs_test.in b/tests/zfs_test.in
> index e1cb766a5..cd547b4d2 100644
> --- a/tests/zfs_test.in
> +++ b/tests/zfs_test.in
> @@ -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
> diff --git a/tests/zfs_zstd_test.in b/tests/zfs_zstd_test.in
> new file mode 100644
> index 000000000..d5654d760
> --- /dev/null
> +++ b/tests/zfs_zstd_test.in
> @@ -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 ZFS ZSTD compression is not supported (as is the case with zfs-fuse
> +# for example at the time of writing) then fail early the ZSTD compression testing.
> +if ! zfs get 2>&1 | grep -F "compression" | grep -F "zstd"; then
The last grep should have -q option. And while you're at it you can
combine the two greps into one, like grep -q -F -e compression -e zstd.
> + echo "zfs zstd compression not supported; cannot test zfs zstd."
> + exit 99
> +fi
> +
> +"@builddir@/grub-fs-tester" zfs_zstd
Thanks for changing these back to 99.
Glenn
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File
2025-11-14 5:32 ` Glenn Washburn
@ 2025-11-14 23:19 ` Andrew Hamilton
2025-11-15 4:34 ` Glenn Washburn
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Hamilton @ 2025-11-14 23:19 UTC (permalink / raw)
To: development; +Cc: grub-devel, daniel.kiper, lsandova
On Thu, Nov 13, 2025 at 11:32 PM Glenn Washburn
<development@efficientek.com> wrote:
>
> On Thu, 13 Nov 2025 19:08:04 -0600
> Andrew Hamilton <adhamilt@gmail.com> wrote:
>
> > 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 fail 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 <adhamilt@gmail.com>
> > Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> > ---
> > .gitignore | 1 +
> > Makefile.util.def | 6 ++++++
> > tests/zfs_test.in | 1 -
> > tests/zfs_zstd_test.in | 30 ++++++++++++++++++++++++++++++
> > 4 files changed, 37 insertions(+), 1 deletion(-)
> > create mode 100644 tests/zfs_zstd_test.in
> >
> > diff --git a/.gitignore b/.gitignore
> > index 524f2e6d0..67ad2d26d 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -283,3 +283,4 @@ widthspec.bin
> > /xfs_test
> > /xzcompress_test
> > /zfs_test
> > +/zfs_zstd_test
> > diff --git a/Makefile.util.def b/Makefile.util.def
> > index 91720e627..7b91c0b61 100644
> > --- a/Makefile.util.def
> > +++ b/Makefile.util.def
> > @@ -914,6 +914,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;
> > diff --git a/tests/zfs_test.in b/tests/zfs_test.in
> > index e1cb766a5..cd547b4d2 100644
> > --- a/tests/zfs_test.in
> > +++ b/tests/zfs_test.in
> > @@ -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
> > diff --git a/tests/zfs_zstd_test.in b/tests/zfs_zstd_test.in
> > new file mode 100644
> > index 000000000..d5654d760
> > --- /dev/null
> > +++ b/tests/zfs_zstd_test.in
> > @@ -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 ZFS ZSTD compression is not supported (as is the case with zfs-fuse
> > +# for example at the time of writing) then fail early the ZSTD compression testing.
> > +if ! zfs get 2>&1 | grep -F "compression" | grep -F "zstd"; then
>
> The last grep should have -q option. And while you're at it you can
> combine the two greps into one, like grep -q -F -e compression -e zstd.
I'll add the "-q" option in v7. I think combining two '-e' expressions
is an "or" condition, but I will change it to use a single grep with
regular expression to achieve the "and" without a pipe operation.
>
> > + echo "zfs zstd compression not supported; cannot test zfs zstd."
> > + exit 99
> > +fi
> > +
> > +"@builddir@/grub-fs-tester" zfs_zstd
>
> Thanks for changing these back to 99.
>
> Glenn
Thanks,
Andrew
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File
2025-11-14 23:19 ` Andrew Hamilton
@ 2025-11-15 4:34 ` Glenn Washburn
0 siblings, 0 replies; 8+ messages in thread
From: Glenn Washburn @ 2025-11-15 4:34 UTC (permalink / raw)
To: Andrew Hamilton; +Cc: grub-devel, daniel.kiper, lsandova
On Fri, 14 Nov 2025 17:19:31 -0600
Andrew Hamilton <adhamilt@gmail.com> wrote:
> On Thu, Nov 13, 2025 at 11:32 PM Glenn Washburn
> <development@efficientek.com> wrote:
> >
> > On Thu, 13 Nov 2025 19:08:04 -0600
> > Andrew Hamilton <adhamilt@gmail.com> wrote:
> >
> > > 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 fail 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 <adhamilt@gmail.com>
> > > Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> > > ---
> > > .gitignore | 1 +
> > > Makefile.util.def | 6 ++++++
> > > tests/zfs_test.in | 1 -
> > > tests/zfs_zstd_test.in | 30 ++++++++++++++++++++++++++++++
> > > 4 files changed, 37 insertions(+), 1 deletion(-)
> > > create mode 100644 tests/zfs_zstd_test.in
> > >
> > > diff --git a/.gitignore b/.gitignore
> > > index 524f2e6d0..67ad2d26d 100644
> > > --- a/.gitignore
> > > +++ b/.gitignore
> > > @@ -283,3 +283,4 @@ widthspec.bin
> > > /xfs_test
> > > /xzcompress_test
> > > /zfs_test
> > > +/zfs_zstd_test
> > > diff --git a/Makefile.util.def b/Makefile.util.def
> > > index 91720e627..7b91c0b61 100644
> > > --- a/Makefile.util.def
> > > +++ b/Makefile.util.def
> > > @@ -914,6 +914,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;
> > > diff --git a/tests/zfs_test.in b/tests/zfs_test.in
> > > index e1cb766a5..cd547b4d2 100644
> > > --- a/tests/zfs_test.in
> > > +++ b/tests/zfs_test.in
> > > @@ -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
> > > diff --git a/tests/zfs_zstd_test.in b/tests/zfs_zstd_test.in
> > > new file mode 100644
> > > index 000000000..d5654d760
> > > --- /dev/null
> > > +++ b/tests/zfs_zstd_test.in
> > > @@ -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 ZFS ZSTD compression is not supported (as is the case with zfs-fuse
> > > +# for example at the time of writing) then fail early the ZSTD compression testing.
> > > +if ! zfs get 2>&1 | grep -F "compression" | grep -F "zstd"; then
> >
> > The last grep should have -q option. And while you're at it you can
> > combine the two greps into one, like grep -q -F -e compression -e zstd.
> I'll add the "-q" option in v7. I think combining two '-e' expressions
> is an "or" condition, but I will change it to use a single grep with
> regular expression to achieve the "and" without a pipe operation.
You're right. It is an "or". I did a quick test that incorrectly lead
me to believe that it would work. I assume that the "zstd" is after
the "compression", in which case it could be: grep -q -E
"compression.*zstd". Sorry about the noise.
Glenn
> >
> > > + echo "zfs zstd compression not supported; cannot test zfs zstd."
> > > + exit 99
> > > +fi
> > > +
> > > +"@builddir@/grub-fs-tester" zfs_zstd
> >
> > Thanks for changing these back to 99.
> >
> > Glenn
>
> Thanks,
> Andrew
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-11-15 4:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14 1:08 [PATCH v6 0/3] Fix Several Test Failures Andrew Hamilton
2025-11-14 1:08 ` [PATCH v6 1/3] tests: Split ZFS ZSTD Test Into New File Andrew Hamilton
2025-11-14 5:32 ` Glenn Washburn
2025-11-14 23:19 ` Andrew Hamilton
2025-11-15 4:34 ` Glenn Washburn
2025-11-14 1:08 ` [PATCH v6 2/3] tests: Avoid Test Failure in erofs for label length Andrew Hamilton
2025-11-14 1:08 ` [PATCH v6 3/3] tests: Support Changed mkfs.ext2 Behavior for -r Flag Andrew Hamilton
2025-11-14 5:27 ` Glenn Washburn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox