All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Cc: development@efficientek.com
Subject: [grub-fs-tester.in] zisofs test looks unsuitable
Date: Wed, 25 Aug 2021 12:29:48 +0200	[thread overview]
Message-ID: <13604360919200184315@scdbackup.webframe.org> (raw)

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



             reply	other threads:[~2021-08-25 10:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 10:29 Thomas Schmitt [this message]
2021-08-25 20:59 ` [grub-fs-tester.in] zisofs test looks unsuitable 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13604360919200184315@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=development@efficientek.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.