mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
tests: More iotest 223 improvements
Run the core of the test twice, once without iothreads, and again with, for more coverage of both setups. Suggested-by: Nir Soffer <nsoffer@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20191114213415.23499-5-eblake@redhat.com>
This commit is contained in:
parent
a98b1a1fef
commit
296416ff0f
2 changed files with 97 additions and 4 deletions
|
@ -117,10 +117,19 @@ _send_qemu_cmd $QEMU_HANDLE '{"execute":"qmp_capabilities"}' "return"
|
|||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"blockdev-add",
|
||||
"arguments":{"driver":"qcow2", "node-name":"n",
|
||||
"file":{"driver":"file", "filename":"'"$TEST_IMG"'"}}}' "return"
|
||||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"x-blockdev-set-iothread",
|
||||
"arguments":{"node-name":"n", "iothread":"io0"}}' "return"
|
||||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"block-dirty-bitmap-disable",
|
||||
"arguments":{"node":"n", "name":"b"}}' "return"
|
||||
|
||||
for attempt in normal iothread; do
|
||||
|
||||
echo
|
||||
echo "=== Set up NBD with $attempt access ==="
|
||||
echo
|
||||
if [ $attempt = iothread ]; then
|
||||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"x-blockdev-set-iothread",
|
||||
"arguments":{"node-name":"n", "iothread":"io0"}}' "return"
|
||||
fi
|
||||
|
||||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-add",
|
||||
"arguments":{"device":"n"}}' "error" # Attempt add without server
|
||||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-start",
|
||||
|
@ -180,6 +189,9 @@ _send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-remove",
|
|||
"arguments":{"name":"n2"}}' "error" # Attempt duplicate clean
|
||||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-stop"}' "return"
|
||||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-stop"}' "error" # Again
|
||||
|
||||
done
|
||||
|
||||
_send_qemu_cmd $QEMU_HANDLE '{"execute":"quit"}' "return"
|
||||
wait=yes _cleanup_qemu
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue