mirror of
https://github.com/qemu/qemu.git
synced 2024-12-11 04:33:53 +08:00
cb53460b70
Currently, the default values for werror and rerror have to be set explicitly with blk_set_on_error() by the callers of blk_new(). The only caller actually doing this is blockdev_init(), which is called for BlockBackends created using -drive. In particular, anonymous BlockBackends created with -device ...,drive=<node-name> didn't get the correct default set and instead defaulted to the integer value 0 (= BLOCKDEV_ON_ERROR_REPORT). This is the intended default for rerror anyway, but the default for werror should be BLOCKDEV_ON_ERROR_ENOSPC. Set the defaults in blk_new() instead so that they apply no matter what way the BlockBackend was created. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com>
415 lines
8.7 KiB
Plaintext
415 lines
8.7 KiB
Plaintext
QA output created by 067
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
|
|
|
=== -drive/-device and device_del ===
|
|
|
|
Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk -device virtio-blk,drive=disk,id=virtio0
|
|
{
|
|
QMP_VERSION
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
{
|
|
"io-status": "ok",
|
|
"device": "disk",
|
|
"locked": false,
|
|
"removable": false,
|
|
"inserted": {
|
|
"iops_rd": 0,
|
|
"detect_zeroes": "off",
|
|
"image": {
|
|
"virtual-size": 134217728,
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
|
"cluster-size": 65536,
|
|
"format": "IMGFMT",
|
|
"actual-size": SIZE,
|
|
"dirty-flag": false
|
|
},
|
|
"iops_wr": 0,
|
|
"ro": false,
|
|
"node-name": "NODE_NAME",
|
|
"backing_file_depth": 0,
|
|
"drv": "IMGFMT",
|
|
"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.IMGFMT",
|
|
"encryption_key_missing": false
|
|
},
|
|
"qdev": "/machine/peripheral/virtio0/virtio-backend",
|
|
"type": "unknown"
|
|
}
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
|
|
=== -drive/device_add and device_del ===
|
|
|
|
Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk
|
|
{
|
|
QMP_VERSION
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
{
|
|
"device": "disk",
|
|
"locked": false,
|
|
"removable": true,
|
|
"inserted": {
|
|
"iops_rd": 0,
|
|
"detect_zeroes": "off",
|
|
"image": {
|
|
"virtual-size": 134217728,
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
|
"cluster-size": 65536,
|
|
"format": "IMGFMT",
|
|
"actual-size": SIZE,
|
|
"dirty-flag": false
|
|
},
|
|
"iops_wr": 0,
|
|
"ro": false,
|
|
"node-name": "NODE_NAME",
|
|
"backing_file_depth": 0,
|
|
"drv": "IMGFMT",
|
|
"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.IMGFMT",
|
|
"encryption_key_missing": false
|
|
},
|
|
"type": "unknown"
|
|
}
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
|
|
=== drive_add/device_add and device_del ===
|
|
|
|
Testing:
|
|
{
|
|
QMP_VERSION
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": "OK\r\n"
|
|
}
|
|
{
|
|
"return": [
|
|
{
|
|
"device": "disk",
|
|
"locked": false,
|
|
"removable": true,
|
|
"inserted": {
|
|
"iops_rd": 0,
|
|
"detect_zeroes": "off",
|
|
"image": {
|
|
"virtual-size": 134217728,
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
|
"cluster-size": 65536,
|
|
"format": "IMGFMT",
|
|
"actual-size": SIZE,
|
|
"dirty-flag": false
|
|
},
|
|
"iops_wr": 0,
|
|
"ro": false,
|
|
"node-name": "NODE_NAME",
|
|
"backing_file_depth": 0,
|
|
"drv": "IMGFMT",
|
|
"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.IMGFMT",
|
|
"encryption_key_missing": false
|
|
},
|
|
"type": "unknown"
|
|
}
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
|
|
=== blockdev_add/device_add and device_del ===
|
|
|
|
Testing:
|
|
{
|
|
QMP_VERSION
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
{
|
|
"iops_rd": 0,
|
|
"detect_zeroes": "off",
|
|
"image": {
|
|
"virtual-size": 134217728,
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
|
"cluster-size": 65536,
|
|
"format": "IMGFMT",
|
|
"actual-size": SIZE,
|
|
"dirty-flag": false
|
|
},
|
|
"iops_wr": 0,
|
|
"ro": false,
|
|
"node-name": "disk",
|
|
"backing_file_depth": 0,
|
|
"drv": "IMGFMT",
|
|
"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.IMGFMT",
|
|
"encryption_key_missing": false
|
|
},
|
|
{
|
|
"iops_rd": 0,
|
|
"detect_zeroes": "off",
|
|
"image": {
|
|
"virtual-size": 197120,
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
|
"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.IMGFMT",
|
|
"encryption_key_missing": false
|
|
}
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
{
|
|
"iops_rd": 0,
|
|
"detect_zeroes": "off",
|
|
"image": {
|
|
"virtual-size": 134217728,
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
|
"cluster-size": 65536,
|
|
"format": "IMGFMT",
|
|
"actual-size": SIZE,
|
|
"dirty-flag": false
|
|
},
|
|
"iops_wr": 0,
|
|
"ro": false,
|
|
"node-name": "disk",
|
|
"backing_file_depth": 0,
|
|
"drv": "IMGFMT",
|
|
"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.IMGFMT",
|
|
"encryption_key_missing": false
|
|
},
|
|
{
|
|
"iops_rd": 0,
|
|
"detect_zeroes": "off",
|
|
"image": {
|
|
"virtual-size": 197120,
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
|
"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.IMGFMT",
|
|
"encryption_key_missing": false
|
|
}
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
|
|
=== Empty drive with -device and device_del ===
|
|
|
|
Testing: -device virtio-scsi -device scsi-cd,id=cd0
|
|
{
|
|
QMP_VERSION
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
{
|
|
"io-status": "ok",
|
|
"device": "",
|
|
"locked": false,
|
|
"removable": true,
|
|
"qdev": "cd0",
|
|
"tray_open": false,
|
|
"type": "unknown"
|
|
}
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
{
|
|
"return": [
|
|
]
|
|
}
|
|
{
|
|
"return": {
|
|
}
|
|
}
|
|
*** done
|