All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tests: Keep grub-fs-tester ziso9660 from failing for wrong reasons
@ 2021-09-08 21:34 Thomas Schmitt
  2021-09-09 13:10 ` Daniel Kiper
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Schmitt @ 2021-09-08 21:34 UTC (permalink / raw)
  To: grub-devel, daniel.kiper, development; +Cc: Thomas Schmitt

The test for the ability to decompress zisofs encoded files is supposed
to fail due to the lack of this ability in GRUB. But it fails early with
  xorriso : FAILURE : -volid: Text too long (1650 > 32)
because "ziso9660" is not in the list of filesystems which accept at most
32 bytes in their FSLABEL.
If this is fixed, the test returns false success because the xorriso run
does not produce any zisofs compressed files. The problem is in the
sequence of native xorriso commands used. The command -set_filter_r
applies only to the files which are already inserted into the emerging
ISO filesystem. In the current sequence no files have been inserted yet
by command -add when the last of two -set_filter_r commands is executed.
After this is corrected, xorriso refuses to work because the global
settings of command -zisofs can be made only before command -set_filter_r
has attached zisofs filters to the data files in the emerging ISO.
Further: A bug in xorriso causes a false warning about FSLABEL being
too long for Joliet. Shortcommings of Joliet cause warnings about
symbolic links. Such warnings might distract from the actual reason why
the test is expected to fail.

So add "ziso9660" to the 32-byte FSLABEL list.
Fix the xorriso run to produce compressed files which for now cause
righteous failure of the test. Do this by removing a surplus group of
-set_filter_r and -zisofs commands, by moving the other such group
behind -add, and by swapping -set_filter_r and -zisofs.
Remove the -as mkisofs options which produce a Joliet filesystem tree.

Signed-off-by: Thomas Schmitt <scdbackup@gmx.net>
---
 tests/util/grub-fs-tester.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
index 4f581b638..a28e07295 100644
--- a/tests/util/grub-fs-tester.in
+++ b/tests/util/grub-fs-tester.in
@@ -318,7 +318,8 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		    FSLABEL="grub_;/testéтi u😁莽茝кириrewfceniuewruevrewnuuireurevueurnievrewfne";;
  	            # FS LIMITATION: afs and iso9660 label is at most 32 UTF-8 characters
 		x"afs" | xiso9660 | xrockridge | xrockridge_joliet\
-                     | xiso9660_1999 | xrockridge_1999 | xrockridge_joliet_1999)
+		     | xiso9660_1999 | xrockridge_1999\
+		     | xrockridge_joliet_1999 | xziso9660)
 		     FSLABEL="gr_;/é莭莽😁кирит u";;
  	            # FS LIMITATION: bfs label is at most 32 UTF-8 characters
  	            # OS LIMITATION: bfs label can't contain ; or /
@@ -1024,7 +1025,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		    (cd "$MASTER"; find . | cpio -o -H "$(echo ${fs} | sed 's@^cpio_@@')" > "${FSIMAGEP}0.img" ) ;;
 		x"ziso9660")
 		    FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
-		    xorriso -compliance rec_mtime -set_filter_r --zisofs -- -zisofs default -as mkisofs $XORRISOFS_CHARSET -iso-level 3 -graft-points -R -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img"  -- -set_filter_r --zisofs -- -zisofs default -add /="$MASTER" ;;
+		    xorriso -compliance rec_mtime -as mkisofs $XORRISOFS_CHARSET -iso-level 3 -graft-points -R -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" -- -add /="$MASTER" -- -zisofs default -set_filter_r --zisofs / -- ;;
 		x"iso9660")
 		    FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
 		    xorriso --rockridge off -compliance rec_mtime -as mkisofs $XORRISOFS_CHARSET -iso-level 3 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER"  ;;
--
2.20.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] tests: Keep grub-fs-tester ziso9660 from failing for wrong reasons
  2021-09-08 21:34 [PATCH v2] tests: Keep grub-fs-tester ziso9660 from failing for wrong reasons Thomas Schmitt
@ 2021-09-09 13:10 ` Daniel Kiper
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2021-09-09 13:10 UTC (permalink / raw)
  To: Thomas Schmitt; +Cc: grub-devel, development

On Wed, Sep 08, 2021 at 11:34:52PM +0200, Thomas Schmitt wrote:
> The test for the ability to decompress zisofs encoded files is supposed
> to fail due to the lack of this ability in GRUB. But it fails early with
>   xorriso : FAILURE : -volid: Text too long (1650 > 32)
> because "ziso9660" is not in the list of filesystems which accept at most
> 32 bytes in their FSLABEL.
> If this is fixed, the test returns false success because the xorriso run
> does not produce any zisofs compressed files. The problem is in the
> sequence of native xorriso commands used. The command -set_filter_r
> applies only to the files which are already inserted into the emerging
> ISO filesystem. In the current sequence no files have been inserted yet
> by command -add when the last of two -set_filter_r commands is executed.
> After this is corrected, xorriso refuses to work because the global
> settings of command -zisofs can be made only before command -set_filter_r
> has attached zisofs filters to the data files in the emerging ISO.
> Further: A bug in xorriso causes a false warning about FSLABEL being
> too long for Joliet. Shortcommings of Joliet cause warnings about
> symbolic links. Such warnings might distract from the actual reason why
> the test is expected to fail.
>
> So add "ziso9660" to the 32-byte FSLABEL list.
> Fix the xorriso run to produce compressed files which for now cause
> righteous failure of the test. Do this by removing a surplus group of
> -set_filter_r and -zisofs commands, by moving the other such group
> behind -add, and by swapping -set_filter_r and -zisofs.
> Remove the -as mkisofs options which produce a Joliet filesystem tree.
>
> Signed-off-by: Thomas Schmitt <scdbackup@gmx.net>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Thank you for working on this!

Daniel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-09 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 21:34 [PATCH v2] tests: Keep grub-fs-tester ziso9660 from failing for wrong reasons Thomas Schmitt
2021-09-09 13:10 ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.