[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/17] iotests: Skip Python-based tests if QEMU does not support v
From: |
Max Reitz |
Subject: |
[PULL 09/17] iotests: Skip Python-based tests if QEMU does not support virtio-blk |
Date: |
Thu, 6 Feb 2020 13:51:24 +0100 |
From: Thomas Huth <address@hidden>
We are going to enable some of the python-based tests in 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 a central spot in the "check" script instead (so that it is still
possible to run "make check" for qemu-system-tricore for example).
Signed-off-by: Thomas Huth <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/check | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 39ed5bc1be..fff5fa956a 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -655,7 +655,15 @@ fi
python_usable=false
if $PYTHON -c 'import sys; sys.exit(0 if sys.version_info >= (3,6) else 1)'
then
- python_usable=true
+ # Our python framework also requires virtio-blk
+ if "$QEMU_PROG" -M none -device help | grep -q virtio-blk >/dev/null 2>&1
+ then
+ python_usable=true
+ else
+ python_unusable_because="Missing virtio-blk in QEMU binary"
+ fi
+else
+ python_unusable_because="Unsupported Python version"
fi
default_machine=$($QEMU_PROG -machine help | sed -n '/(default)/ s/ .*//p')
@@ -843,7 +851,7 @@ do
run_command="$PYTHON $seq"
else
run_command="false"
- echo "Unsupported Python version" > $seq.notrun
+ echo "$python_unusable_because" > $seq.notrun
fi
else
run_command="./$seq"
--
2.24.1
- [PULL 00/17] Block patches, Max Reitz, 2020/02/06
- [PULL 01/17] qcow2: Assert that host cluster offsets fit in L2 table entries, Max Reitz, 2020/02/06
- [PULL 02/17] block: Use a GString in bdrv_perm_names(), Max Reitz, 2020/02/06
- [PULL 03/17] block: fix memleaks in bdrv_refresh_filename, Max Reitz, 2020/02/06
- [PULL 04/17] qcow2: Use a GString in report_unsupported_feature(), Max Reitz, 2020/02/06
- [PULL 05/17] iotests: remove 'linux' from default supported platforms, Max Reitz, 2020/02/06
- [PULL 06/17] iotests: Test 041 only works on certain systems, Max Reitz, 2020/02/06
- [PULL 07/17] iotests: Test 183 does not work on macOS and OpenBSD, Max Reitz, 2020/02/06
- [PULL 08/17] iotests: Check for the availability of the required devices in 267 and 127, Max Reitz, 2020/02/06
- [PULL 09/17] iotests: Skip Python-based tests if QEMU does not support virtio-blk,
Max Reitz <=
- [PULL 10/17] iotests: Enable more tests in the 'auto' group to improve test coverage, Max Reitz, 2020/02/06
- [PULL 12/17] qcow2: Tighten cluster_offset alignment assertions, Max Reitz, 2020/02/06
- [PULL 11/17] qcow2: Don't round the L1 table allocation up to the sector size, Max Reitz, 2020/02/06
- [PULL 13/17] qcow2: Use bs->bl.request_alignment when updating an L1 entry, Max Reitz, 2020/02/06
- [PULL 14/17] qcow2: Don't require aligned offsets in qcow2_co_copy_range_from(), Max Reitz, 2020/02/06
- [PULL 15/17] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value, Max Reitz, 2020/02/06
- [PULL 16/17] block/backup-top: fix failure path, Max Reitz, 2020/02/06
- [PULL 17/17] iotests: add test for backup-top failure on permission activation, Max Reitz, 2020/02/06
- Re: [PULL 00/17] Block patches, Peter Maydell, 2020/02/06