[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 61/67] iotests/255: Honor $IMGOPTS
From: |
Max Reitz |
Subject: |
[PATCH 61/67] iotests/255: Honor $IMGOPTS |
Date: |
Tue, 1 Oct 2019 21:47:09 +0200 |
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/255 | 20 +++++++++-----------
tests/qemu-iotests/255.out | 8 --------
2 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/tests/qemu-iotests/255 b/tests/qemu-iotests/255
index ff16402268..4e745b68fa 100755
--- a/tests/qemu-iotests/255
+++ b/tests/qemu-iotests/255
@@ -21,7 +21,7 @@
#
import iotests
-from iotests import imgfmt
+from iotests import imgfmt, create_test_image
iotests.script_initialize(supported_fmts=['qcow2'])
@@ -39,8 +39,8 @@ iotests.log('Finishing a commit job with background reads')
iotests.log('============================================')
iotests.log('')
-with iotests.FilePath('t.qcow2') as disk_path, \
- iotests.FilePath('t.qcow2.mid') as mid_path, \
+with iotests.ImagePath('t.qcow2') as disk_path, \
+ iotests.ImagePath('t.qcow2.mid') as mid_path, \
iotests.FilePath('t.qcow2.base') as base_path, \
iotests.VM() as vm:
@@ -48,11 +48,10 @@ with iotests.FilePath('t.qcow2') as disk_path, \
iotests.log("")
size = 128 * 1024 * 1024
- size_str = str(size)
iotests.create_image(base_path, size)
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, mid_path, size_str)
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, disk_path, size_str)
+ assert create_test_image(mid_path, size) == 0
+ assert create_test_image(disk_path, size) == 0
# Create a backing chain like this:
# base <- [throttled: bps-read=4096] <- mid <- overlay
@@ -91,18 +90,17 @@ iotests.log('Closing the VM while a job is being cancelled')
iotests.log('=============================================')
iotests.log('')
-with iotests.FilePath('src.qcow2') as src_path, \
- iotests.FilePath('dst.qcow2') as dst_path, \
+with iotests.ImagePath('src.qcow2') as src_path, \
+ iotests.ImagePath('dst.qcow2') as dst_path, \
iotests.VM() as vm:
iotests.log('=== Create images and start VM ===')
iotests.log('')
size = 128 * 1024 * 1024
- size_str = str(size)
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, src_path, size_str)
- iotests.qemu_img_log('create', '-f', iotests.imgfmt, dst_path, size_str)
+ assert create_test_image(src_path, size) == 0
+ assert create_test_image(dst_path, size) == 0
iotests.log(iotests.qemu_io('-f', iotests.imgfmt, '-c', 'write 0 1M',
src_path),
diff --git a/tests/qemu-iotests/255.out b/tests/qemu-iotests/255.out
index 348909fdef..2e837cbb5f 100644
--- a/tests/qemu-iotests/255.out
+++ b/tests/qemu-iotests/255.out
@@ -3,10 +3,6 @@ Finishing a commit job with background reads
=== Create backing chain and start VM ===
-Formatting 'TEST_DIR/PID-t.qcow2.mid', fmt=qcow2 size=134217728
cluster_size=65536 lazy_refcounts=off refcount_bits=16
-
-Formatting 'TEST_DIR/PID-t.qcow2', fmt=qcow2 size=134217728 cluster_size=65536
lazy_refcounts=off refcount_bits=16
-
=== Start background read requests ===
=== Run a commit job ===
@@ -23,10 +19,6 @@ Closing the VM while a job is being cancelled
=== Create images and start VM ===
-Formatting 'TEST_DIR/PID-src.qcow2', fmt=qcow2 size=134217728
cluster_size=65536 lazy_refcounts=off refcount_bits=16
-
-Formatting 'TEST_DIR/PID-dst.qcow2', fmt=qcow2 size=134217728
cluster_size=65536 lazy_refcounts=off refcount_bits=16
-
wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
--
2.21.0
- [PATCH 51/67] iotests/228: Honor $IMGOPTS, (continued)
- [PATCH 51/67] iotests/228: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 50/67] iotests/224: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 52/67] iotests/234: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 54/67] iotests/236: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 55/67] iotests/237: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 53/67] iotests/235: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 56/67] iotests/242: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 57/67] iotests/245: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 60/67] iotests/254: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 59/67] iotests/248: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 61/67] iotests/255: Honor $IMGOPTS,
Max Reitz <=
- [PATCH 58/67] iotests/246: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 62/67] iotests/256: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 63/67] iotests/257: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 64/67] iotests/258: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 65/67] iotests/262: Honor $IMGOPTS, Max Reitz, 2019/10/01
- [PATCH 66/67] iotests.py: Forbid qemu_img*('create', ...), Max Reitz, 2019/10/01
- [PATCH 67/67] iotests.py: Drop qemu_img_log(), qemu_img_create(), Max Reitz, 2019/10/01
- Re: [PATCH 00/67] iotests: Honor $IMGOPTS in Python tests, John Snow, 2019/10/01