diff mbox series

[08/17] iotest 056: skip testcases using blkdebug if disabled

Message ID 20180426161958.2872-9-rkagan@virtuozzo.com
State New
Headers show
Series iotests: don't choke on disabled drivers | expand

Commit Message

Roman Kagan April 26, 2018, 4:19 p.m. UTC
Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
---
 tests/qemu-iotests/056 | 3 +++
 1 file changed, 3 insertions(+)

Comments

Max Reitz May 30, 2018, 12:26 p.m. UTC | #1
On 2018-04-26 18:19, Roman Kagan wrote:
> Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
> ---
>  tests/qemu-iotests/056 | 3 +++
>  1 file changed, 3 insertions(+)

TestBeforeWriteNotifier uses blkdebug (and null-co) in its setUp
function.  Maybe you just want to skip the whole test if blkdebug is
disabled.

Then again, I'd argue there are block drivers without which running the
iotests is a bit pointless.  Why not just require blkdebug, null-co/aio,
raw, and file for all of them?

I think the reason why we added the check for quorum support was because
quorum relies on an external library (for hashing), so it isn't trivial
to enable.  But you can always easily whitelist those drivers above if
you want to do testing, so I'm not sure whether it's worth checking
their availability in every test that needs them.

Max
diff mbox series

Patch

diff --git a/tests/qemu-iotests/056 b/tests/qemu-iotests/056
index 223292175a..ff40313851 100755
--- a/tests/qemu-iotests/056
+++ b/tests/qemu-iotests/056
@@ -230,6 +230,9 @@  class BackupTest(iotests.QMPTestCase):
                                  auto_dismiss=False)
 
     def dismissal_failure(self, dismissal_opt):
+        if not iotests.supports_format('blkdebug'):
+            return
+
         res = self.vm.qmp('query-block-jobs')
         self.assert_qmp(res, 'return', [])
         # Give blkdebug something to chew on