Skip to contentSkip to conversation

iotests: Minor fixes

PATCH Applied Max Reitz 4 participants 6 messages Dec 18, 2019 – Dec 20, 2019

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

cover iotests: Minor fixes

Hi,

These are just two minor fixes for things I noticed recently.

Max

Max Reitz (2):
iotests/273: Filter format-specific information
iotests: Fix IMGOPTSSYNTAX for nbd

 tests/qemu-iotests/273       |  3 ++-
 tests/qemu-iotests/273.out   | 27 ---------------------------
 tests/qemu-iotests/common.rc |  3 ++-
 3 files changed, 4 insertions(+), 29 deletions(-)
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH 1/2 iotests/273: Filter format-specific information

Doing this allows running this test with e.g. -o compat=0.10 or -o compat=refcount_bits=1.

---
 tests/qemu-iotests/273     |  3 ++-
 tests/qemu-iotests/273.out | 27 ---------------------------
 2 files changed, 2 insertions(+), 28 deletions(-)
tests/qemu-iotests/273 +2 -1
index c355e9af47..00ff79bcf8 100755
@@ -51,7 +51,8 @@ do_run_qemu()
 run_qemu()
 {
     do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp |
-        _filter_generated_node_ids | _filter_imgfmt | _filter_actual_image_size
+        _filter_generated_node_ids | _filter_imgfmt |
+        _filter_actual_image_size | _filter_img_info
 }
 
 TEST_IMG="$TEST_IMG.base" _make_test_img 64M
tests/qemu-iotests/273.out +0 -27
index c410fee5c4..684b8d6f77 100644
@@ -38,15 +38,6 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
                     "cluster-size": 65536,
                     "format": "IMGFMT",
                     "actual-size": SIZE,
-                    "format-specific": {
-                        "type": "IMGFMT",
-                        "data": {
-                            "compat": "1.1",
-                            "lazy-refcounts": false,
-                            "refcount-bits": 16,
-                            "corrupt": false
-                        }
-                    },
                     "full-backing-filename": "TEST_DIR/t.IMGFMT.base",
                     "backing-filename": "TEST_DIR/t.IMGFMT.base",
                     "dirty-flag": false
@@ -57,15 +48,6 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
                 "cluster-size": 65536,
                 "format": "IMGFMT",
                 "actual-size": SIZE,
-                "format-specific": {
-                    "type": "IMGFMT",
-                    "data": {
-                        "compat": "1.1",
-                        "lazy-refcounts": false,
-                        "refcount-bits": 16,
-                        "corrupt": false
-                    }
-                },
                 "full-backing-filename": "TEST_DIR/t.IMGFMT.mid",
                 "backing-filename": "TEST_DIR/t.IMGFMT.mid",
                 "dirty-flag": false
@@ -136,15 +118,6 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
                 "cluster-size": 65536,
                 "format": "IMGFMT",
                 "actual-size": SIZE,
-                "format-specific": {
-                    "type": "IMGFMT",
-                    "data": {
-                        "compat": "1.1",
-                        "lazy-refcounts": false,
-                        "refcount-bits": 16,
-                        "corrupt": false
-                    }
-                },
                 "full-backing-filename": "TEST_DIR/t.IMGFMT.base",
                 "backing-filename": "TEST_DIR/t.IMGFMT.base",
                 "dirty-flag": false
Signature · 1 line
2.23.0
author
#2 lore raw

PATCH 2/2 iotests: Fix IMGOPTSSYNTAX for nbd

In reply to Max Reitz

There is no $SOCKDIR, only $SOCK_DIR.

Fixes f3923a72f199b2c63747a7032db74730546f55c6
---
 tests/qemu-iotests/common.rc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/qemu-iotests/common.rc +2 -1
index ffb47c3d5c..d088392ab6 100644
@@ -217,7 +217,8 @@ if [ "$IMGOPTSSYNTAX" = "true" ]; then
         TEST_IMG="$DRIVER,file.filename=$TEST_DIR/t.$IMGFMT"
     elif [ "$IMGPROTO" = "nbd" ]; then
         TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
-        TEST_IMG="$DRIVER,file.driver=nbd,file.type=unix,file.path=$SOCKDIR/nbd"
+        TEST_IMG="$DRIVER,file.driver=nbd,file.type=unix"
+        TEST_IMG="$TEST_IMG,file.path=$SOCK_DIR/nbd"
     elif [ "$IMGPROTO" = "ssh" ]; then
         TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
         TEST_IMG="$DRIVER,file.driver=ssh,file.host=127.0.0.1,file.path=$TEST_IMG_FILE"
Signature · 1 line
2.23.0
Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] iotests: Fix IMGOPTSSYNTAX for nbd

Quoted 14 lines · Max Reitz

There is no $SOCKDIR, only $SOCK_DIR.

Fixes f3923a72f199b2c63747a7032db74730546f55c6
---
  tests/qemu-iotests/common.rc | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
tests/qemu-iotests/common.rc +0 -0
index ffb47c3d5c..d088392ab6 100644

tests/qemu-iotests/common.rc if [ "$IMGOPTSSYNTAX" = "true" ]; then · line 224

Quoted 9 lines
tests/qemu-iotests/common.rc +2 -1
@@ -217,7 +217,8 @@ if [ "$IMGOPTSSYNTAX" = "true" ]; then
          TEST_IMG="$DRIVER,file.filename=$TEST_DIR/t.$IMGFMT"
      elif [ "$IMGPROTO" = "nbd" ]; then
          TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
-        TEST_IMG="$DRIVER,file.driver=nbd,file.type=unix,file.path=$SOCKDIR/nbd"
+        TEST_IMG="$DRIVER,file.driver=nbd,file.type=unix"
+        TEST_IMG="$TEST_IMG,file.path=$SOCK_DIR/nbd"
      elif [ "$IMGPROTO" = "ssh" ]; then
          TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
          TEST_IMG="$DRIVER,file.driver=ssh,file.host=127.0.0.1,file.path=$TEST_IMG_FILE"
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] iotests: Fix IMGOPTSSYNTAX for nbd

In reply to Max Reitz
Quoted 7 lines · Max Reitz

There is no $SOCKDIR, only $SOCK_DIR.

Fixes f3923a72f199b2c63747a7032db74730546f55c6
---
  tests/qemu-iotests/common.rc | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Whoops. Thanks for the fix.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
Applied
#5 lore raw
In reply to Max Reitz

Am 18.12.2019 um 11:48 hat Max Reitz geschrieben:

Quoted 3 lines

Hi,

These are just two minor fixes for things I noticed recently.

Thanks, applied to the block branch.

Kevin