diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-09-24 17:27:16 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-10-02 15:46:40 +0200 |
commit | f71255228e7a906511c8d862c076cd184069d28c (patch) | |
tree | 91a4aa49e4e007a79e3cd0a1a892c4fa7f57db9b | |
parent | 81b6b2bc1af5b651e4cc659b0dbbf9626fbc227c (diff) | |
download | qemu-f71255228e7a906511c8d862c076cd184069d28c.zip |
iotests: Allow supported and unsupported formats at the same time
This is useful for specifying 'generic' as supported (which includes
only writable image formats), but still excluding some incompatible
writable formats.
It also removes more lines than it adds.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200924152717.287415-31-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | tests/qemu-iotests/iotests.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 9695c917e4..f212cec446 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -1062,16 +1062,12 @@ def case_notrun(reason): def _verify_image_format(supported_fmts: Sequence[str] = (), unsupported_fmts: Sequence[str] = ()) -> None: - assert not (supported_fmts and unsupported_fmts) - if 'generic' in supported_fmts and \ os.environ.get('IMGFMT_GENERIC', 'true') == 'true': # similar to # _supported_fmt generic # for bash tests - if imgfmt == 'luks': - verify_working_luks() - return + supported_fmts = () not_sup = supported_fmts and (imgfmt not in supported_fmts) if not_sup or (imgfmt in unsupported_fmts): |