qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests/check-block: Do not run the iotests with old versions


From: Thomas Huth
Subject: Re: [PATCH] tests/check-block: Do not run the iotests with old versions of bash
Date: Mon, 14 Sep 2020 13:21:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 14/09/2020 13.13, Max Reitz wrote:
> On 14.09.20 12:50, Thomas Huth wrote:
>> On 14/09/2020 11.19, Max Reitz wrote:
>>> On 12.09.20 14:14, 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
>>>
>>> grep -q instead of the redirections, perhaps?
>>>
>>> But more importantly, I think this needs a LANG=C prefix.  (If I expand
>>> the rejected major versions to [12345], it doesn’t skip without a
>>> prefix, because the string reads “GNU bash, Version 5...” here in
>>> LANG=de_DE.UTF-8.)
>>
>> Ouch, ok. But actually, I'm not quite sure anymore whether the patch is
>> really required. I ran into the "readlink -f" problem and thought that
>> it occurred due to the ancient version of bash on macOS, but as a I now
>> know, readlink is a separate program and not a bash built-in, so it's a
>> different issue... thus let's skip this patch here for now until we hit
>> a real issue with bash again.
> 
> Yes, I had hoped this patch would fix that issue.  Or perhaps at least
> hide it, because if you have a newer bash, chances are your readlink has
> -f, too.
> 
> So should we just effectively revert b1cbc33a397 if readlink -f didn’t
> work, i.e. check "$?" and on failure use $PWD as it was before b1cbc33a397?

Sounds like the best option that I currently can see, indeed. Want me to
send a patch, or will you provide one?

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]