[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/69] iotests: Test driver whitelisting in 136
From: |
Max Reitz |
Subject: |
[PULL 06/69] iotests: Test driver whitelisting in 136 |
Date: |
Mon, 28 Oct 2019 13:13:58 +0100 |
null-aio may not be whitelisted. Skip all test cases that require it.
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Andrey Shinkevich <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/136 | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/136 b/tests/qemu-iotests/136
index a46a7b7630..012ea111ac 100755
--- a/tests/qemu-iotests/136
+++ b/tests/qemu-iotests/136
@@ -30,7 +30,7 @@ bad_offset = bad_sector * 512
blkdebug_file = os.path.join(iotests.test_dir, 'blkdebug.conf')
class BlockDeviceStatsTestCase(iotests.QMPTestCase):
- test_img = "null-aio://"
+ test_driver = "null-aio"
total_rd_bytes = 0
total_rd_ops = 0
total_wr_bytes = 0
@@ -67,6 +67,10 @@ sector = "%d"
''' % (bad_sector, bad_sector))
file.close()
+ def required_drivers(self):
+ return [self.test_driver]
+
+ @iotests.skip_if_unsupported(required_drivers)
def setUp(self):
drive_args = []
drive_args.append("stats-intervals.0=%d" % interval_length)
@@ -76,8 +80,8 @@ sector = "%d"
(self.account_failed and "on" or "off"))
drive_args.append("file.image.read-zeroes=on")
self.create_blkdebug_file()
- self.vm = iotests.VM().add_drive('blkdebug:%s:%s' %
- (blkdebug_file, self.test_img),
+ self.vm = iotests.VM().add_drive('blkdebug:%s:%s://' %
+ (blkdebug_file, self.test_driver),
','.join(drive_args))
self.vm.launch()
# Set an initial value for the clock
@@ -337,7 +341,9 @@ class
BlockDeviceStatsTestAccountBoth(BlockDeviceStatsTestCase):
account_failed = True
class BlockDeviceStatsTestCoroutine(BlockDeviceStatsTestCase):
- test_img = "null-co://"
+ test_driver = "null-co"
if __name__ == '__main__':
+ if 'null-co' not in iotests.supported_formats():
+ iotests.notrun('null-co driver support missing')
iotests.main(supported_fmts=["raw"])
--
2.21.0
- [PULL 00/69] Block patches for softfreeze, Max Reitz, 2019/10/28
- [PULL 01/69] iotests: Prefer null-co over null-aio, Max Reitz, 2019/10/28
- [PULL 02/69] iotests: Allow skipping test cases, Max Reitz, 2019/10/28
- [PULL 03/69] iotests: Use case_skip() in skip_if_unsupported(), Max Reitz, 2019/10/28
- [PULL 06/69] iotests: Test driver whitelisting in 136,
Max Reitz <=
- [PULL 04/69] iotests: Let skip_if_unsupported accept a function, Max Reitz, 2019/10/28
- [PULL 08/69] hbitmap: handle set/reset with zero length, Max Reitz, 2019/10/28
- [PULL 05/69] iotests: Test driver whitelisting in 093, Max Reitz, 2019/10/28
- [PULL 07/69] iotests: Cache supported_formats(), Max Reitz, 2019/10/28
- [PULL 09/69] block/mirror: simplify do_sync_target_write, Max Reitz, 2019/10/28
- [PULL 10/69] block/block-backend: add blk_co_pwritev_part, Max Reitz, 2019/10/28
- [PULL 11/69] block/mirror: support unaligned write in active mirror, Max Reitz, 2019/10/28
- [PULL 12/69] Revert "mirror: Only mirror granularity-aligned chunks", Max Reitz, 2019/10/28
- [PULL 13/69] iotests: Introduce $SOCK_DIR, Max Reitz, 2019/10/28
- [PULL 14/69] iotests.py: Store socket files in $SOCK_DIR, Max Reitz, 2019/10/28