qemu-block
[Top][All Lists]
Advanced

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

[PATCH 49/67] iotests/222: Honor $IMGOPTS


From: Max Reitz
Subject: [PATCH 49/67] iotests/222: Honor $IMGOPTS
Date: Tue, 1 Oct 2019 21:46:57 +0200

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

diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222
index ffa88d4bb9..7ae76c1be1 100644
--- a/tests/qemu-iotests/222
+++ b/tests/qemu-iotests/222
@@ -22,7 +22,7 @@
 # Creator/Owner: John Snow <address@hidden>
 
 import iotests
-from iotests import log, qemu_img, qemu_io, qemu_io_silent
+from iotests import log, create_test_image, qemu_io, qemu_io_silent
 
 iotests.script_initialize(supported_fmts=['qcow2', 'qcow', 'qed', 'vmdk',
                                           'vhdx', 'raw'],
@@ -46,16 +46,16 @@ remainder = [("0xd5", "0x108000",  "32k"), # Right-end of 
partial-left [1]
              ("0xdc", "32M",       "32k"), # Left-end of partial-right [2]
              ("0xcd", "0x3ff0000", "64k")] # patterns[3]
 
-with iotests.FilePath('base.img') as base_img_path, \
-     iotests.FilePath('fleece.img') as fleece_img_path, \
+with iotests.ImagePath('base.img') as base_img_path, \
+     iotests.ImagePath('fleece.img') as fleece_img_path, \
      iotests.FilePath('nbd.sock') as nbd_sock_path, \
      iotests.VM() as vm:
 
     log('--- Setting up images ---')
     log('')
 
-    assert qemu_img('create', '-f', iotests.imgfmt, base_img_path, '64M') == 0
-    assert qemu_img('create', '-f', "qcow2", fleece_img_path, '64M') == 0
+    assert create_test_image(base_img_path, '64M') == 0
+    assert create_test_image(fleece_img_path, '64M', fmt='qcow2') == 0
 
     for p in patterns:
         qemu_io('-f', iotests.imgfmt,
-- 
2.21.0




reply via email to

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