aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/283.out
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2021-02-19 16:33:48 +0100
committerKevin Wolf <kwolf@redhat.com>2021-03-08 14:55:18 +0100
commite41799409281eab19c17692d1c52cb4cef7f5494 (patch)
treeffcc2354ed468310011a3087c55b4f7dd2b38d52 /tests/qemu-iotests/283.out
parent705dde27c6c53b73d2aa139b5b2a0ea490153e5b (diff)
downloadqemu-e41799409281eab19c17692d1c52cb4cef7f5494.zip
qemu-e41799409281eab19c17692d1c52cb4cef7f5494.tar.gz
qemu-e41799409281eab19c17692d1c52cb4cef7f5494.tar.bz2
iotests/283: Check that finalize drops backup-top
Without any of HEAD^ or HEAD^^ applied, qemu will most likely crash on the qemu-io invocation, for a variety of immediate reasons. The underlying problem is generally a use-after-free access into backup-top's BlockCopyState. With only HEAD^ applied, qemu-io will run into an EIO (which is not capture by the output, but you can see that the qemu-io invocation will be accepted (i.e., qemu-io will run) in contrast to the reference output, where the node name cannot be found), and qemu will then crash in query-named-block-nodes: bdrv_get_allocated_file_size() detects backup-top to be a filter and passes the request through to its child. However, after bdrv_backup_top_drop(), that child is NULL, so the recursive call crashes. With HEAD^^ applied, this test should pass. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210219153348.41861-4-mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/283.out')
-rw-r--r--tests/qemu-iotests/283.out15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/qemu-iotests/283.out b/tests/qemu-iotests/283.out
index d8cff22..7e9cd9a 100644
--- a/tests/qemu-iotests/283.out
+++ b/tests/qemu-iotests/283.out
@@ -6,3 +6,18 @@
{"return": {}}
{"execute": "blockdev-backup", "arguments": {"device": "source", "sync": "full", "target": "target"}}
{"error": {"class": "GenericError", "desc": "Cannot set permissions for backup-top filter: Conflicts with use by other as 'image', which uses 'write' on base"}}
+
+=== backup-top should be gone after job-finalize ===
+
+{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "source"}}
+{"return": {}}
+{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "target"}}
+{"return": {}}
+{"execute": "blockdev-backup", "arguments": {"auto-dismiss": false, "auto-finalize": false, "device": "source", "filter-node-name": "backup-filter", "job-id": "backup", "sync": "full", "target": "target"}}
+{"return": {}}
+{"execute": "job-finalize", "arguments": {"id": "backup"}}
+{"return": {}}
+{"execute": "human-monitor-command", "arguments": {"command-line": "qemu-io backup-filter \"write 0 1M\""}}
+{"return": "Error: Cannot find device= nor node_name=backup-filter\r\n"}
+{"execute": "job-dismiss", "arguments": {"id": "backup"}}
+{"return": {}}