qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 63/67] iotests/257: Honor $IMGOPTS


From: Max Reitz
Subject: [PATCH 63/67] iotests/257: Honor $IMGOPTS
Date: Tue, 1 Oct 2019 21:47:11 +0200

Signed-off-by: Max Reitz <address@hidden>
---
 tests/qemu-iotests/257 | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257
index 82c10e9b52..ea38945a71 100755
--- a/tests/qemu-iotests/257
+++ b/tests/qemu-iotests/257
@@ -23,7 +23,7 @@ import math
 import os
 
 import iotests
-from iotests import log, qemu_img
+from iotests import log, create_test_image, qemu_img
 
 SIZE = 64 * 1024 * 1024
 GRANULARITY = 64 * 1024
@@ -152,7 +152,7 @@ class Drive:
     def img_create(self, fmt, size):
         self.fmt = fmt
         self.size = size
-        iotests.qemu_img_create('-f', self.fmt, self.path, str(self.size))
+        create_test_image(self.path, self.size)
 
     def create_target(self, name, fmt, size):
         basename = os.path.basename(self.path)
@@ -273,10 +273,10 @@ def test_bitmap_sync(bsync_mode, msync_mode='bitmap', 
failure=None):
                         an incomplete backup. Testing limitations prevent
                         testing competing writes.
     """
-    with iotests.FilePaths(['img', 'bsync1', 'bsync2',
+    with iotests.ImagePath('img') as img_path, \
+        iotests.FilePaths(['bsync1', 'bsync2',
                             'fbackup0', 'fbackup1', 'fbackup2']) as \
-                            (img_path, bsync1, bsync2,
-                             fbackup0, fbackup1, fbackup2), \
+                            (bsync1, bsync2, fbackup0, fbackup1, fbackup2), \
          iotests.VM() as vm:
 
         mode = "Mode {:s}; Bitmap Sync {:s}".format(msync_mode, bsync_mode)
@@ -439,8 +439,8 @@ def test_backup_api():
     """
     Test malformed and prohibited invocations of the backup API.
     """
-    with iotests.FilePaths(['img', 'bsync1']) as \
-         (img_path, backup_path), \
+    with iotests.ImagePath('img') as img_path, \
+         iotests.FilePath('bsync1') as backup_path, \
          iotests.VM() as vm:
 
         log("\n=== API failure tests ===\n")
-- 
2.21.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]