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 <th...@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.

 Thomas


Reply via email to