[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 35/67] iotests/163: Honor $IMGOPTS
From: |
Max Reitz |
Subject: |
[PATCH 35/67] iotests/163: Honor $IMGOPTS |
Date: |
Tue, 1 Oct 2019 21:46:43 +0200 |
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/163 | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163
index 92633f1b21..5c5e23f9fc 100755
--- a/tests/qemu-iotests/163
+++ b/tests/qemu-iotests/163
@@ -19,7 +19,8 @@
#
import os, random, iotests, struct, qcow2, sys
-from iotests import qemu_img, qemu_io, image_size
+from iotests import create_test_image, remove_test_image, qemu_img, qemu_io, \
+ image_size
test_img = os.path.join(iotests.test_dir, 'test.img')
check_img = os.path.join(iotests.test_dir, 'check.img')
@@ -82,22 +83,19 @@ class ShrinkBaseClass(iotests.QMPTestCase):
def setUp(self):
if iotests.imgfmt == 'raw':
- qemu_img('create', '-f', iotests.imgfmt, test_img, self.image_len)
- qemu_img('create', '-f', iotests.imgfmt, check_img,
- self.shrink_size)
+ create_test_image(test_img, self.image_len)
+ create_test_image(check_img, self.shrink_size)
else:
- qemu_img('create', '-f', iotests.imgfmt,
- '-o', 'cluster_size=' + self.cluster_size +
- ',refcount_bits=' + self.refcount_bits,
- test_img, self.image_len)
- qemu_img('create', '-f', iotests.imgfmt,
- '-o', 'cluster_size=%s'% self.cluster_size,
- check_img, self.shrink_size)
+ create_test_image(test_img, self.image_len,
+ opts=['cluster_size=' + self.cluster_size,
+ 'refcount_bits=' + self.refcount_bits])
+ create_test_image(check_img, self.shrink_size,
+ opts=['cluster_size=' + self.cluster_size])
qemu_io('-c', 'write -P 0xff 0 ' + self.shrink_size, check_img)
def tearDown(self):
- os.remove(test_img)
- os.remove(check_img)
+ remove_test_image(test_img)
+ remove_test_image(check_img)
def image_verify(self):
self.assertEqual(image_size(test_img), image_size(check_img),
--
2.21.0
- [PATCH 25/67] iotests/118: Honor $IMGOPTS, (continued)
- [PATCH 25/67] iotests/118: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 28/67] iotests/132: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 26/67] iotests/124: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 27/67] iotests/129: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 29/67] iotests/139: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 30/67] iotests/147: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 32/67] iotests/151: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 31/67] iotests/148: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 33/67] iotests/152: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 34/67] iotests/155: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 35/67] iotests/163: Honor $IMGOPTS,
Max Reitz <=
- [PATCH 36/67] iotests/165: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 37/67] iotests/169: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 38/67] iotests/194: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 39/67] iotests/196: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 41/67] iotests/202: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 40/67] iotests/199: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 42/67] iotests/203: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 43/67] iotests/205: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 44/67] iotests/208: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 45/67] iotests/208: Honor $IMGOPTS, Max Reitz, 2019/10/01