5435e8a804
Backport patches related with iotest from upstream * Patches added: block-backend-Retain-permissions-after-m.patch iotest-065-explicit-compression-type.patch iotest-214-explicit-compression-type.patch iotest-302-use-img_info_log-helper.patch iotest-303-explicit-compression-type.patch iotest-39-use-_qcow2_dump_header.patch iotests-60-more-accurate-set-dirty-bit-i.patch iotests-bash-tests-filter-compression-ty.patch iotests-common.rc-introduce-_qcow2_dump_.patch iotests-declare-lack-of-support-for-comp.patch iotests-drop-qemu_img_verbose-helper.patch iotests-massive-use-_qcow2_dump_header.patch iotests-MRCE-Write-data-to-source.patch iotests.py-filter-out-successful-output-.patch iotests.py-img_info_log-rename-imgopts-a.patch iotests.py-implement-unsupported_imgopts.patch iotests.py-qemu_img-create-support-IMGOP.patch iotests.py-rewrite-default-luks-support-.patch iotests-specify-some-unsupported_imgopts.patch qcow2-simple-case-support-for-downgradin.patch tests-qemu-iotests-Fix-051-for-binaries-.patch OBS-URL: https://build.opensuse.org/request/show/955876 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=690
76 lines
3.0 KiB
Diff
76 lines
3.0 KiB
Diff
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
Date: Thu, 23 Dec 2021 17:01:26 +0100
|
|
Subject: iotests.py: img_info_log(): rename imgopts argument
|
|
|
|
Git-commit: 3bd2b942d9a8a10bb7a504a1ecf4a3e70803840e
|
|
|
|
We are going to support IMGOPTS environment variable like in bash
|
|
tests. Corresponding global variable in iotests.py should be called
|
|
imgopts. So to not interfere with function argument, rename it in
|
|
advance.
|
|
|
|
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
Reviewed-by: Max Reitz <mreitz@redhat.com>
|
|
Message-Id: <20211223160144.1097696-2-vsementsov@virtuozzo.com>
|
|
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
|
|
Signed-off-by: Li Zhang <lizhang@suse.de>
|
|
---
|
|
tests/qemu-iotests/210 | 8 ++++----
|
|
tests/qemu-iotests/iotests.py | 5 +++--
|
|
2 files changed, 7 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/tests/qemu-iotests/210 b/tests/qemu-iotests/210
|
|
index a4dcc5fe59d8ec9ec66b9cfe4770..10b0a0b87cd1c38c4f675472f560 100755
|
|
--- a/tests/qemu-iotests/210
|
|
+++ b/tests/qemu-iotests/210
|
|
@@ -62,7 +62,7 @@ with iotests.FilePath('t.luks') as disk_path, \
|
|
'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path),
|
|
filter_path=disk_path,
|
|
extra_args=['--object', 'secret,id=keysec0,data=foo'],
|
|
- imgopts=True)
|
|
+ use_image_opts=True)
|
|
|
|
#
|
|
# Successful image creation (with non-default options)
|
|
@@ -96,7 +96,7 @@ with iotests.FilePath('t.luks') as disk_path, \
|
|
'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path),
|
|
filter_path=disk_path,
|
|
extra_args=['--object', 'secret,id=keysec0,data=foo'],
|
|
- imgopts=True)
|
|
+ use_image_opts=True)
|
|
|
|
#
|
|
# Invalid BlockdevRef
|
|
@@ -132,7 +132,7 @@ with iotests.FilePath('t.luks') as disk_path, \
|
|
'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path),
|
|
filter_path=disk_path,
|
|
extra_args=['--object', 'secret,id=keysec0,data=foo'],
|
|
- imgopts=True)
|
|
+ use_image_opts=True)
|
|
|
|
#
|
|
# Invalid sizes
|
|
@@ -176,4 +176,4 @@ with iotests.FilePath('t.luks') as disk_path, \
|
|
'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path),
|
|
filter_path=disk_path,
|
|
extra_args=['--object', 'secret,id=keysec0,data=foo'],
|
|
- imgopts=True)
|
|
+ use_image_opts=True)
|
|
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
|
|
index 83bfedb90201ce96118f62dc2b37..9b374dad3dd063fbcbd10963ce5b 100644
|
|
--- a/tests/qemu-iotests/iotests.py
|
|
+++ b/tests/qemu-iotests/iotests.py
|
|
@@ -219,9 +219,10 @@ def qemu_img_log(*args):
|
|
log(result, filters=[filter_testfiles])
|
|
return result
|
|
|
|
-def img_info_log(filename, filter_path=None, imgopts=False, extra_args=()):
|
|
+def img_info_log(filename, filter_path=None, use_image_opts=False,
|
|
+ extra_args=()):
|
|
args = ['info']
|
|
- if imgopts:
|
|
+ if use_image_opts:
|
|
args.append('--image-opts')
|
|
else:
|
|
args += ['-f', imgfmt]
|