Skip to contentSkip to conversation

tests/check-block: Do not run the iotests with old versions of bash

PATCH Applied Thomas Huth 4 participants 4 messages Sep 18, 2020 – Sep 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tests/check-block: Do not run the iotests with old versions of bash

macOS is shipped with a very old version of the bash (3.2), which is currently not suitable for running the iotests anymore (e.g. it is missing support for "readarray" which is used in the file tests/qemu-iotests/common.filter). 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.

---
v2: Use LANG=C and "-q"

 tests/check-block.sh | 5 +++++
 1 file changed, 5 insertions(+)
tests/check-block.sh +5 -0
index a5a69060e1..f6b1bda7b9 100755
@@ -46,6 +46,11 @@ if ! command -v bash >/dev/null 2>&1 ; then
     exit 0
 fi
 
+if LANG=C bash --version | grep -q 'GNU bash, version [123]' ; 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."
Signature · 1 line
2.18.2
#1 lore raw
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

N/A. Internal error while reading log file

The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

Reviewed-by on v2 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 7 lines · Thomas Huth

macOS is shipped with a very old version of the bash (3.2), which is currently not suitable for running the iotests anymore (e.g. it is missing support for "readarray" which is used in the file tests/qemu-iotests/common.filter). 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.

Quoted 6 lines

---
v2: Use LANG=C and "-q"

 tests/check-block.sh | 5 +++++
 1 file changed, 5 insertions(+)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Applied
#3 lore raw
In reply to Thomas Huth

Am 18.09.2020 um 17:35 hat Thomas Huth geschrieben:

Quoted 8 lines

macOS is shipped with a very old version of the bash (3.2), which is currently not suitable for running the iotests anymore (e.g. it is missing support for "readarray" which is used in the file tests/qemu-iotests/common.filter). 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.

Thanks, applied to the block branch.

Kevin