Commit 522ce4ec authored by Kevin Wolf's avatar Kevin Wolf
Browse files

qemu-iotests/067: Avoid blockdev-add with id



We want to remove the 'id' option for blockdev-add. This removes one
user of the option and makes it use only node names.

In order to keep the test meaningful, some instances of query-block that
want to check whether the node still exists and would now turn up empty
must be converted to query-named-block-nodes (which also return the
protocol level node, but that shouldn't hurt).

Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
parent 476fb028
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ run_qemu <<EOF
  "arguments": {
      "options": {
        "driver": "$IMGFMT",
        "id": "disk",
        "node-name": "disk",
        "file": {
            "driver": "file",
            "filename": "$TEST_IMG"
@@ -129,13 +129,13 @@ run_qemu <<EOF
      }
    }
  }
{ "execute": "query-block" }
{ "execute": "query-named-block-nodes" }
{ "execute": "device_add",
   "arguments": { "driver": "virtio-blk", "drive": "disk",
                  "id": "virtio0" } }
{ "execute": "device_del", "arguments": { "id": "virtio0" } }
{ "execute": "system_reset" }
{ "execute": "query-block" }
{ "execute": "query-named-block-nodes" }
{ "execute": "quit" }
EOF

+128 −83
Original line number Diff line number Diff line
@@ -258,10 +258,6 @@ Testing:
{
    "return": [
        {
            "device": "disk",
            "locked": false,
            "removable": true,
            "inserted": {
            "iops_rd": 0,
            "detect_zeroes": "off",
            "image": {
@@ -283,7 +279,7 @@ Testing:
            },
            "iops_wr": 0,
            "ro": false,
                "node-name": "NODE_NAME",
            "node-name": "disk",
            "backing_file_depth": 0,
            "drv": "qcow2",
            "iops": 0,
@@ -300,7 +296,34 @@ Testing:
            "file": "TEST_DIR/t.qcow2",
            "encryption_key_missing": false
        },
            "type": "unknown"
        {
            "iops_rd": 0,
            "detect_zeroes": "off",
            "image": {
                "virtual-size": 197120,
                "filename": "TEST_DIR/t.qcow2",
                "format": "file",
                "actual-size": SIZE,
                "dirty-flag": false
            },
            "iops_wr": 0,
            "ro": false,
            "node-name": "NODE_NAME",
            "backing_file_depth": 0,
            "drv": "file",
            "iops": 0,
            "bps_wr": 0,
            "write_threshold": 0,
            "encrypted": false,
            "bps": 0,
            "bps_rd": 0,
            "cache": {
                "no-flush": false,
                "direct": false,
                "writeback": true
            },
            "file": "TEST_DIR/t.qcow2",
            "encryption_key_missing": false
        }
    ]
}
@@ -319,11 +342,6 @@ Testing:
{
    "return": [
        {
            "io-status": "ok",
            "device": "disk",
            "locked": false,
            "removable": true,
            "inserted": {
            "iops_rd": 0,
            "detect_zeroes": "off",
            "image": {
@@ -345,7 +363,7 @@ Testing:
            },
            "iops_wr": 0,
            "ro": false,
                "node-name": "NODE_NAME",
            "node-name": "disk",
            "backing_file_depth": 0,
            "drv": "qcow2",
            "iops": 0,
@@ -362,7 +380,34 @@ Testing:
            "file": "TEST_DIR/t.qcow2",
            "encryption_key_missing": false
        },
            "type": "unknown"
        {
            "iops_rd": 0,
            "detect_zeroes": "off",
            "image": {
                "virtual-size": 197120,
                "filename": "TEST_DIR/t.qcow2",
                "format": "file",
                "actual-size": SIZE,
                "dirty-flag": false
            },
            "iops_wr": 0,
            "ro": false,
            "node-name": "NODE_NAME",
            "backing_file_depth": 0,
            "drv": "file",
            "iops": 0,
            "bps_wr": 0,
            "write_threshold": 0,
            "encrypted": false,
            "bps": 0,
            "bps_rd": 0,
            "cache": {
                "no-flush": false,
                "direct": false,
                "writeback": true
            },
            "file": "TEST_DIR/t.qcow2",
            "encryption_key_missing": false
        }
    ]
}