From: Eric Blake <eblake@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Cc: "Daniel P . Berrangé" <berrange@redhat.com>, qemu-block@nongnu.org
Subject: Re: [PATCH] tests/check-block: Do not run the iotests with old versions of bash
Date: Mon, 14 Sep 2020 11:01:48 -0500 [thread overview]
Message-ID: <25b36a43-cf0d-c4d8-4289-8b7add39e607@redhat.com> (raw)
In-Reply-To: <ea934211-75d3-456d-1456-3aba3689db68@redhat.com>
On 9/14/20 10:33 AM, Thomas Huth wrote:
> On 14/09/2020 17.03, Eric Blake wrote:
>> On 9/12/20 7:14 AM, Thomas Huth wrote:
>>> macOS is shipped with a very old version of the bash (3.2), which
>>> is currently not suitable for running the iotests anymore. Add
>>> a check to skip the iotests in this case - if someone still wants
>>> to run the iotests on macOS, they can install a newer version from
>>> homebrew, for example.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>> tests/check-block.sh | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/tests/check-block.sh b/tests/check-block.sh
>>> index 8e29c868e5..bfe1630c1e 100755
>>> --- a/tests/check-block.sh
>>> +++ b/tests/check-block.sh
>>> @@ -46,6 +46,11 @@ if ! command -v bash >/dev/null 2>&1 ; then
>>> exit 0
>>> fi
>>> +if bash --version | grep 'GNU bash, version [123]' > /dev/null 2>&1
>>> ; then
>>
>> We're already running bash - why do we need to spawn another bash and a
>> grep, when we can just check $BASH_VERSION?
>
> tests/check-block.sh uses "#!/bin/sh", so it could be running with a
> different kind of shell, I think.
Ah, right; I'm so used to most of our testsuite demanding bash that I
forgot to check that this script sticks to the smaller subset of /bin/sh
portability.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
prev parent reply other threads:[~2020-09-14 16:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-12 12:14 [PATCH] tests/check-block: Do not run the iotests with old versions of bash Thomas Huth
2020-09-14 9:19 ` Max Reitz
2020-09-14 10:50 ` Thomas Huth
2020-09-14 11:13 ` Max Reitz
2020-09-14 11:21 ` Thomas Huth
2020-09-14 9:36 ` 罗勇刚(Yonggang Luo)
2020-09-14 10:45 ` Thomas Huth
2020-09-14 15:03 ` Eric Blake
2020-09-14 15:33 ` Thomas Huth
2020-09-14 16:01 ` Eric Blake [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=25b36a43-cf0d-c4d8-4289-8b7add39e607@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=mreitz@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).