Skip to contentSkip to conversation

iotests/178: Pass value to invalid option

PATCH Applied Max Reitz 2 participants 2 messages Jan 26, 2021

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 iotests/178: Pass value to invalid option

ccd3b3b8112 has deprecated short-hand boolean options (i.e., options with values). All options without values are interpreted as boolean options, so this includes the invalid option "snapshot.foo" used in iotest 178.

So after ccd3b3b8112, 178 fails with:

+qemu-img: warning: short-form boolean option 'snapshot.foo' deprecated +Please use snapshot.foo=on instead

Suppress that deprecation warning by passing some value to it (it does not matter which, because the option is invalid anyway).

Fixes ccd3b3b8112b670fdccf8a392b8419b173ffccb4

("qemu-option: warn for short-form boolean options")

---
 tests/qemu-iotests/178           | 2 +-
 tests/qemu-iotests/178.out.qcow2 | 2 +-
 tests/qemu-iotests/178.out.raw   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
tests/qemu-iotests/178 +1 -1
index 3b1a7adce4..8df241ead8 100755
@@ -57,7 +57,7 @@ $QEMU_IMG measure --image-opts # missing filename
 $QEMU_IMG measure -f qcow2 # missing filename
 $QEMU_IMG measure -l snap1 # missing filename
 $QEMU_IMG measure -o , # invalid option list
-$QEMU_IMG measure -l snapshot.foo # invalid snapshot option
+$QEMU_IMG measure -l snapshot.foo=bar # invalid snapshot option
 $QEMU_IMG measure --output foo # invalid output format
 $QEMU_IMG measure --size -1 # invalid image size
 $QEMU_IMG measure -O foo "$TEST_IMG" # unknown image file format
tests/qemu-iotests/178.out.qcow2 +1 -1
index c7997760fd..fe193fd5f4 100644
@@ -11,7 +11,7 @@ qemu-img: --image-opts, -f, and -l require a filename argument.
 qemu-img: --image-opts, -f, and -l require a filename argument.
 qemu-img: Invalid option list: ,
 qemu-img: Invalid parameter 'snapshot.foo'
-qemu-img: Failed in parsing snapshot param 'snapshot.foo'
+qemu-img: Failed in parsing snapshot param 'snapshot.foo=bar'
 qemu-img: --output must be used with human or json as argument.
 qemu-img: Invalid image size specified. Must be between 0 and 9223372036854775807.
 qemu-img: Unknown file format 'foo'
tests/qemu-iotests/178.out.raw +1 -1
index 20e17da115..445e460fad 100644
@@ -11,7 +11,7 @@ qemu-img: --image-opts, -f, and -l require a filename argument.
 qemu-img: --image-opts, -f, and -l require a filename argument.
 qemu-img: Invalid option list: ,
 qemu-img: Invalid parameter 'snapshot.foo'
-qemu-img: Failed in parsing snapshot param 'snapshot.foo'
+qemu-img: Failed in parsing snapshot param 'snapshot.foo=bar'
 qemu-img: --output must be used with human or json as argument.
 qemu-img: Invalid image size specified. Must be between 0 and 9223372036854775807.
 qemu-img: Unknown file format 'foo'
Signature · 1 line
2.29.2
Applied
#1 lore raw

Am 26.01.2021 um 13:38 hat Max Reitz geschrieben:

Quoted 10 lines

ccd3b3b8112 has deprecated short-hand boolean options (i.e., options with values). All options without values are interpreted as boolean options, so this includes the invalid option "snapshot.foo" used in iotest 178.

So after ccd3b3b8112, 178 fails with:

+qemu-img: warning: short-form boolean option 'snapshot.foo' deprecated +Please use snapshot.foo=on instead

Quoted 6 lines

Suppress that deprecation warning by passing some value to it (it does not matter which, because the option is invalid anyway).

Fixes ccd3b3b8112b670fdccf8a392b8419b173ffccb4

("qemu-option: warn for short-form boolean options")

Thanks, applied to the block branch.

Kevin