diff mbox series

[24/67] iotests/096: Honor $IMGOPTS

Message ID 20191001194715.2796-25-mreitz@redhat.com
State New
Headers show
Series iotests: Honor $IMGOPTS in Python tests | expand

Commit Message

Max Reitz Oct. 1, 2019, 7:46 p.m. UTC
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/096 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/096 b/tests/qemu-iotests/096
index ab9cb47822..ee0cfbffe8 100755
--- a/tests/qemu-iotests/096
+++ b/tests/qemu-iotests/096
@@ -20,6 +20,7 @@ 
 #
 
 import iotests
+from iotests import create_test_image, remove_test_image
 import os
 
 class TestLiveSnapshot(iotests.QMPTestCase):
@@ -35,13 +36,13 @@  class TestLiveSnapshot(iotests.QMPTestCase):
         opts.append('throttling.group=%s' % self.group)
         opts.append('throttling.iops-total=%d' % self.iops)
         opts.append('throttling.iops-size=%d' % self.iops_size)
-        iotests.qemu_img('create', '-f', iotests.imgfmt, self.base_img, '100M')
+        create_test_image(self.base_img, '100M')
         self.vm = iotests.VM().add_drive(self.base_img, ','.join(opts))
         self.vm.launch()
 
     def tearDown(self):
         self.vm.shutdown()
-        os.remove(self.base_img)
+        remove_test_image(self.base_img)
         os.remove(self.target_img)
 
     def checkConfig(self, active_layer):