iotests: Only create BB if necessary
Tests 071 and 081 test giving references in blockdev-add. It is not necessary to create a BlockBackend here, so omit it. While at it, fix up some blockdev-add invocations in the vicinity (s/raw/$IMGFMT/ in 081, drop the format BDS for blkverify's raw child in 071). Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
be4b67bc7d
commit
8e9e653038
|
@ -104,8 +104,17 @@ echo
|
||||||
echo "=== Testing blkdebug on existing block device ==="
|
echo "=== Testing blkdebug on existing block device ==="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
run_qemu -drive "file=$TEST_IMG,format=raw,if=none,id=drive0" <<EOF
|
run_qemu <<EOF
|
||||||
{ "execute": "qmp_capabilities" }
|
{ "execute": "qmp_capabilities" }
|
||||||
|
{ "execute": "blockdev-add",
|
||||||
|
"arguments": {
|
||||||
|
"options": {
|
||||||
|
"node-name": "drive0",
|
||||||
|
"driver": "file",
|
||||||
|
"filename": "$TEST_IMG"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
{ "execute": "blockdev-add",
|
{ "execute": "blockdev-add",
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -133,8 +142,20 @@ echo
|
||||||
echo "=== Testing blkverify on existing block device ==="
|
echo "=== Testing blkverify on existing block device ==="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
run_qemu -drive "file=$TEST_IMG,format=$IMGFMT,if=none,id=drive0" <<EOF
|
run_qemu <<EOF
|
||||||
{ "execute": "qmp_capabilities" }
|
{ "execute": "qmp_capabilities" }
|
||||||
|
{ "execute": "blockdev-add",
|
||||||
|
"arguments": {
|
||||||
|
"options": {
|
||||||
|
"node-name": "drive0",
|
||||||
|
"driver": "$IMGFMT",
|
||||||
|
"file": {
|
||||||
|
"driver": "file",
|
||||||
|
"filename": "$TEST_IMG"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
{ "execute": "blockdev-add",
|
{ "execute": "blockdev-add",
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -142,11 +163,8 @@ run_qemu -drive "file=$TEST_IMG,format=$IMGFMT,if=none,id=drive0" <<EOF
|
||||||
"id": "drive0-verify",
|
"id": "drive0-verify",
|
||||||
"test": "drive0",
|
"test": "drive0",
|
||||||
"raw": {
|
"raw": {
|
||||||
"driver": "raw",
|
"driver": "file",
|
||||||
"file": {
|
"filename": "$TEST_IMG.base"
|
||||||
"driver": "file",
|
|
||||||
"filename": "$TEST_IMG.base"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,8 +181,17 @@ echo
|
||||||
echo "=== Testing blkverify on existing raw block device ==="
|
echo "=== Testing blkverify on existing raw block device ==="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
run_qemu -drive "file=$TEST_IMG.base,format=raw,if=none,id=drive0" <<EOF
|
run_qemu <<EOF
|
||||||
{ "execute": "qmp_capabilities" }
|
{ "execute": "qmp_capabilities" }
|
||||||
|
{ "execute": "blockdev-add",
|
||||||
|
"arguments": {
|
||||||
|
"options": {
|
||||||
|
"node-name": "drive0",
|
||||||
|
"driver": "file",
|
||||||
|
"filename": "$TEST_IMG.base"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
{ "execute": "blockdev-add",
|
{ "execute": "blockdev-add",
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -193,8 +220,17 @@ echo
|
||||||
echo "=== Testing blkdebug's set-state through QMP ==="
|
echo "=== Testing blkdebug's set-state through QMP ==="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
run_qemu -drive "file=$TEST_IMG,format=raw,if=none,id=drive0" <<EOF
|
run_qemu <<EOF
|
||||||
{ "execute": "qmp_capabilities" }
|
{ "execute": "qmp_capabilities" }
|
||||||
|
{ "execute": "blockdev-add",
|
||||||
|
"arguments": {
|
||||||
|
"options": {
|
||||||
|
"node-name": "drive0",
|
||||||
|
"driver": "file",
|
||||||
|
"filename": "$TEST_IMG"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
{ "execute": "blockdev-add",
|
{ "execute": "blockdev-add",
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"options": {
|
"options": {
|
||||||
|
|
|
@ -42,10 +42,11 @@ read failed: Input/output error
|
||||||
|
|
||||||
=== Testing blkdebug on existing block device ===
|
=== Testing blkdebug on existing block device ===
|
||||||
|
|
||||||
Testing: -drive file=TEST_DIR/t.IMGFMT,format=raw,if=none,id=drive0
|
Testing:
|
||||||
QMP_VERSION
|
QMP_VERSION
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
|
{"return": {}}
|
||||||
read failed: Input/output error
|
read failed: Input/output error
|
||||||
{"return": ""}
|
{"return": ""}
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
|
@ -56,28 +57,31 @@ QEMU_PROG: Failed to flush the refcount block cache: Input/output error
|
||||||
|
|
||||||
=== Testing blkverify on existing block device ===
|
=== Testing blkverify on existing block device ===
|
||||||
|
|
||||||
Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=drive0
|
Testing:
|
||||||
QMP_VERSION
|
QMP_VERSION
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
|
{"return": {}}
|
||||||
blkverify: read sector_num=0 nb_sectors=1 contents mismatch in sector 0
|
blkverify: read sector_num=0 nb_sectors=1 contents mismatch in sector 0
|
||||||
|
|
||||||
|
|
||||||
=== Testing blkverify on existing raw block device ===
|
=== Testing blkverify on existing raw block device ===
|
||||||
|
|
||||||
Testing: -drive file=TEST_DIR/t.IMGFMT.base,format=raw,if=none,id=drive0
|
Testing:
|
||||||
QMP_VERSION
|
QMP_VERSION
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
|
{"return": {}}
|
||||||
blkverify: read sector_num=0 nb_sectors=1 contents mismatch in sector 0
|
blkverify: read sector_num=0 nb_sectors=1 contents mismatch in sector 0
|
||||||
|
|
||||||
|
|
||||||
=== Testing blkdebug's set-state through QMP ===
|
=== Testing blkdebug's set-state through QMP ===
|
||||||
|
|
||||||
Testing: -drive file=TEST_DIR/t.IMGFMT,format=raw,if=none,id=drive0
|
Testing:
|
||||||
QMP_VERSION
|
QMP_VERSION
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
|
{"return": {}}
|
||||||
read 512/512 bytes at offset 0
|
read 512/512 bytes at offset 0
|
||||||
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
{"return": ""}
|
{"return": ""}
|
||||||
|
|
|
@ -102,8 +102,20 @@ $QEMU_IO -c "open -o $quorum" -c "read -P 0x32 0 $size" | _filter_qemu_io
|
||||||
echo
|
echo
|
||||||
echo "== checking mixed reference/option specification =="
|
echo "== checking mixed reference/option specification =="
|
||||||
|
|
||||||
run_qemu -drive "file=$TEST_DIR/2.raw,format=$IMGFMT,if=none,id=drive2" <<EOF
|
run_qemu <<EOF
|
||||||
{ "execute": "qmp_capabilities" }
|
{ "execute": "qmp_capabilities" }
|
||||||
|
{ "execute": "blockdev-add",
|
||||||
|
"arguments": {
|
||||||
|
"options": {
|
||||||
|
"node-name": "drive2",
|
||||||
|
"driver": "$IMGFMT",
|
||||||
|
"file": {
|
||||||
|
"driver": "file",
|
||||||
|
"filename": "$TEST_DIR/2.raw"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
{ "execute": "blockdev-add",
|
{ "execute": "blockdev-add",
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -112,7 +124,7 @@ run_qemu -drive "file=$TEST_DIR/2.raw,format=$IMGFMT,if=none,id=drive2" <<EOF
|
||||||
"vote-threshold": 2,
|
"vote-threshold": 2,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"driver": "raw",
|
"driver": "$IMGFMT",
|
||||||
"file": {
|
"file": {
|
||||||
"driver": "file",
|
"driver": "file",
|
||||||
"filename": "$TEST_DIR/1.raw"
|
"filename": "$TEST_DIR/1.raw"
|
||||||
|
@ -120,7 +132,7 @@ run_qemu -drive "file=$TEST_DIR/2.raw,format=$IMGFMT,if=none,id=drive2" <<EOF
|
||||||
},
|
},
|
||||||
"drive2",
|
"drive2",
|
||||||
{
|
{
|
||||||
"driver": "raw",
|
"driver": "$IMGFMT",
|
||||||
"file": {
|
"file": {
|
||||||
"driver": "file",
|
"driver": "file",
|
||||||
"filename": "$TEST_DIR/3.raw"
|
"filename": "$TEST_DIR/3.raw"
|
||||||
|
|
|
@ -26,11 +26,12 @@ read 10485760/10485760 bytes at offset 0
|
||||||
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
|
|
||||||
== checking mixed reference/option specification ==
|
== checking mixed reference/option specification ==
|
||||||
Testing: -drive file=TEST_DIR/2.IMGFMT,format=IMGFMT,if=none,id=drive2
|
Testing:
|
||||||
QMP_VERSION
|
QMP_VERSION
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
{"return": {}}
|
{"return": {}}
|
||||||
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "QUORUM_REPORT_BAD", "data": {"node-name": "NODE_NAME", "sectors-count": 20480, "sector-num": 0}}
|
{"return": {}}
|
||||||
|
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "QUORUM_REPORT_BAD", "data": {"node-name": "drive2", "sectors-count": 20480, "sector-num": 0}}
|
||||||
read 10485760/10485760 bytes at offset 0
|
read 10485760/10485760 bytes at offset 0
|
||||||
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
{"return": ""}
|
{"return": ""}
|
||||||
|
|
Loading…
Reference in a new issue