[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 52/56] iotests/image-fleecing: prepare for adding new test-case
From: |
Hanna Reitz |
Subject: |
[PULL 52/56] iotests/image-fleecing: prepare for adding new test-case |
Date: |
Wed, 1 Sep 2021 17:16:15 +0200 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
We are going to add a test-case with some behavior modifications. So,
let's prepare a function to be reused.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210824083856.17408-33-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
---
tests/qemu-iotests/tests/image-fleecing | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/tests/qemu-iotests/tests/image-fleecing
b/tests/qemu-iotests/tests/image-fleecing
index ec4ef5f3f6..e210c00d28 100755
--- a/tests/qemu-iotests/tests/image-fleecing
+++ b/tests/qemu-iotests/tests/image-fleecing
@@ -48,12 +48,7 @@ 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, \
- iotests.FilePath('nbd.sock',
- base_dir=iotests.sock_dir) as nbd_sock_path, \
- iotests.VM() as vm:
-
+def do_test(base_img_path, fleece_img_path, nbd_sock_path, vm):
log('--- Setting up images ---')
log('')
@@ -163,3 +158,15 @@ with iotests.FilePath('base.img') as base_img_path, \
log('')
log('Done')
+
+
+def test():
+ with iotests.FilePath('base.img') as base_img_path, \
+ iotests.FilePath('fleece.img') as fleece_img_path, \
+ iotests.FilePath('nbd.sock',
+ base_dir=iotests.sock_dir) as nbd_sock_path, \
+ iotests.VM() as vm:
+ do_test(base_img_path, fleece_img_path, nbd_sock_path, vm)
+
+
+test()
--
2.31.1
- [PULL 42/56] qapi: publish copy-before-write filter, (continued)
- [PULL 42/56] qapi: publish copy-before-write filter, Hanna Reitz, 2021/09/01
- [PULL 44/56] python/qemu/machine: QEMUMachine: improve qmp() method, Hanna Reitz, 2021/09/01
- [PULL 43/56] python/qemu/machine.py: refactor _qemu_args(), Hanna Reitz, 2021/09/01
- [PULL 45/56] python:QEMUMachine: template typing for self returning methods, Hanna Reitz, 2021/09/01
- [PULL 46/56] iotests/222: fix pylint and mypy complains, Hanna Reitz, 2021/09/01
- [PULL 48/56] iotests: move 222 to tests/image-fleecing, Hanna Reitz, 2021/09/01
- [PULL 49/56] iotests.py: hmp_qemu_io: support qdev, Hanna Reitz, 2021/09/01
- [PULL 50/56] iotests/image-fleecing: proper source device, Hanna Reitz, 2021/09/01
- [PULL 47/56] iotests/222: constantly use single quotes for strings, Hanna Reitz, 2021/09/01
- [PULL 51/56] iotests/image-fleecing: rename tgt_node, Hanna Reitz, 2021/09/01
- [PULL 52/56] iotests/image-fleecing: prepare for adding new test-case,
Hanna Reitz <=
- [PULL 53/56] iotests/image-fleecing: add test-case for copy-before-write filter, Hanna Reitz, 2021/09/01
- [PULL 54/56] block/block-copy: block_copy_state_new(): drop extra arguments, Hanna Reitz, 2021/09/01
- [PULL 55/56] block/export/fuse.c: fix fuse-lseek on uclibc or musl, Hanna Reitz, 2021/09/01
- [PULL 56/56] block/file-win32: add reopen handlers, Hanna Reitz, 2021/09/01
- Re: [PULL 00/56] Block patches, Peter Maydell, 2021/09/02
- Re: [PULL 00/56] Block patches, Peter Maydell, 2021/09/02