All of lore.kernel.org
 help / color / mirror / Atom feed
* [grub-fs-tester.in] zisofs test looks unsuitable
@ 2021-08-25 10:29 Thomas Schmitt
  2021-08-25 20:59 ` Glenn Washburn
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Schmitt @ 2021-08-25 10:29 UTC (permalink / raw)
  To: grub-devel; +Cc: development

Hi,

the xorriso run for testing zisofs in

  tests/util/grub-fs-tester.in

looks not like it would cause any zisofs compression in the ISO.

Line 1024:

      xorriso -compliance rec_mtime -set_filter_r --zisofs -- -zisofs default
              -as mkisofs ... some options ... --
              -set_filter_r --zisofs -- -zisofs default -add /="$MASTER" ;;

should probably become

      xorriso -compliance rec_mtime \
              -as mkisofs ... same options as above ... -- \
              -add /="$MASTER" -- \
              -zisofs default \
              -set_filter_r --zisofs / --
              ;;

In the current run, both times when "-set_filter_r --zisofs" is executed
in xorriso's native command mode, the emerging root directory is still empty.
So -set_filter_r cannot yet affect the files of "$MASTER" which get added
only later.

Command -zisofs sets parameters for -set_filter_r. So it must be executed
before any successful -set_filter_r. Only the lack of any installed
compression filters keeps the existing run from failing with
  libisofs: FAILURE : Cannot set global zisofs parameters while filters exist

Further:
Command -set_filter_r expects one or more paths in the ISO as parameters.
The empty path list defaults to "/" indeed, but that's not a documented
feature.
Command -add has a variable length parameter list and should thus be
terminated by '--'. In my proposal it has to be terminated because more
commands follow.


Experiment:

Currently the run is essentially like

  xorriso -compliance rec_mtime \
          -as mkisofs -o test.iso --graft-points -- \
          -add /=test -- -set_filter_r --zisofs / --

My test directory contains

  -rw-r--r-- 1 thomas thomas 51200 Aug 25 11:51 zeros
  -rw-r--r-- 1 thomas thomas     6 Aug 25 09:37 ÄÖÜß

No zisofs compression gets applied by above run to the files, as can be
seen by a subsequent run of

  xorriso -indev test.iso -find / -exec show_stream --

which reports

  '/zeros' < image:'/zeros'
  '/ÄÖÜß' < image:'/ÄÖÜß'

In contrast, my proposed xorriso run causes compression of file "zeros",
which then causes the xorriso run with -indev to install a decompression
filter to that file:

  '/zeros' < --zisofs-decode:pz:32k < image:'/zeros'
  '/ÄÖÜß' < image:'/ÄÖÜß'

The small "ÄÖÜß" staid uncompressed, because compression yielded no gain in
terms of 2048 byte blocks.


Have a nice day :)

Thomas



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

end of thread, other threads:[~2021-08-27  3:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-25 10:29 [grub-fs-tester.in] zisofs test looks unsuitable Thomas Schmitt
2021-08-25 20:59 ` Glenn Washburn
2021-08-26  7:34   ` Thomas Schmitt
2021-08-26 20:07     ` Thomas Schmitt
2021-08-26 21:18       ` Glenn Washburn
2021-08-26 22:14         ` Thomas Schmitt
2021-08-27  3:30           ` Glenn Washburn

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.