From: Eric Blake <eblake@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
qemu-block@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org, "Hanna Reitz" <hreitz@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed
Date: Fri, 11 Feb 2022 10:14:10 -0600 [thread overview]
Message-ID: <20220211161410.sbxfy7tf7patm25i@redhat.com> (raw)
In-Reply-To: <80372081-ca28-7566-9fa7-6e6820a7b37f@redhat.com>
On Tue, Feb 08, 2022 at 03:52:19PM +0100, Thomas Huth wrote:
> > > The current code with $SED has been introduced almost three years
> > > ago already...
> > >
> > > > Can’t we just do `alias sed=gsed`?
> > >
> > > Maybe ... but let's ask Philippe and Kevin first, who Signed-off
> > > commit bde36af1ab4f476 that introduced the current way with $SED:
> > > What's your opinion about this?
> >
> > This commit was to have check-block working on the OpenBSD VM image.
>
> Sure. The question was whether using an alias as suggested by Hanna would be
> nicer instead of using $SED ?
Scripting with aliases becomes a nightmare to debug, since it is
relatively uncommon. In particular, in bash, you have to explicitly
opt in to using aliases (contrary to POSIX sh where aliases are
available to scripts at startup). Using $SED everywhere may require
more hunting, but it is more obvious when reading a test that "oh
yeah, I might be using extensions that the default 'sed' can't
support" than a script that blindly uses 'sed' and depends on it
aliasing to a more-capable sed at a distance.
The other question is how many GNU sed features are we actually
depending on? Which tests break if we have BSD sed or busybox sed?
Can we rewrite those sed scripts to avoid GNU extensions? But
auditing for s/sed/$SED/ seems easier than auditing for which
non-portable sed extensions we depend on.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2022-02-11 16:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 10:13 [PATCH 0/6] Improve integration of iotests in the meson test harness Thomas Huth
2022-02-08 10:13 ` [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed Thomas Huth
2022-02-08 11:46 ` Hanna Reitz
2022-02-08 12:13 ` Thomas Huth
2022-02-08 12:28 ` Hanna Reitz
2022-02-08 12:38 ` Thomas Huth
2022-02-08 13:11 ` Philippe Mathieu-Daudé via
2022-02-08 14:52 ` Thomas Huth
2022-02-11 16:14 ` Eric Blake [this message]
2022-02-11 16:48 ` Thomas Huth
2022-02-15 13:28 ` Thomas Huth
2022-02-15 13:51 ` Daniel P. Berrangé
2022-02-15 16:09 ` Thomas Huth
2022-02-08 10:13 ` [PATCH 2/6] tests/qemu-iotests/meson.build: Improve the indentation Thomas Huth
2022-02-08 10:51 ` Philippe Mathieu-Daudé via
2022-02-08 12:00 ` Hanna Reitz
2022-02-08 10:13 ` [PATCH 3/6] tests/qemu-iotests: Allow to run "./check -n" from the source directory, too Thomas Huth
2022-02-08 12:26 ` Hanna Reitz
2022-02-08 10:13 ` [PATCH 4/6] tests/qemu-iotests/meson.build: Call the 'check' script directly Thomas Huth
2022-02-08 12:36 ` Paolo Bonzini
2022-02-08 15:10 ` Thomas Huth
2022-02-08 16:19 ` Paolo Bonzini
2022-02-08 13:12 ` Hanna Reitz
2022-02-08 15:46 ` Thomas Huth
2022-02-08 10:13 ` [PATCH 5/6] tests: Do not treat the iotests as separate meson test target anymore Thomas Huth
2022-02-08 10:26 ` Peter Maydell
2022-02-08 11:16 ` Thomas Huth
2022-02-08 11:33 ` Peter Maydell
2022-02-08 12:37 ` Paolo Bonzini
2022-02-08 10:13 ` [PATCH 6/6] tests: Remove check-block.sh Thomas Huth
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=20220211161410.sbxfy7tf7patm25i@redhat.com \
--to=eblake@redhat.com \
--cc=f4bug@amsat.org \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).