iotests: ask QEMU for supported formats
commit57ed557f03e162904d6b137d315526304ac2083b
authorAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Thu, 7 Mar 2019 13:33:59 +0000 (7 16:33 +0300)
committerKevin Wolf <kwolf@redhat.com>
Fri, 8 Mar 2019 11:26:45 +0000 (8 12:26 +0100)
tree9c9bc0bee612111e311a68ec444e00b23c2f18f6
parent9ac404c5233f3033435ab250d30ea9f776188a01
iotests: ask QEMU for supported formats

Supported formats listed by 'qemu' may differ from those listed by
'qemu-img' due to whitelists. Some test cases require specific formats
that may be used with qemu. They can be inquired directly by running
'qemu -drive format=help'. The response takes whitelists into account.
The method supported_formats() serves for that. The method decorator
skip_if_unsupported() checks if all requested formats are whitelisted.
If not, the test case will be skipped. That has been implemented in
the 'check' file in the way similar to the 'test notrun' mechanism.

Suggested-by: Roman Kagan <rkagan@virtuozzo.com>
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/check
tests/qemu-iotests/iotests.py