qemu-iotests: 082: Filter the real disk size
PATCH 1/1 qemu-iotests: 082: Filter the real disk size
The real on-disk size of an image depends on things like the host filesystem. _img_info already filters it out, use the function in 082.
Signed-off-by Michael Mueller <[email protected]>
--- tests/qemu-iotests/082 | 14 ++++++------- tests/qemu-iotests/082.out | 49 +++++++++++++--------------------------------- 2 files changed, 21 insertions(+), 42 deletions(-)
tests/qemu-iotests/082 +7 -7
@@ -60,11 +60,11 @@ _img_info # Multiple -o should be merged run_qemu_img create -f $IMGFMT -o cluster_size=4k -o lazy_refcounts=on "$TEST_IMG" $size -run_qemu_img info "$TEST_IMG" +_img_info --format-specific # If the same -o key is specified more than once, the last one wins run_qemu_img create -f $IMGFMT -o cluster_size=4k -o lazy_refcounts=on -o cluster_size=8k "$TEST_IMG" $size -run_qemu_img info "$TEST_IMG" +_img_info --format-specific run_qemu_img create -f $IMGFMT -o cluster_size=4k,cluster_size=8k "$TEST_IMG" $size _img_info
@@ -114,11 +114,11 @@ TEST_IMG="${TEST_IMG}.base" _img_info # Multiple -o should be merged run_qemu_img convert -O $IMGFMT -o cluster_size=4k -o lazy_refcounts=on "$TEST_IMG" "$TEST_IMG".base -run_qemu_img info "$TEST_IMG".base +TEST_IMG="${TEST_IMG}.base" _img_info --format-specific # If the same -o key is specified more than once, the last one wins run_qemu_img convert -O $IMGFMT -o cluster_size=4k -o lazy_refcounts=on -o cluster_size=8k "$TEST_IMG" "$TEST_IMG".base -run_qemu_img info "$TEST_IMG".base +TEST_IMG="${TEST_IMG}.base" _img_info --format-specific run_qemu_img convert -O $IMGFMT -o cluster_size=4k,cluster_size=8k "$TEST_IMG" "$TEST_IMG".base TEST_IMG="${TEST_IMG}.base" _img_info
@@ -157,15 +157,15 @@ echo === amend: Options specified more than once === # Last -f should win run_qemu_img amend -f foo -f $IMGFMT -o lazy_refcounts=on "$TEST_IMG" -run_qemu_img info "$TEST_IMG" +_img_info --format-specific # Multiple -o should be merged run_qemu_img amend -f $IMGFMT -o size=130M -o lazy_refcounts=off "$TEST_IMG" -run_qemu_img info "$TEST_IMG" +_img_info --format-specific # If the same -o key is specified more than once, the last one wins run_qemu_img amend -f $IMGFMT -o size=8M -o lazy_refcounts=on -o size=132M "$TEST_IMG" -run_qemu_img info "$TEST_IMG" +_img_info --format-specific run_qemu_img amend -f $IMGFMT -o size=4M,size=148M "$TEST_IMG" _img_info
tests/qemu-iotests/082.out +14 -35
98 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Quoted 8 lines · Michael Mueller
The real on-disk size of an image depends on things like the host filesystem.
_img_infoalready filters it out, use the function in 082.Signed-off-by Michael Mueller <[email protected]>--- tests/qemu-iotests/082 | 14 ++++++------- tests/qemu-iotests/082.out | 49 +++++++++++++--------------------------------- 2 files changed, 21 insertions(+), 42 deletions(-)
Ah, I knew there was some other test which called qemu-img info directly... Now I know why I didn't find anything by grepping for $QEMU_IMG info.
Reviewed-by Max Reitz <[email protected]>
Kevin Wolf
AppliedAm 27.11.2014 um 17:28 hat Michael Mueller geschrieben:
Quoted 4 lines
The real on-disk size of an image depends on things like the host filesystem.
_img_infoalready filters it out, use the function in 082.Signed-off-by Michael Mueller <[email protected]>
Thanks, applied to the block-next branch.
Kevin