[Qemu-devel] [PATCH 08/17] iotest 056: skip testcases using blkdebug if disabled

Roman Kagan posted 17 patches 7 years, 6 months ago
[Qemu-devel] [PATCH 08/17] iotest 056: skip testcases using blkdebug if disabled
Posted by Roman Kagan 7 years, 6 months ago
Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
---
 tests/qemu-iotests/056 | 3 +++
 1 file changed, 3 insertions(+)

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
-- 
2.14.3


Re: [Qemu-devel] [PATCH 08/17] iotest 056: skip testcases using blkdebug if disabled
Posted by Max Reitz 7 years, 5 months ago
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