aboutsummaryrefslogtreecommitdiff
path: root/tests/check-block.sh
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2022-02-16 13:54:54 +0100
committerKevin Wolf <kwolf@redhat.com>2022-03-04 18:18:26 +0100
commit9086c7639822b6e96aa93192917bf036e1345b1d (patch)
treed59217a127a9731edd9727fd4e64f3077bf7c2fc /tests/check-block.sh
parent971bea8089531af56b1bbd9ce62e756bdf006711 (diff)
tests/qemu-iotests: Rework the checks and spots using GNU sed
Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better to simply skip the bash-based tests that rely on GNU sed, so that the other tests could still be run. Thus we now explicitely use "gsed" (either as direct program or as a wrapper around "sed" if it's the GNU version) in the spots that rely on the GNU sed behavior. Statements that use the "-r" parameter of sed have been switched to use "-E" instead, since this switch is supported by all sed versions on our supported build hosts (most also support "-r", but macOS' sed only supports "-E"). With all these changes in place, we then can also remove the sed checks from the check-block.sh script, so that "make check-block" can now be run on systems without GNU sed, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220216125454.465041-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/check-block.sh')
-rwxr-xr-xtests/check-block.sh12
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/check-block.sh b/tests/check-block.sh
index 18f7433901..f59496396c 100755
--- a/tests/check-block.sh
+++ b/tests/check-block.sh
@@ -48,18 +48,6 @@ if LANG=C bash --version | grep -q 'GNU bash, version [123]' ; then
skip "bash version too old ==> Not running the qemu-iotests."
fi
-if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then
- if ! command -v gsed >/dev/null 2>&1; then
- skip "GNU sed not available ==> Not running the qemu-iotests."
- 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
- skip "BusyBox sed not supported ==> Not running the qemu-iotests."
- fi
-fi
-
cd tests/qemu-iotests
# QEMU_CHECK_BLOCK_AUTO is used to disable some unstable sub-tests