Skip to contentSkip to conversation

tests: Keep grub-fs-tester ziso9660 from failing for wrong reasons

PATCH Superseded Thomas Schmitt 2 participants 4 messages Sep 8, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: Keep grub-fs-tester ziso9660 from failing for wrong reasons

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. A bug in xorriso causes a distracting warning about FSLABEL being too long for Joliet. Shortcommings of Joliet cause warnings about symbolic links.

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. Remove the option to produce a Joliet filesystem tree in order to concentrate on testing zisofs decompression.

---
 tests/util/grub-fs-tester.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tests/util/grub-fs-tester.in +3 -2
index 4f581b638..a28e07295 100644
@@ -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

#1 lore raw

Hi,

sorry for messing up the mail subject by "[PATCH] [PATCH]". (I added one of them already to the local commit message.)

Shall i send new mail with better subject ?

Have a nice day :)

Thomas

#2 lore raw
In reply to Thomas Schmitt
Quoted 8 lines · 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. A bug in xorriso causes a distracting warning about FSLABEL being too long for Joliet. Shortcommings of Joliet cause warnings about symbolic links.

s/links./links too./?

Quoted 1 line

So add "ziso9660" to the 32-byte FSLABEL list. Fix the xorriso run to

I have an itching to ask you to split this thing into two patches. Though I am not really convinced doing it. So, feel free to do what is better here in your opinion...

Quoted 24 lines

produce compressed files which for now cause righteous failure of the test. Remove the option to produce a Joliet filesystem tree in order to concentrate on testing zisofs decompression.

---
 tests/util/grub-fs-tester.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tests/util/grub-fs-tester.in +2 -1
index 4f581b638..a28e07295 100644
@@ -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 /

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

Quoted 5 lines
tests/util/grub-fs-tester.in +1 -1
@@ -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 / -- ;;

You described everything in the commit message what you are doing here except of "-set_filter_r --zisofs -- -zisofs default" games. Could you explain that too? And if you could not change the order of above mentioned options it would be nice. Or explain why you change the order.

Daniel

#3 lore raw

Hi,

i am working on the requested changes.

Quoted 3 lines · In my patch message i
Quoted 3 lines

A bug
in xorriso causes a distracting warning about FSLABEL being too long for Joliet. Shortcommings of Joliet cause warnings about symbolic links.

Quoted 1 line · Daniel Kiper

s/links./links too./?

Rather not. Both warnings have very different reasons.
The xorriso bug was that the warning came if more than 16 bytes of volume id are submitted. The correct test is to count the UCS-2 characters after conversion from the local character set (meanwhile surely UTF-8). The FSLABEL which is prepared by grub-fs-tester for ISO 9660 tests has only 15 characters but 32 UTF-8 bytes.
The shortcomming of Joliet is in its specs. It was invented by Microsoft Inc. for presenting Microsoft filesystem names. At least back in 1995 no symbolic links were desired for their version of ISO 9660. Other than the xorriso bug i cannot fix this.

Both warnings could deceive the reader of the test report, especially since the test is expected to fail. Thus my patch disables Joliet to silence both for all xorriso versions.

Quoted 1 line

I have an itching to ask you to split this thing into two patches.

I decided against this because the test would indicate false success after the early failure because of the FSLABEL length is fixed. If i fix the xorriso command sequence problem first, then this first patch does not have any effect at run time.

So i rather consider the ziso9660 test as untested sketch which i replace by a working test with proper failure as long as no zisofs decompression is implemented.

Quoted 3 lines

You described everything in the commit message what you are doing here except of "-set_filter_r --zisofs -- -zisofs default" games. Could you explain that too?

Will try without copying a whole paragraph from man xorriso.

Have a nice day :)

Thomas