Skip to contentSkip to conversation

tests/check-block.sh: Refuse to run the iotests with BusyBox' sed

PATCH Applied Thomas Huth 4 participants 4 messages Jan 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/check-block.sh: Refuse to run the iotests with BusyBox' sed

BusyBox' sed reports itself as "This is not GNU sed version 4.0" when being run with the --version parameter. However, the iotests really need GNU sed, they do not work with the BusyBox version. So let's make sure that we really have GNU sed and refuse to run the tests with BusyBox' sed.

---
 tests/check-block.sh | 7 +++++++
 1 file changed, 7 insertions(+)
tests/check-block.sh +7 -0
index fb4c1baae9..e4f37905be 100755
@@ -60,6 +60,13 @@ if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then
         echo "GNU sed not available ==> Not running the qemu-iotests."
         exit 0
     fi
+else
+    # Double-check that we're not using BusyBox' sed which says
+    # that "This is not GNU sed version 4.0" ...
+    if sed --version | grep -q 'not GNU sed' ; then
+        echo "BusyBox sed not supported ==> Not running the qemu-iotests."
+        exit 0
+    fi
 fi
 
 cd tests/qemu-iotests
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Thomas Huth

BusyBox' sed reports itself as "This is not GNU sed version 4.0" when being run with the --version parameter. However, the iotests really need GNU sed, they do not work with the BusyBox version. So let's make sure that we really have GNU sed and refuse to run the tests with BusyBox' sed.

---
 tests/check-block.sh | 7 +++++++
 1 file changed, 7 insertions(+)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 17 lines · Thomas Huth

BusyBox' sed reports itself as "This is not GNU sed version 4.0" when being run with the --version parameter. However, the iotests really need GNU sed, they do not work with the BusyBox version. So let's make sure that we really have GNU sed and refuse to run the tests with BusyBox' sed.

---
 tests/check-block.sh | 7 +++++++
 1 file changed, 7 insertions(+)
tests/check-block.sh +0 -0
index fb4c1baae9..e4f37905be 100755
@@ -60,6 +60,13 @@ if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then
         echo "GNU sed not available ==> Not running the qemu-iotests."

tests/check-block.sh if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then · line 70

Quoted 10 lines
tests/check-block.sh +7 -0
         exit 0
     fi
+else
+    # Double-check that we're not using BusyBox' sed which says
+    # that "This is not GNU sed version 4.0" ...
+    if sed --version | grep -q 'not GNU sed' ; then
+        echo "BusyBox sed not supported ==> Not running the qemu-iotests."
+        exit 0
+    fi
 fi

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 19.01.2021 um 14:47 hat Thomas Huth geschrieben:

Quoted 7 lines

BusyBox' sed reports itself as "This is not GNU sed version 4.0" when being run with the --version parameter. However, the iotests really need GNU sed, they do not work with the BusyBox version. So let's make sure that we really have GNU sed and refuse to run the tests with BusyBox' sed.

Thanks, applied to the block branch.

Kevin