All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glenn Washburn <development@efficientek.com>
To: "Thomas Schmitt" <scdbackup@gmx.net>
Cc: grub-devel@gnu.org, dkiper@net-space.pl
Subject: Re: [PATCH] tests: Refactor building xorriso command for iso9660 tests
Date: Fri, 10 Dec 2021 02:43:12 -0600	[thread overview]
Message-ID: <20211210024312.2e81085c@crass-HP-ZBook-15-G2> (raw)
In-Reply-To: <15442353715111753079@scdbackup.webframe.org>

On Wed, 08 Dec 2021 09:11:07 +0100
"Thomas Schmitt" <scdbackup@gmx.net> wrote:

> Hi,
> 
> i think this change is beneficial for the maintainability of the test.
> 
> But this sequence looks a bit confusing, albeit it is ok on the second
> glimpse:
> 
> +                   XORRISO_ARGS="-as mkisofs $XORRISOFS_CHARSET -graft-points"
> +
> +                   if [ -z "${fs##*rockridge*}" ]; then
> +                       XORRISO_ARGS="-rockridge on $XORRISO_ARGS"
> +                   else
> +                       XORRISO_ARGS="-rockridge off $XORRISO_ARGS"
> +                   fi
> +
> +                   if [ -z "${fs##*1999*}" ]; then
> +                       XORRISO_ARGS="$XORRISO_ARGS -iso-level 4"
> +                   else
> +                       XORRISO_ARGS="$XORRISO_ARGS -iso-level 3"
> +                   fi
> 
> It is essential here, but not really obvious, that the native command
> -rockridge "on"|"off" must be _prepended_ to XORRISO_ARGS whereas the
> mkisofs emulation options must be _appended_ to the variable content.
> 
> If not, then the xorriso run would fail:
> 
>   $ xorriso -as mkisofs -rockridge on
>   ...
>   xorriso : FAILURE : -as mkisofs: Unrecognized option '-rockridge'
>   xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'
> 
>   $ xorriso -iso-level 4 -as mkisofs
>   ...
>   xorriso : FAILURE : Not a known command:  '-iso-level'
> 
>   xorriso : FAILURE : Not a known command:  '4'
> 
>   xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'
>   $
> 
> It would be more intuitive to build XORRISO_ARGS in the sequence that
> will be seen by xorriso.
> 
> So consider to pull -compliance "rec_mtime" into XORRISO_ARGS too, and
> to set the native commands before the -as "mkisofs" command.
> Like:
> 
>                    XORRISO_ARGS="-compliance rec_mtime"
> 
>                    if [ -z "${fs##*rockridge*}" ]; then
>                        XORRISO_ARGS="$XORRISO_ARGS -rockridge on"
>                    else
>                        XORRISO_ARGS="$XORRISO_ARGS -rockridge off"
>                    fi
> 
>                    XORRISO_ARGS="$XORRISO_ARGS -as mkisofs $XORRISOFS_CHARSET -graft-points"
> 
>                    if [ -z "${fs##*1999*}" ]; then
>                        XORRISO_ARGS="$XORRISO_ARGS -iso-level 4"
>                    else
>                        XORRISO_ARGS="$XORRISO_ARGS -iso-level 3"
>                    fi
> 
>                    if [ -z "${fs##*joliet*}" ]; then
>                        XORRISO_ARGS="$XORRISO_ARGS -J -joliet-long"
>                    fi
> 
>                    xorriso $XORRISO_ARGS -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
> 
> 
> Have a nice day :)
> 
> Thomas
> 

Thanks for the suggestion Thomas. I've updated the patch to add this.

Glenn


      reply	other threads:[~2021-12-10  8:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08  6:40 [PATCH] tests: Refactor building xorriso command for iso9660 tests Glenn Washburn
2021-12-08  8:11 ` Thomas Schmitt
2021-12-10  8:43   ` Glenn Washburn [this message]

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=20211210024312.2e81085c@crass-HP-ZBook-15-G2 \
    --to=development@efficientek.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    --cc=scdbackup@gmx.net \
    /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.