summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/118
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2020-06-17 12:48:18 +0200
committerKevin Wolf <kwolf@redhat.com>2020-06-17 16:21:21 +0200
commitff3caf5af0fd204133668f26fde39b27f86c5d76 (patch)
tree19cd6b442532313096e2b5548599bb04a0b51064 /tests/qemu-iotests/118
parent6510ba1c0ebd1503097ac831956505adf5ec29d2 (diff)
downloadqemu-ff3caf5af0fd204133668f26fde39b27f86c5d76.zip
iotests.py: Add skip_for_formats() decorator
Sometimes, we want to skip some test methods for certain formats. This decorator allows that. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200617104822.27525-2-mreitz@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/118')
-rwxr-xr-xtests/qemu-iotests/1187
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118
index adc8a848b5..2350929fd8 100755
--- a/tests/qemu-iotests/118
+++ b/tests/qemu-iotests/118
@@ -683,11 +683,10 @@ class TestBlockJobsAfterCycle(ChangeBaseClass):
except OSError:
pass
+ # We need backing file support
+ @iotests.skip_for_formats(('vpc', 'parallels', 'qcow', 'vdi', 'vmdk', 'raw',
+ 'vhdx'))
def test_snapshot_and_commit(self):
- # We need backing file support
- if iotests.imgfmt != 'qcow2' and iotests.imgfmt != 'qed':
- return
-
result = self.vm.qmp('blockdev-snapshot-sync', device='drive0',
snapshot_file=new_img,
format=iotests.imgfmt)