]> Git Repo - qemu.git/blobdiff - tests/qemu-iotests/038
block: Generically refresh runtime options
[qemu.git] / tests / qemu-iotests / 038
index cfaf00a783f8fa89e57c7990179945064e3ef7f1..575093e8cfd35a6e8500b23cb949890eeb3c329e 100755 (executable)
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
-tmp=/tmp/$$
 status=1       # failure is the default!
 
 _cleanup()
@@ -48,9 +46,12 @@ size=128M
 echo
 echo "== creating backing file for COW tests =="
 
+TEST_IMG_SAVE="$TEST_IMG"
+TEST_IMG="$TEST_IMG.base"
+
 _make_test_img $size
 
-function backing_io()
+backing_io()
 {
     local offset=$1
     local sectors=$2
@@ -68,14 +69,14 @@ function backing_io()
 
 backing_io 0 256 write | $QEMU_IO "$TEST_IMG" | _filter_qemu_io
 
-mv "$TEST_IMG" "$TEST_IMG.base"
+TEST_IMG="$TEST_IMG_SAVE"
 
 _make_test_img -b "$TEST_IMG.base" 6G
 
 echo
 echo "== Some concurrent requests touching the same cluster =="
 
-function overlay_io()
+overlay_io()
 {
     # Start with a request touching two clusters
     echo aio_write -P 0x80 2020k 80k
@@ -101,7 +102,7 @@ overlay_io | $QEMU_IO "$TEST_IMG" | _filter_qemu_io |\
 echo
 echo "== Verify image content =="
 
-function verify_io()
+verify_io()
 {
     echo read -P 31 2016k 4k
     echo read -P 0x80 2020k 80k
This page took 0.024341 seconds and 4 git commands to generate.