diff mbox series

[22/67] iotests/057: Honor $IMGOPTS

Message ID 20191001194715.2796-23-mreitz@redhat.com (mailing list archive)
State New, archived
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/057 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/057 b/tests/qemu-iotests/057
index f5aa5929dc..c83f969b09 100755
--- a/tests/qemu-iotests/057
+++ b/tests/qemu-iotests/057
@@ -23,7 +23,7 @@ 
 import time
 import os
 import iotests
-from iotests import qemu_img, qemu_io
+from iotests import create_test_image, remove_test_image, qemu_io
 
 test_drv_base_name = 'drive'
 
@@ -40,7 +40,7 @@  class ImageSnapshotTestCase(iotests.QMPTestCase):
             filename = '%s%d' % (test_img_base_name, i)
             img = os.path.join(iotests.test_dir, filename)
             device = '%s%d' % (test_drv_base_name, i)
-            qemu_img('create', '-f', iotests.imgfmt, img, str(self.image_len))
+            create_test_image(img, self.image_len)
             self.vm.add_drive(img)
             self.expect.append({'image': img, 'device': device,
                                 'snapshots': [],
@@ -50,7 +50,7 @@  class ImageSnapshotTestCase(iotests.QMPTestCase):
     def tearDown(self):
         self.vm.shutdown()
         for dev_expect in self.expect:
-            os.remove(dev_expect['image'])
+            remove_test_image(dev_expect['image'])
 
     def createSnapshotInTransaction(self, snapshot_num, abort = False):
         actions = []