|
@@ -38,16 +38,17 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
|
. ./common.rc
|
|
. ./common.rc
|
|
. ./common.filter
|
|
. ./common.filter
|
|
|
|
|
|
-# We can only test one format here because we need its sample file
|
|
|
|
-_supported_fmt bochs
|
|
|
|
-_supported_proto nbd
|
|
|
|
|
|
+# Some of these test cases use bochs, but others do use raw, so this
|
|
|
|
+# is only half a lie.
|
|
|
|
+_supported_fmt raw
|
|
|
|
+_supported_proto file
|
|
_supported_os Linux
|
|
_supported_os Linux
|
|
|
|
|
|
echo
|
|
echo
|
|
echo '=== Unsupported image creation in qemu-img create ==='
|
|
echo '=== Unsupported image creation in qemu-img create ==='
|
|
echo
|
|
echo
|
|
|
|
|
|
-$QEMU_IMG create -f $IMGFMT nbd://example.com 2>&1 64M | _filter_imgfmt
|
|
|
|
|
|
+$QEMU_IMG create -f bochs nbd://example.com 2>&1 64M
|
|
|
|
|
|
echo
|
|
echo
|
|
echo '=== Unsupported image creation in qemu-img convert ==='
|
|
echo '=== Unsupported image creation in qemu-img convert ==='
|
|
@@ -56,17 +57,15 @@ echo
|
|
# We could use any input image format here, but this is a bochs test, so just
|
|
# We could use any input image format here, but this is a bochs test, so just
|
|
# use the bochs image
|
|
# use the bochs image
|
|
_use_sample_img empty.bochs.bz2
|
|
_use_sample_img empty.bochs.bz2
|
|
-$QEMU_IMG convert -f $IMGFMT -O $IMGFMT "$TEST_IMG" nbd://example.com 2>&1 \
|
|
|
|
- | _filter_imgfmt
|
|
|
|
|
|
+$QEMU_IMG convert -f bochs -O bochs "$TEST_IMG" nbd://example.com
|
|
|
|
|
|
echo
|
|
echo
|
|
echo '=== Unsupported format in qemu-img amend ==='
|
|
echo '=== Unsupported format in qemu-img amend ==='
|
|
echo
|
|
echo
|
|
|
|
|
|
-# The protocol does not matter here
|
|
|
|
-_use_sample_img empty.bochs.bz2
|
|
|
|
-$QEMU_IMG amend -f $IMGFMT -o foo=bar "$TEST_IMG" 2>&1 | _filter_imgfmt
|
|
|
|
-
|
|
|
|
|
|
+TEST_IMG="$TEST_DIR/t.$IMGFMT"
|
|
|
|
+_make_test_img 1M
|
|
|
|
+$QEMU_IMG amend -f $IMGFMT -o size=2M "$TEST_IMG" 2>&1 | _filter_imgfmt
|
|
|
|
|
|
# success, all done
|
|
# success, all done
|
|
echo
|
|
echo
|