2
0
Эх сурвалжийг харах

iotests.py: img_info_log(): rename imgopts argument

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>
Vladimir Sementsov-Ogievskiy 3 жил өмнө
parent
commit
3bd2b942d9

+ 4 - 4
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),
         'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path),
         filter_path=disk_path,
         filter_path=disk_path,
         extra_args=['--object', 'secret,id=keysec0,data=foo'],
         extra_args=['--object', 'secret,id=keysec0,data=foo'],
-        imgopts=True)
+        use_image_opts=True)
 
 
     #
     #
     # Successful image creation (with non-default options)
     # 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),
         'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path),
         filter_path=disk_path,
         filter_path=disk_path,
         extra_args=['--object', 'secret,id=keysec0,data=foo'],
         extra_args=['--object', 'secret,id=keysec0,data=foo'],
-        imgopts=True)
+        use_image_opts=True)
 
 
     #
     #
     # Invalid BlockdevRef
     # 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),
         'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path),
         filter_path=disk_path,
         filter_path=disk_path,
         extra_args=['--object', 'secret,id=keysec0,data=foo'],
         extra_args=['--object', 'secret,id=keysec0,data=foo'],
-        imgopts=True)
+        use_image_opts=True)
 
 
     #
     #
     # Invalid sizes
     # 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),
         'driver=luks,file.driver=file,file.filename=%s,key-secret=keysec0' % (disk_path),
         filter_path=disk_path,
         filter_path=disk_path,
         extra_args=['--object', 'secret,id=keysec0,data=foo'],
         extra_args=['--object', 'secret,id=keysec0,data=foo'],
-        imgopts=True)
+        use_image_opts=True)

+ 3 - 2
tests/qemu-iotests/iotests.py

@@ -227,9 +227,10 @@ def qemu_img_log(*args):
     log(result, filters=[filter_testfiles])
     log(result, filters=[filter_testfiles])
     return result
     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']
     args = ['info']
-    if imgopts:
+    if use_image_opts:
         args.append('--image-opts')
         args.append('--image-opts')
     else:
     else:
         args += ['-f', imgfmt]
         args += ['-f', imgfmt]