qemu-io command add a warning message because probing a raw img is dangerous. So add "-f" option to avoid this.
Signed-off-by: Wang dongxu <wangdon...@cmss.chinamobile.com> --- tests/functional/013 | 6 +++--- tests/functional/017 | 2 +- tests/functional/024 | 6 +++--- tests/functional/025 | 4 ++-- tests/functional/039 | 22 +++++++++++----------- tests/functional/058 | 2 +- tests/functional/059 | 2 +- tests/functional/075 | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/functional/013 b/tests/functional/013 index b35b806..f724841 100755 --- a/tests/functional/013 +++ b/tests/functional/013 @@ -14,11 +14,11 @@ _cluster_format -c 1 _vdi_create test 4G for i in `seq 1 9`; do - $QEMU_IO -c "write 0 512 -P $i" sheepdog:test | _filter_qemu_io + $QEMU_IO -f raw -c "write 0 512 -P $i" sheepdog:test | _filter_qemu_io $QEMU_IMG snapshot -c tag$i sheepdog:test done -$QEMU_IO -c "read 0 512 -P 9" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 512 -P 9" sheepdog:test | _filter_qemu_io for i in `seq 1 9`; do - $QEMU_IO -c "read 0 512 -P $i" sheepdog:test:tag$i | _filter_qemu_io + $QEMU_IO -f raw -c "read 0 512 -P $i" sheepdog:test:tag$i | _filter_qemu_io done diff --git a/tests/functional/017 b/tests/functional/017 index 5ebe7da..1c22c76 100755 --- a/tests/functional/017 +++ b/tests/functional/017 @@ -20,7 +20,7 @@ $QEMU_IMG snapshot -c tag3 sheepdog:test _vdi_create test2 4G $QEMU_IMG snapshot -c tag1 sheepdog:test2 $QEMU_IMG snapshot -c tag2 sheepdog:test2 -$QEMU_IO -c "write 0 512" sheepdog:test2:1 | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 512" sheepdog:test2:1 | _filter_qemu_io $QEMU_IMG snapshot -c tag3 sheepdog:test2 $DOG vdi tree | _filter_short_date diff --git a/tests/functional/024 b/tests/functional/024 index e1c1180..e8a33c4 100755 --- a/tests/functional/024 +++ b/tests/functional/024 @@ -23,14 +23,14 @@ _vdi_create ${VDI_NAME} ${VDI_SIZE} sleep 1 echo "filling ${VDI_NAME} with data" -$QEMU_IO -c "write 0 ${VDI_SIZE}" sheepdog:${VDI_NAME} | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 ${VDI_SIZE}" sheepdog:${VDI_NAME} | _filter_qemu_io echo "reading back ${VDI_NAME}" -$QEMU_IO -c "read 0 1m" sheepdog:${VDI_NAME} | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 1m" sheepdog:${VDI_NAME} | _filter_qemu_io echo "starting second sheep" _start_sheep 6 _wait_for_sheep 7 echo "reading data from second sheep" -$QEMU_IO -c "read 0 ${VDI_SIZE}" sheepdog:localhost:7001:${VDI_NAME} | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 ${VDI_SIZE}" sheepdog:localhost:7001:${VDI_NAME} | _filter_qemu_io diff --git a/tests/functional/025 b/tests/functional/025 index 8f89ccb..37af0ea 100755 --- a/tests/functional/025 +++ b/tests/functional/025 @@ -26,10 +26,10 @@ echo "creating vdi ${NAME}" $DOG vdi create ${VDI_NAME} ${VDI_SIZE} echo "filling ${VDI_NAME} with data" -$QEMU_IO -c "write 0 ${VDI_SIZE}" sheepdog:${VDI_NAME} | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 ${VDI_SIZE}" sheepdog:${VDI_NAME} | _filter_qemu_io echo "reading back ${VDI_NAME} from second zone" -$QEMU_IO -c "read 0 1m" sheepdog:localhost:7002:${VDI_NAME} | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 1m" sheepdog:localhost:7002:${VDI_NAME} | _filter_qemu_io echo "starting a sheep in the third zone" for i in `seq 3 3`; do diff --git a/tests/functional/039 b/tests/functional/039 index 5b2540f..fddd4fb 100755 --- a/tests/functional/039 +++ b/tests/functional/039 @@ -13,37 +13,37 @@ _wait_for_sheep 6 _cluster_format -c 6 _vdi_create test 4G -$QEMU_IO -c "write 0 512 -P 1" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 512 -P 1" sheepdog:test | _filter_qemu_io $DOG vdi snapshot test -s snap1 -$QEMU_IO -c "write 0 512 -P 2" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 512 -P 2" sheepdog:test | _filter_qemu_io echo yes | $DOG vdi rollback test -s snap1 -$QEMU_IO -c "read 0 512 -P 1" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 512 -P 1" sheepdog:test | _filter_qemu_io $DOG vdi tree | _filter_short_date _vdi_list -$QEMU_IO -c "write 0 512 -P 2" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 512 -P 2" sheepdog:test | _filter_qemu_io $DOG vdi snapshot test -s snap2 -$QEMU_IO -c "write 0 512 -P 3" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 512 -P 3" sheepdog:test | _filter_qemu_io echo yes | $DOG vdi rollback test -s snap1 -$QEMU_IO -c "read 0 512 -P 1" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 512 -P 1" sheepdog:test | _filter_qemu_io $DOG vdi tree | _filter_short_date _vdi_list echo yes | $DOG vdi rollback test -s snap2 -$QEMU_IO -c "read 0 512 -P 2" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 512 -P 2" sheepdog:test | _filter_qemu_io $DOG vdi tree | _filter_short_date _vdi_list echo yes | $DOG vdi rollback test -s snap1 -$QEMU_IO -c "read 0 512 -P 1" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 512 -P 1" sheepdog:test | _filter_qemu_io $DOG vdi tree | _filter_short_date _vdi_list -$QEMU_IO -c "write 0 512 -P 3" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 512 -P 3" sheepdog:test | _filter_qemu_io $DOG vdi snapshot test -s snap3 -$QEMU_IO -c "write 0 512 -P 4" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "write 0 512 -P 4" sheepdog:test | _filter_qemu_io $DOG vdi snapshot test -s snap4 # these fail since the snap ids don't belong to snapshots @@ -51,6 +51,6 @@ echo yes | $DOG vdi rollback test -s 0 echo yes | $DOG vdi rollback test -s 5 echo yes | $DOG vdi rollback test -s snap3 -$QEMU_IO -c "read 0 512 -P 3" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "read 0 512 -P 3" sheepdog:test | _filter_qemu_io $DOG vdi tree | _filter_short_date _vdi_list diff --git a/tests/functional/058 b/tests/functional/058 index d895648..b745b49 100755 --- a/tests/functional/058 +++ b/tests/functional/058 @@ -10,7 +10,7 @@ _wait_for_sheep 6 _cluster_format -c 6 _vdi_create test 100M dd if=/dev/zero | $DOG vdi write -w test -$QEMU_IO -c "discard 0 100m" sheepdog:test | _filter_qemu_io +$QEMU_IO -f raw -c "discard 0 100m" sheepdog:test | _filter_qemu_io $DOG vdi check test for i in `seq 0 24`; do $DOG vdi object location test -i $i; diff --git a/tests/functional/059 b/tests/functional/059 index 2b60447..25bd36e 100755 --- a/tests/functional/059 +++ b/tests/functional/059 @@ -31,7 +31,7 @@ _input() echo quit } -_input | $QEMU_IO sheepdog:test > $STORE/qemu-io.log +_input | $QEMU_IO -f raw sheepdog:test > $STORE/qemu-io.log _vdi_list diff --git a/tests/functional/075 b/tests/functional/075 index d372d51..cce8dc6 100755 --- a/tests/functional/075 +++ b/tests/functional/075 @@ -26,4 +26,4 @@ _input() echo quit } -_input | $QEMU_IO sheepdog:test | sed 's/qemu-io> //g' +_input | $QEMU_IO -f raw sheepdog:test | sed 's/qemu-io> //g' -- 2.1.0 -- sheepdog mailing list sheepdog@lists.wpkg.org https://lists.wpkg.org/mailman/listinfo/sheepdog