From ae7e0bf461d2e7e3779c58346ae050d19d149908 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 22 Dec 2015 10:49:19 +0800 Subject: iotests: 050: Use TEST_IMG override instead of "mv" Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450752561-9300-10-git-send-email-famz@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/050 | 9 +++++++-- tests/qemu-iotests/050.out | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/050 b/tests/qemu-iotests/050 index 07802bc49c..13006dd1db 100755 --- a/tests/qemu-iotests/050 +++ b/tests/qemu-iotests/050 @@ -51,14 +51,19 @@ fi echo echo "== Creating images ==" +TEST_IMG_SAVE="$TEST_IMG" +TEST_IMG="$TEST_IMG.old" + size=10M _make_test_img $size $QEMU_IO -c "write -P 0x40 0 1048576" "$TEST_IMG" | _filter_qemu_io -mv "$TEST_IMG" "$TEST_IMG.old" + +TEST_IMG="$TEST_IMG_SAVE.new" _make_test_img $size $QEMU_IO -c "write -P 0x5a 0 1048576" "$TEST_IMG" | _filter_qemu_io -mv "$TEST_IMG" "$TEST_IMG.new" + +TEST_IMG="$TEST_IMG_SAVE" _make_test_img -b "$TEST_IMG.old" $size $QEMU_IO -c "write -z 0 1048576" "$TEST_IMG" | _filter_qemu_io diff --git a/tests/qemu-iotests/050.out b/tests/qemu-iotests/050.out index 397cf7f39f..3602d580dc 100644 --- a/tests/qemu-iotests/050.out +++ b/tests/qemu-iotests/050.out @@ -1,10 +1,10 @@ QA output created by 050 == Creating images == -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=10485760 +Formatting 'TEST_DIR/t.IMGFMT.old', fmt=IMGFMT size=10485760 wrote 1048576/1048576 bytes at offset 0 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=10485760 +Formatting 'TEST_DIR/t.IMGFMT.new', fmt=IMGFMT size=10485760 wrote 1048576/1048576 bytes at offset 0 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=10485760 backing_file=TEST_DIR/t.IMGFMT.old -- cgit v1.2.3