[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 12:45:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 14/09/2020 11.36, 罗勇刚(Yonggang Luo) wrote:
>
>
> On Sat, Sep 12, 2020 at 8:16 PM Thomas Huth <thuth@redhat.com
> <mailto:thuth@redhat.com>> 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 <mailto: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
>> + echo "bash version too old ==> Not running the qemu-iotests."
>> + exit 0
>> +fi
>> +
>> if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then
>> if ! command -v gsed >/dev/null 2>&1; then
>> echo "GNU sed not available ==> Not running the qemu-iotests."
>> --
>> 2.18.2
>>
>>
> Is that worth to convert the check-block.sh script to python script? so
> it can even running under msys2/mingw?
No, you need bash for the various iotest anyway.
Thomas