diff options
author | Alberto Garcia <berto@igalia.com> | 2018-11-12 16:00:42 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-12-14 11:55:02 +0100 |
commit | dc900c35239bc865df2dff5880eabcd25b974f19 (patch) | |
tree | 704618871eedbc497acf63e3ec9375240b0f4dc2 /tests/qemu-iotests/133 | |
parent | 295cf237c2e5112de3e2aa7c3dbc80580b80bf88 (diff) | |
download | qemu-dc900c35239bc865df2dff5880eabcd25b974f19.zip qemu-dc900c35239bc865df2dff5880eabcd25b974f19.tar.gz qemu-dc900c35239bc865df2dff5880eabcd25b974f19.tar.bz2 |
qemu-io: Put flag changes in the options QDict in reopen_f()
When reopen_f() puts a block device in the reopen queue, some of the
new options are passed using a QDict, but others ("read-only" and the
cache options) are passed as flags.
This patch puts those flags in the QDict. This way the flags parameter
becomes redundant and we'll be able to get rid of it in a subsequent
patch.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/133')
-rwxr-xr-x | tests/qemu-iotests/133 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/qemu-iotests/133 b/tests/qemu-iotests/133 index a9a47a3..63b25f3 100755 --- a/tests/qemu-iotests/133 +++ b/tests/qemu-iotests/133 @@ -91,6 +91,15 @@ echo IMGOPTSSYNTAX=false $QEMU_IO -f null-co -c 'reopen' -c 'info' \ "json:{'driver': 'null-co', 'size': 65536}" +echo +echo "=== Check that mixing -c/-r/-w and their corresponding options is forbidden ===" +echo + +$QEMU_IO -c 'reopen -r -o read-only=on' $TEST_IMG +$QEMU_IO -c 'reopen -w -o read-only=on' $TEST_IMG +$QEMU_IO -c 'reopen -c none -o cache.direct=on' $TEST_IMG +$QEMU_IO -c 'reopen -c writeback -o cache.direct=on' $TEST_IMG +$QEMU_IO -c 'reopen -c directsync -o cache.no-flush=on' $TEST_IMG # success, all done echo "*** done" rm -f $seq.full |