From deb6ccb077238660080abe7e667bbf8ede5141c7 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 13 Nov 2019 20:46:35 -0600 Subject: nbd: Allow description when creating NBD blockdev Allow blockdevs to match the feature already present in qemu-nbd -D. Enhance iotest 223 to cover it. Signed-off-by: Eric Blake Reviewed-by: Maxim Levitsky Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20191114024635.11363-5-eblake@redhat.com> --- tests/qemu-iotests/223 | 2 +- tests/qemu-iotests/223.out | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/qemu-iotests/223 b/tests/qemu-iotests/223 index ea69cd4..56fbc5f 100755 --- a/tests/qemu-iotests/223 +++ b/tests/qemu-iotests/223 @@ -153,7 +153,7 @@ _send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-add", "bitmap":"b3"}}' "error" # Missing bitmap _send_qemu_cmd $QEMU_HANDLE '{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, - "bitmap":"b2"}}' "return" + "description":"some text", "bitmap":"b2"}}' "return" $QEMU_NBD_PROG -L -k "$SOCK_DIR/nbd" echo diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223.out index f175598..80c0cf6 100644 --- a/tests/qemu-iotests/223.out +++ b/tests/qemu-iotests/223.out @@ -50,7 +50,7 @@ exports available: 0 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}} {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b3"}} {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}} -{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "bitmap":"b2"}} +{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "description":"some text", "bitmap":"b2"}} {"return": {}} exports available: 2 export: 'n' @@ -63,6 +63,7 @@ exports available: 2 base:allocation qemu:dirty-bitmap:b export: 'n2' + description: some text size: 4194304 flags: 0xced ( flush fua trim zeroes df cache fast-zero ) min block: 1 @@ -130,7 +131,7 @@ exports available: 0 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}} {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b3"}} {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}} -{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "bitmap":"b2"}} +{"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "description":"some text", "bitmap":"b2"}} {"return": {}} exports available: 2 export: 'n' @@ -143,6 +144,7 @@ exports available: 2 base:allocation qemu:dirty-bitmap:b export: 'n2' + description: some text size: 4194304 flags: 0xced ( flush fua trim zeroes df cache fast-zero ) min block: 1 -- cgit v1.1