[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 17/19] iotests: Skip "make check-block" if QEMU does not suppo
From: |
Alex Bennée |
Subject: |
[PATCH v1 17/19] iotests: Skip "make check-block" if QEMU does not support virtio-blk |
Date: |
Tue, 22 Oct 2019 20:17:02 +0100 |
From: Thomas Huth <address@hidden>
The next patch is going to add some python-based tests to the "auto"
group, and these tests require virtio-blk to work properly. Running
iotests without virtio-blk likely does not make too much sense anyway,
so instead of adding a check for the availability of virtio-blk to each
and every test (which does not sound very appealing), let's rather add
a check for this at the top level in the check-block.sh script instead
(so that it is possible to run "make check" without the "check-block"
part for qemu-system-tricore for example).
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
---
tests/check-block.sh | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/tests/check-block.sh b/tests/check-block.sh
index 679aedec50c..e9e2978818a 100755
--- a/tests/check-block.sh
+++ b/tests/check-block.sh
@@ -26,10 +26,24 @@ if grep -q "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null
; then
exit 0
fi
-if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then
+if [ -n "$QEMU_PROG" ]; then
+ qemu_prog="$QEMU_PROG"
+else
+ for binary in *-softmmu/qemu-system-* ; do
+ if [ -x "$binary" ]; then
+ qemu_prog="$binary"
+ break
+ fi
+ done
+fi
+if [ -z "$qemu_prog" ]; then
echo "No qemu-system binary available ==> Not running the qemu-iotests."
exit 0
fi
+if ! "$qemu_prog" -M none -device help | grep -q virtio-blk >/dev/null 2>&1 ;
then
+ echo "$qemu_prog does not support virtio-blk ==> Not running the
qemu-iotests."
+ exit 0
+fi
if ! command -v bash >/dev/null 2>&1 ; then
echo "bash not available ==> Not running the qemu-iotests."
--
2.20.1
- Re: [PATCH v1 13/19] travis.yml: cache the clang sanitizer build, (continued)
- [PATCH v1 10/19] tests/vm: netbsd autoinstall, using serial console, Alex Bennée, 2019/10/22
- [PATCH v1 14/19] iotests: remove 'linux' from default supported platforms, Alex Bennée, 2019/10/22
- [PATCH v1 15/19] iotests: Test 041 only works on certain systems, Alex Bennée, 2019/10/22
- [PATCH v1 16/19] iotests: Test 183 does not work on macOS and OpenBSD, Alex Bennée, 2019/10/22
- [PATCH v1 12/19] tests/vm/netbsd: Disable IPv6, Alex Bennée, 2019/10/22
- [PATCH v1 18/19] iotests: Enable more tests in the 'auto' group to improve test coverage, Alex Bennée, 2019/10/22
- [PATCH v1 19/19] iotests: Remove 130 from the "auto" group, Alex Bennée, 2019/10/22
- [PATCH v1 17/19] iotests: Skip "make check-block" if QEMU does not support virtio-blk,
Alex Bennée <=
- Re: [PATCH for 4.2 v1 00/19] testing/next before softfreeze, Alex Bennée, 2019/10/22
- Re: [PATCH for 4.2 v1 00/19] testing/next before softfreeze, Thomas Huth, 2019/10/23