Skip to contentSkip to conversation

I/O tests cleanups

PATCH In review Cleber Rosa 4 participants 27 messages Nov 16, 2017 – Dec 1, 2017 Page 2 of 2

lore
Share & tools
lore
#18 lore raw

PATCH 7/10 qemu-iotests: remove the concept of $seq.full (and boiler plate code)

In reply to Cleber Rosa

The $seq.full file, in theory, should contain the full output of a test error. In practice, it's only used on a single test, and the boiler plate code to clean it up plagues all other tests.

Let's remove the concept altogether, and record the failure in the output itself for the one test using this function.

---
 tests/qemu-iotests/001 | 1 -
 tests/qemu-iotests/002 | 1 -
 tests/qemu-iotests/003 | 1 -
 tests/qemu-iotests/004 | 1 -
 tests/qemu-iotests/005 | 1 -
 tests/qemu-iotests/007 | 1 -
 tests/qemu-iotests/008 | 1 -
 tests/qemu-iotests/009 | 1 -
 tests/qemu-iotests/010 | 1 -
 tests/qemu-iotests/011 | 1 -
 tests/qemu-iotests/012 | 1 -
 tests/qemu-iotests/013 | 1 -
 tests/qemu-iotests/014 | 1 -
 tests/qemu-iotests/015 | 1 -
 tests/qemu-iotests/017 | 1 -
 tests/qemu-iotests/018 | 1 -
 tests/qemu-iotests/019 | 1 -
 tests/qemu-iotests/020 | 1 -
 tests/qemu-iotests/021 | 1 -
 tests/qemu-iotests/022 | 1 -
 tests/qemu-iotests/023 | 1 -
 tests/qemu-iotests/024 | 1 -
 tests/qemu-iotests/025 | 1 -
 tests/qemu-iotests/026 | 1 -
 tests/qemu-iotests/027 | 1 -
 tests/qemu-iotests/028 | 1 -
 tests/qemu-iotests/029 | 1 -
 tests/qemu-iotests/031 | 1 -
 tests/qemu-iotests/032 | 1 -
 tests/qemu-iotests/033 | 1 -
 tests/qemu-iotests/034 | 1 -
 tests/qemu-iotests/035 | 1 -
 tests/qemu-iotests/036 | 1 -
 tests/qemu-iotests/037 | 1 -
 tests/qemu-iotests/038 | 1 -
 tests/qemu-iotests/039 | 1 -
 tests/qemu-iotests/042 | 1 -
 tests/qemu-iotests/043 | 1 -
 tests/qemu-iotests/046 | 1 -
 tests/qemu-iotests/047 | 1 -
 tests/qemu-iotests/049 | 1 -
 tests/qemu-iotests/050 | 1 -
 tests/qemu-iotests/051 | 1 -
 tests/qemu-iotests/052 | 1 -
 tests/qemu-iotests/053 | 1 -
 tests/qemu-iotests/054 | 1 -
 tests/qemu-iotests/058 | 1 -
 tests/qemu-iotests/059 | 1 -
 tests/qemu-iotests/060 | 1 -
 tests/qemu-iotests/061 | 1 -
 tests/qemu-iotests/062 | 1 -
 tests/qemu-iotests/063 | 1 -
 tests/qemu-iotests/064 | 1 -
 tests/qemu-iotests/066 | 1 -
 tests/qemu-iotests/067 | 1 -
 tests/qemu-iotests/068 | 1 -
 tests/qemu-iotests/069 | 1 -
 tests/qemu-iotests/070 | 1 -
 tests/qemu-iotests/071 | 1 -
 tests/qemu-iotests/072 | 1 -
 tests/qemu-iotests/073 | 1 -
 tests/qemu-iotests/075 | 1 -
 tests/qemu-iotests/076 | 1 -
 tests/qemu-iotests/077 | 1 -
 tests/qemu-iotests/078 | 1 -
 tests/qemu-iotests/079 | 1 -
 tests/qemu-iotests/080 | 1 -
 tests/qemu-iotests/081 | 1 -
 tests/qemu-iotests/082 | 1 -
 tests/qemu-iotests/083 | 1 -
 tests/qemu-iotests/084 | 1 -
 tests/qemu-iotests/085 | 1 -
 tests/qemu-iotests/086 | 1 -
 tests/qemu-iotests/087 | 1 -
 tests/qemu-iotests/088 | 1 -
 tests/qemu-iotests/089 | 1 -
 tests/qemu-iotests/090 | 1 -
 tests/qemu-iotests/091 | 1 -
 tests/qemu-iotests/092 | 1 -
 tests/qemu-iotests/094 | 1 -
 tests/qemu-iotests/095 | 1 -
 tests/qemu-iotests/097 | 1 -
 tests/qemu-iotests/098 | 1 -
 tests/qemu-iotests/099 | 1 -
 tests/qemu-iotests/101 | 1 -
 tests/qemu-iotests/102 | 1 -
 tests/qemu-iotests/103 | 1 -
 tests/qemu-iotests/104 | 1 -
 tests/qemu-iotests/105 | 1 -
 tests/qemu-iotests/106 | 1 -
 tests/qemu-iotests/107 | 1 -
 tests/qemu-iotests/108 | 1 -
 tests/qemu-iotests/109 | 1 -
 tests/qemu-iotests/110 | 1 -
 tests/qemu-iotests/111 | 1 -
 tests/qemu-iotests/112 | 1 -
 tests/qemu-iotests/113 | 1 -
 tests/qemu-iotests/114 | 1 -
 tests/qemu-iotests/115 | 1 -
 tests/qemu-iotests/116 | 1 -
 tests/qemu-iotests/117 | 1 -
 tests/qemu-iotests/119 | 1 -
 tests/qemu-iotests/120 | 1 -
 tests/qemu-iotests/121 | 1 -
 tests/qemu-iotests/122 | 1 -
 tests/qemu-iotests/123 | 1 -
 tests/qemu-iotests/125 | 1 -
 tests/qemu-iotests/126 | 1 -
 tests/qemu-iotests/127 | 1 -
 tests/qemu-iotests/128 | 1 -
 tests/qemu-iotests/130 | 1 -
 tests/qemu-iotests/131 | 1 -
 tests/qemu-iotests/133 | 1 -
 tests/qemu-iotests/134 | 1 -
 tests/qemu-iotests/135 | 1 -
 tests/qemu-iotests/137 | 1 -
 tests/qemu-iotests/138 | 1 -
 tests/qemu-iotests/140 | 1 -
 tests/qemu-iotests/141 | 1 -
 tests/qemu-iotests/142 | 1 -
 tests/qemu-iotests/143 | 1 -
 tests/qemu-iotests/144 | 1 -
 tests/qemu-iotests/145 | 1 -
 tests/qemu-iotests/146 | 1 -
 tests/qemu-iotests/150 | 1 -
 tests/qemu-iotests/153 | 1 -
 tests/qemu-iotests/154 | 1 -
 tests/qemu-iotests/156 | 1 -
 tests/qemu-iotests/157 | 1 -
 tests/qemu-iotests/158 | 1 -
 tests/qemu-iotests/162 | 1 -
 tests/qemu-iotests/171 | 1 -
 tests/qemu-iotests/172 | 1 -
 tests/qemu-iotests/173 | 1 -
 tests/qemu-iotests/174 | 9 +++++++--
 tests/qemu-iotests/175 | 1 -
 tests/qemu-iotests/176 | 1 -
 tests/qemu-iotests/178 | 1 -
 tests/qemu-iotests/181 | 1 -
 tests/qemu-iotests/182 | 1 -
 tests/qemu-iotests/183 | 1 -
 tests/qemu-iotests/184 | 1 -
 tests/qemu-iotests/185 | 1 -
 tests/qemu-iotests/186 | 1 -
 tests/qemu-iotests/187 | 1 -
 tests/qemu-iotests/188 | 1 -
 tests/qemu-iotests/189 | 1 -
 tests/qemu-iotests/190 | 1 -
 tests/qemu-iotests/191 | 1 -
 tests/qemu-iotests/192 | 1 -
 tests/qemu-iotests/195 | 1 -
 151 files changed, 7 insertions(+), 152 deletions(-)
tests/qemu-iotests/001 +0 -1
index b38fb0c73d..5830f68ba0 100755
@@ -58,5 +58,4 @@ $QEMU_IO -c "read -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/002 +0 -1
index 608d62652a..7dd1774464 100755
@@ -78,5 +78,4 @@ $QEMU_IO -c 'read -pP 0xa 262186 470' "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/003 +0 -1
index 68beb32aea..13cc8041a3 100755
@@ -71,5 +71,4 @@ $QEMU_IO -c "readv -P 0xb $offset $chunksize $chunksize \
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/004 +0 -1
index 5afb23c9fd..710148c2bb 100755
@@ -97,5 +97,4 @@ $QEMU_IO -c "readv $past_offset 4096" "$TEST_IMG"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/005 +0 -1
index a860062847..d2c6575992 100755
@@ -68,5 +68,4 @@ $QEMU_IO -c "write 8192 4096" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/007 +0 -1
index f9048f9a7a..3fe2fe5dad 100755
@@ -62,5 +62,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/008 +0 -1
index 7755c00a43..f021b8ea3a 100755
@@ -58,5 +58,4 @@ $QEMU_IO -c "aio_read -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/009 +0 -1
index 418c0a56f7..8d56673bc6 100755
@@ -62,5 +62,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/010 +0 -1
index 6e9beb953d..3f91224795 100755
@@ -64,5 +64,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/011 +0 -1
index 275b0cc29c..921f43c03d 100755
@@ -68,5 +68,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/012 +0 -1
index 59cac183e2..3121f947f6 100755
@@ -58,5 +58,4 @@ $QEMU_IO -r -c "read 0 512" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/013 +0 -1
index d33969be6a..095c2a0cd6 100755
@@ -91,5 +91,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/014 +0 -1
index 360379f2b3..c28970732b 100755
@@ -70,5 +70,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/015 +0 -1
index c1b920fd56..a5cda4742c 100755
@@ -80,5 +80,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/017 +0 -1
index b2a95c5166..2398fc2bf1 100755
@@ -98,5 +98,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/018 +0 -1
index 5375eae206..8d4ccda85e 100755
@@ -100,5 +100,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/019 +0 -1
index c2af8a0236..b06ef93976 100755
@@ -126,5 +126,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/020 +0 -1
index 0361809a6d..b34cfc16e1 100755
@@ -111,5 +111,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/021 +0 -1
index 2ea6b1d161..97e27d6cf3 100755
@@ -56,5 +56,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/022 +0 -1
index f577278db9..bc9186c0fa 100755
@@ -60,5 +60,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/023 +0 -1
index ca8440ad83..99fda1ff14 100755
@@ -113,5 +113,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/024 +0 -1
index 189d5c3fc1..b3cabe1fb5 100755
@@ -124,5 +124,4 @@ io_pattern readv $((15 * CLUSTER_SIZE)) $CLUSTER_SIZE 0 1 0x00
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/025 +0 -1
index eb12d1c7d6..a781632b09 100755
@@ -71,5 +71,4 @@ io_pattern read $small_size $(($big_size - $small_size)) 0 1 0
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/026 +0 -1
index 3fb915f289..166c8267f7 100755
@@ -200,5 +200,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/027 +0 -1
index 9a25a63c28..c9416c719f 100755
@@ -71,5 +71,4 @@ $QEMU_IO -c "read -pP 0 -l 512 -s $subcluster_size $subcluster_offset $(( subclu
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/028 +0 -1
index e75611bab3..f2991a28aa 100755
@@ -134,5 +134,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/029 +0 -1
index 01ed075402..fee694f305 100755
@@ -95,5 +95,4 @@ poke_file "$TEST_IMG" "$offset_l1_size" "\x00\x00\x00\x01"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/031 +0 -1
index 1ac200f191..da44539b0f 100755
@@ -73,5 +73,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/032 +0 -1
index c9f9cf5439..15a0ff6298 100755
@@ -62,5 +62,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/033 +0 -1
index dd8fc32ea8..d4beecc9c0 100755
@@ -102,5 +102,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/034 +0 -1
index 1bdd7f2e04..c0eb87b40a 100755
@@ -113,5 +113,4 @@ $QEMU_IO -c "read -P 0x55 526k 498k" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/035 +0 -1
index 1cd2475ba6..04c4cf0f58 100755
@@ -65,5 +65,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/036 +0 -1
index e49e4a7f85..990b9d82b6 100755
@@ -114,5 +114,4 @@ $PYTHON qcow2.py "$TEST_IMG" dump-header
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/037 +0 -1
index 06ba02a9f9..c4d55babe2 100755
@@ -118,5 +118,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/038 +0 -1
index 1ad0efd1a3..b35c30fa17 100755
@@ -130,5 +130,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/039 +0 -1
index cf83895f23..99a33df803 100755
@@ -174,6 +174,5 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
 
tests/qemu-iotests/042 +0 -1
index db66fc8434..7fafb6a436 100755
@@ -70,6 +70,5 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
 
tests/qemu-iotests/043 +0 -1
index 7d106ddb3b..0ce07adfd0 100755
@@ -88,5 +88,4 @@ _img_info --backing-chain --output=json
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/046 +0 -1
index f6914ccd1e..c3c16ebd3d 100755
@@ -265,5 +265,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/047 +0 -1
index 474c5cb47d..ebbb36c349 100755
@@ -68,5 +68,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/049 +0 -1
index 2f4d8ab932..984652cd97 100755
@@ -116,5 +116,4 @@ test_qemu_img create -f $IMGFMT -o compat=0.10,lazy_refcounts=on "$TEST_IMG" 64M
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/050 +0 -1
index 7096fa535c..f290c68498 100755
@@ -73,5 +73,4 @@ $QEMU_IO -c "read -P 0x00 0 1048576" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/051 +0 -1
index e726df6e01..b6903d13c4 100755
@@ -341,5 +341,4 @@ $QEMU_IO -c "read -P 0x33 0 4k" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/052 +0 -1
index c521a6fc36..33c3e55713 100755
@@ -60,5 +60,4 @@ $QEMU_IO -c "read -P 0 0 $size" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/053 +0 -1
index c8fda86672..a84dde31e0 100755
@@ -65,6 +65,5 @@ $QEMU_IO -c "read -P0xa 0 512" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
 
tests/qemu-iotests/054 +0 -1
index bcea34ef86..0fc2a8faa6 100755
@@ -51,5 +51,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/058 +0 -1
index 17970357cd..74118b93d3 100755
@@ -141,5 +141,4 @@ $QEMU_IO -c 'read -P 0xb 0x2000 0x1000' "$converted_image" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/059 +0 -1
index 6af6c6fada..fe16e9442d 100755
@@ -155,5 +155,4 @@ _cleanup_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/060 +0 -1
index d562b2c967..98a946f99c 100755
@@ -301,5 +301,4 @@ $QEMU_IO -c "write 0 64k" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/061 +0 -1
index ffc27213a5..2c6da49646 100755
@@ -235,5 +235,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/062 +0 -1
index 4c6c3d70f4..3f97c7d6da 100755
@@ -57,5 +57,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/063 +0 -1
index 29acdf3a8b..9b8660e021 100755
@@ -90,6 +90,5 @@ if $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -n "$TEST_IMG.orig" "$TEST_IMG" >/dev
 fi
 
 echo "*** done"
-rm -f $seq.full
 status=0
 exit 0
tests/qemu-iotests/064 +0 -1
index 0f220282c7..40954b36d7 100755
@@ -81,5 +81,4 @@ $QEMU_IO -c "read -pP 0xc3 99M 58M" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/066 +0 -1
index c8b0bee3be..556b42bfe6 100755
@@ -184,5 +184,4 @@ _cleanup_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/067 +0 -1
index 976822b34c..b7a6ef2097 100755
@@ -150,5 +150,4 @@ EOF
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/068 +0 -1
index dc00ee1c2d..162cd26005 100755
@@ -81,5 +81,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/069 +0 -1
index 1d44ef37a1..1f3baeea13 100755
@@ -53,5 +53,4 @@ $QEMU_IO -c quit "$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/070 +0 -1
index d52a85f624..684742893c 100755
@@ -78,5 +78,4 @@ _img_info
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/071 +0 -1
index fd74238312..7b1fdf7989 100755
@@ -252,5 +252,4 @@ EOF
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/072 +0 -1
index 568f8774d8..5d4e8becac 100755
@@ -62,5 +62,4 @@ $QEMU_IO -c 'read -P 42 0 512' "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/073 +0 -1
index 37e68263b4..f5be7347d1 100755
@@ -160,5 +160,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/075 +0 -1
index 3e7ab6de95..b924d7a5f7 100755
@@ -99,5 +99,4 @@ $QEMU_IO -c "read 0 512" $TEST_IMG 2>&1 | _filter_qemu_io | _filter_testdir
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/076 +0 -1
index df4a1614fb..64b935ad02 100755
@@ -79,5 +79,4 @@ _use_sample_img parallels-v2.bz2
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/077 +0 -1
index 8d4be8c1e8..897afb688d 100755
@@ -262,5 +262,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/078 +0 -1
index b5f7c3a44a..36490ec94c 100755
@@ -84,5 +84,4 @@ poke_file "$TEST_IMG" "$extent_size_offset" "\x00\x00\x00\x00"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/079 +0 -1
index 3363e43146..d8a2a17e71 100755
@@ -50,5 +50,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/080 +0 -1
index e7e7caf00d..aa7b13776a 100755
@@ -177,5 +177,4 @@ poke_file "$TEST_IMG" "$offset_snap1_l1_size" "\x10\x00\x00\x00"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/081 +0 -1
index 33b18106c1..d840841b0d 100755
@@ -168,5 +168,4 @@ $QEMU_IO -c "open -o $quorum" -c "read -P 0x32 0 $size" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/082 +0 -1
index fd904d69f8..4f1c03b882 100755
@@ -201,5 +201,4 @@ run_qemu_img convert -o help
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/083 +0 -1
index 51fd8825b4..39162b36ef 100755
@@ -146,5 +146,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/084 +0 -1
index 333488a949..3daf41615b 100755
@@ -109,5 +109,4 @@ _img_info
 # success, all done
 echo
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/085 +0 -1
index da481225d6..375a51e07a 100755
@@ -241,5 +241,4 @@ _send_qemu_cmd $h "{ 'execute': 'blockdev-snapshot',
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/086 +0 -1
index 8611514049..1224e068b7 100755
@@ -58,5 +58,4 @@ $QEMU_IMG convert -p -O $IMGFMT -f $IMGFMT "$TEST_IMG" "$TEST_IMG".base  2>&1 |\
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/087 +0 -1
index dd6e5976ca..fb572dc5b8 100755
@@ -199,5 +199,4 @@ EOF
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/088 +0 -1
index f6e1848ce9..75e6ba9908 100755
@@ -57,5 +57,4 @@ poke_file "$TEST_IMG" "$offset_block_size" "\x12\x34\x56\x78"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/089 +0 -1
index f925f5f245..dad9fcb69f 100755
@@ -126,5 +126,4 @@ $QEMU_IO -c "open -o driver=qcow2 json:{\"driver\":\"raw\",\"file.filename\":\"$
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/090 +0 -1
index 2ae70f7d79..74e14e9f00 100755
@@ -54,5 +54,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/091 +0 -1
index 48cf18d312..bb32f681bb 100755
@@ -103,5 +103,4 @@ echo "Running 'qemu-img check -r all \$TEST_IMG'"
 "${QEMU_IMG}" check -r all "${TEST_IMG}" 2>&1 | _filter_testdir | _filter_qemu
 
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/092 +0 -1
index eeb039c7bd..041d888984 100755
@@ -91,5 +91,4 @@ poke_file "$TEST_IMG" "$offset_backing_file_size" "\x7f\xff\xff\xff"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/094 +0 -1
index aa5faff5de..47ff00651f 100755
@@ -80,5 +80,4 @@ wait=1 _cleanup_qemu
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/095 +0 -1
index fa17640c2c..bc80c019ed 100755
@@ -81,5 +81,4 @@ TEST_IMG="${TEST_IMG}.base" _img_info | _filter_img_info
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/097 +0 -1
index 2914da2da3..2a68a08358 100755
@@ -121,5 +121,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/098 +0 -1
index 97f890dcf7..afe5b72c87 100755
@@ -75,5 +75,4 @@ rm -f "$TEST_DIR/blkdebug.conf"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/099 +0 -1
index 8e8306d1e3..ac94ca7f21 100755
@@ -123,5 +123,4 @@ rm -f "$TEST_IMG.compare" "$TEST_DIR/blkdebug.conf"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/101 +0 -1
index 38dace6aec..cc57078727 100755
@@ -51,5 +51,4 @@ $QEMU_IO -c "read -P 0 0 512" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/102 +0 -1
index 0fac4555b2..9acc2772c7 100755
@@ -75,5 +75,4 @@ _send_qemu_cmd $QEMU_HANDLE 'quit' ''
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/103 +0 -1
index 55df533835..eaab111b5a 100755
@@ -102,5 +102,4 @@ $QEMU_IO -c "open -o cache-size=0 $TEST_IMG" -c 'write 0 64k' | _filter_qemu_io
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/104 +0 -1
index 903471346f..5818b449da 100755
@@ -47,5 +47,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/105 +0 -1
index 68c6b732c2..e975f2930e 100755
@@ -63,5 +63,4 @@ $QEMU_IO -c "write 14T 4096" "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/106 +0 -1
index 9771198d70..ee81af19da 100755
@@ -86,5 +86,4 @@ done
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/107 +0 -1
index 7ddb27fbc9..87e2a22cec 100755
@@ -53,6 +53,5 @@ $QEMU_IO -c "open -o driver=raw $TEST_IMG" -c 'read -p -P 0 196616 65528' \
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
 
tests/qemu-iotests/108 +0 -1
index 1284fc98d1..31ea282f20 100755
@@ -136,5 +136,4 @@ _check_test_img -r all
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/109 +0 -1
index 87985f66fb..e011ad86c3 100755
@@ -130,5 +130,4 @@ done
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/110 +0 -1
index 0f62778f15..e596efddb5 100755
@@ -87,5 +87,4 @@ _make_test_img -b "$TEST_IMG_REL.base"
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/111 +0 -1
index 85b6dd1746..37223d93d7 100755
@@ -46,5 +46,4 @@ $QEMU_IMG create -f $IMGFMT -b "$TEST_IMG.inexistent" "$TEST_IMG" 2>&1 \
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/112 +0 -1
index 5c4ecfeb4c..221892fbd1 100755
@@ -289,5 +289,4 @@ _check_test_img
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/113 +0 -1
index 91af75d687..9d48020b94 100755
@@ -69,5 +69,4 @@ $QEMU_IMG amend -f $IMGFMT -o foo=bar "$TEST_IMG" 2>&1 | _filter_imgfmt
 # success, all done
 echo
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/114 +0 -1
index 66313cae91..44ef79a87f 100755
@@ -55,5 +55,4 @@ $QEMU_IO -c "open -o backing.driver=$IMGFMT $TEST_IMG" -c "read 0 4k" | _filter_
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/115 +0 -1
index 2f06622e36..f2ec8fbd44 100755
@@ -88,5 +88,4 @@ $QEMU_IMG check "$TEST_IMG" | \
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/116 +0 -1
index 7378c34bd6..715a44200f 100755
@@ -89,5 +89,4 @@ $QEMU_IO -f "$IMGFMT" -c "read 0 $size" "$TEST_IMG" 2>&1 | _filter_qemu_io | _fi
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/117 +0 -1
index 2ace2c9f89..07aca0eba1 100755
@@ -80,5 +80,4 @@ $QEMU_IO -c 'read -P 42 0 64k' "$TEST_IMG" | _filter_qemu_io
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/119 +0 -1
index 3df227748a..dbc7350458 100755
@@ -53,5 +53,4 @@ echo "{'execute': 'qmp_capabilities'}
 # success, all done
 echo
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/120 +0 -1
index 0ce0a2c9cd..3816260951 100755
@@ -59,5 +59,4 @@ $QEMU_IO_PROG -c 'read -P 42 0 64k' \
 # success, all done
 echo
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/121 +0 -1
index c6ce9e782a..04b38c9de8 100755
@@ -95,5 +95,4 @@ _check_test_img
 # success, all done
 echo
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/122 +0 -1
index e513b6abbf..ea4ba0f098 100755
@@ -216,5 +216,4 @@ done
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/123 +0 -1
index 9edcc4c8d2..6701c7ab54 100755
@@ -55,5 +55,4 @@ $QEMU_IO -c 'read -P 42 0 1M' "$TEST_IMG" | _filter_qemu_io
 # success, all done
 echo
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/125 +0 -1
index 1a11496024..6a0504ba0a 100755
@@ -127,5 +127,4 @@ done
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/126 +0 -1
index 73ed16a9af..882ace0191 100755
@@ -99,5 +99,4 @@ popd >/dev/null
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/127 +0 -1
index ee7e3d365d..e84f0d80f6 100755
@@ -91,5 +91,4 @@ wait=yes _cleanup_qemu
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/128 +0 -1
index 412d4f86ca..51009f18f6 100755
@@ -84,5 +84,4 @@ _sudo_qemu_io_wrapper --format "$IMGFMT" --nocache \
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/130 +0 -1
index e5986d59bb..ed234c3b6d 100755
@@ -90,5 +90,4 @@ _img_info | _filter_img_info
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/131 +0 -1
index 930a80e02f..9c12d6c7f9 100755
@@ -70,5 +70,4 @@ _check_test_img -r all
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/133 +0 -1
index 61af222c9e..61adc4374b 100755
@@ -83,5 +83,4 @@ $QEMU_IO -c 'reopen -o backing.driver=qcow2' $TEST_IMG
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/134 +0 -1
index 59f2662614..c1c45c66d6 100755
@@ -72,5 +72,4 @@ $QEMU_IO --object $SECRETALT -c "read -P 0xa 0 $size" --image-opts $IMGSPEC | _f
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/135 +0 -1
index a6d35c147a..5c41718490 100755
@@ -47,5 +47,4 @@ $QEMU_IMG info "$TEST_IMG" 2>&1| _filter_testdir
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/137 +0 -1
index 1c3981c982..1e6c6afcca 100755
@@ -138,5 +138,4 @@ $QEMU_IO \
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/138 +0 -1
index 4b21217038..cb98fc34b9 100755
@@ -66,5 +66,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/140 +0 -1
index bdc1e08027..63390fd896 100755
@@ -97,5 +97,4 @@ wait=1 _cleanup_qemu
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/141 +0 -1
index c5e3981530..996bf16963 100755
@@ -183,5 +183,4 @@ _cleanup_qemu
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/142 +0 -1
index 6a8d6d8daa..6cb73bc6fa 100755
@@ -352,5 +352,4 @@ echo "$hmp_cmds" | run_qemu -drive "$files","$ids" | grep "Cache"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/143 +0 -1
index 100d225e24..1ae5296607 100755
@@ -67,5 +67,4 @@ wait=1 _cleanup_qemu
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/144 +0 -1
index 65fcfb77a6..d6015ce0eb 100755
@@ -108,5 +108,4 @@ _send_qemu_cmd $h "{ 'execute': 'blockdev-snapshot-sync',
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/145 +0 -1
index 3fa205a07d..c81bbb8a20 100755
@@ -61,5 +61,4 @@ echo quit | $QEMU -nographic $SYSEMU_EXTRA_ARGS -drive $SYSEMU_DRIVE_ARG \
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/146 +0 -1
index 6b418c60f7..238658d642 100755
@@ -159,5 +159,4 @@ echo
 ${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c 'map'
 
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/150 +0 -1
index 51e4e124cd..6c5d54228b 100755
@@ -67,5 +67,4 @@ $QEMU_IMG map "$TEST_IMG" | _filter_qemu_img_map
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/153 +0 -1
index ae9158fa91..54f3ad8c79 100755
@@ -228,5 +228,4 @@ _cleanup_qemu
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/154 +0 -1
index 7bf0c2e91e..7b56d60339 100755
@@ -451,5 +451,4 @@ $QEMU_IMG map --output=json "$TEST_IMG" | _filter_qemu_img_map
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/156 +0 -1
index 62100fff7a..618060180c 100755
@@ -170,5 +170,4 @@ echo
 
 # success, all done
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/157 +0 -1
index 2b2b886e99..c44edd65e7 100755
@@ -94,5 +94,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/158 +0 -1
index fe3318bbe2..abf79f3cc2 100755
@@ -80,5 +80,4 @@ $QEMU_IO --object $SECRET -c "read -P 0xa 1024 64512" --image-opts $IMGSPEC | _f
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/162 +0 -1
index 6cadc0c75b..c601c13525 100755
@@ -110,5 +110,4 @@ rm -f 42
 # success, all done
 echo
 echo '*** done'
-rm -f $seq.full
 status=0
tests/qemu-iotests/171 +0 -1
index 3ea97f46b6..93b119939d 100755
@@ -206,5 +206,4 @@ _cleanup_test_img
 # success, all done
 echo
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/172 +0 -1
index 2fd80c7844..56376f0f37 100755
@@ -245,5 +245,4 @@ check_cache_mode -device floppy,drive=none0,write-cache=off
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/173 +0 -1
index 0df1865199..f5185a1945 100755
@@ -92,5 +92,4 @@ _cleanup_qemu
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/174 +7 -2
index 2c530a1e64..b1527583c7 100755
@@ -35,9 +35,15 @@ _cleanup()
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
+_fail()
+{
+    echo "$*"
+    status=1
+    exit 1
+}
+
 _unsupported_fmt raw
 
-
 size=256K
 IMGFMT=raw IMGKEYSECRET= IMGOPTS= _make_test_img $size | _filter_imgfmt
 
@@ -53,5 +59,4 @@ test $? -eq 1 || _fail "did not fail"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/175 +0 -1
index a000405737..b9703dd99c 100755
@@ -55,5 +55,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/176 +0 -1
index 9928833137..9f4a5db86a 100755
@@ -125,5 +125,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/178 +0 -1
index ffa3d3148b..4eba90243d 100755
@@ -164,5 +164,4 @@ done
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/181 +0 -1
index b308c8194f..cd90eb98c5 100755
@@ -128,5 +128,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/182 +0 -1
index c7cd4ff678..f7705b36f7 100755
@@ -71,5 +71,4 @@ _cleanup_qemu
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/183 +0 -1
index 764632c16b..ced0df4a76 100755
@@ -134,5 +134,4 @@ $QEMU_IMG compare "$TEST_IMG.dest" "$TEST_IMG"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/184 +0 -1
index 1b2859de5a..c5d0226a67 100755
@@ -200,5 +200,4 @@ EOF
 echo
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/185 +0 -1
index 563ae366fd..09ebe6b659 100755
@@ -204,5 +204,4 @@ _check_test_img
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/186 +0 -1
index 3d52508452..a87a7f81ff 100755
@@ -141,5 +141,4 @@ check_info_block -drive if=pflash,driver=null-co,size=1M
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/187 +0 -1
index 4351702784..4d304f91ca 100755
@@ -63,5 +63,4 @@ $QEMU_IO -c 'reopen -r' -c 'reopen -w' -c 'write 0 64k' $TEST_IMG | _filter_qemu
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/188 +0 -1
index 042bf96178..6e945ccf38 100755
@@ -70,5 +70,4 @@ $QEMU_IO --object $SECRETALT -c "read -P 0xa 0 $size" --image-opts $IMGSPEC | _f
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/189 +0 -1
index 9108495d99..5213057b14 100755
@@ -80,5 +80,4 @@ $QEMU_IO --object $SECRET0 --object $SECRET1 -c "read -P 0xa 1024 64512" --image
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/190 +0 -1
index aceba63b49..577bbb70f7 100755
@@ -53,5 +53,4 @@ $QEMU_IMG measure -O qcow2 -o cluster_size=2M -f qcow2 "$TEST_IMG"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/191 +0 -1
index 25d94211d9..0f740f7b38 100755
@@ -148,5 +148,4 @@ TEST_IMG="$TEST_IMG.ovl2" _img_info
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/192 +0 -1
index 37fbb71cd0..5d0af35816 100755
@@ -66,5 +66,4 @@ _send_qemu_cmd $h "q" "(qemu)"
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
tests/qemu-iotests/195 +0 -1
index 248cf90f53..ff6b1fde9d 100755
@@ -87,5 +87,4 @@ _img_info
 
 # success, all done
 echo "*** done"
-rm -f $seq.full
 status=0
Signature · 1 line
2.13.6
#19 lore raw

Re: [Qemu-devel] [PATCH 07/10] qemu-iotests: remove the concept of $seq.full (and boiler plate code)

Quoted 153 lines · Cleber Rosa

The $seq.full file, in theory, should contain the full output of a test error. In practice, it's only used on a single test, and the boiler plate code to clean it up plagues all other tests.

Let's remove the concept altogether, and record the failure in the output itself for the one test using this function.

---
 tests/qemu-iotests/001 | 1 -
 tests/qemu-iotests/002 | 1 -
 tests/qemu-iotests/003 | 1 -
 tests/qemu-iotests/004 | 1 -
 tests/qemu-iotests/005 | 1 -
 tests/qemu-iotests/007 | 1 -
 tests/qemu-iotests/008 | 1 -
 tests/qemu-iotests/009 | 1 -
 tests/qemu-iotests/010 | 1 -
 tests/qemu-iotests/011 | 1 -
 tests/qemu-iotests/012 | 1 -
 tests/qemu-iotests/013 | 1 -
 tests/qemu-iotests/014 | 1 -
 tests/qemu-iotests/015 | 1 -
 tests/qemu-iotests/017 | 1 -
 tests/qemu-iotests/018 | 1 -
 tests/qemu-iotests/019 | 1 -
 tests/qemu-iotests/020 | 1 -
 tests/qemu-iotests/021 | 1 -
 tests/qemu-iotests/022 | 1 -
 tests/qemu-iotests/023 | 1 -
 tests/qemu-iotests/024 | 1 -
 tests/qemu-iotests/025 | 1 -
 tests/qemu-iotests/026 | 1 -
 tests/qemu-iotests/027 | 1 -
 tests/qemu-iotests/028 | 1 -
 tests/qemu-iotests/029 | 1 -
 tests/qemu-iotests/031 | 1 -
 tests/qemu-iotests/032 | 1 -
 tests/qemu-iotests/033 | 1 -
 tests/qemu-iotests/034 | 1 -
 tests/qemu-iotests/035 | 1 -
 tests/qemu-iotests/036 | 1 -
 tests/qemu-iotests/037 | 1 -
 tests/qemu-iotests/038 | 1 -
 tests/qemu-iotests/039 | 1 -
 tests/qemu-iotests/042 | 1 -
 tests/qemu-iotests/043 | 1 -
 tests/qemu-iotests/046 | 1 -
 tests/qemu-iotests/047 | 1 -
 tests/qemu-iotests/049 | 1 -
 tests/qemu-iotests/050 | 1 -
 tests/qemu-iotests/051 | 1 -
 tests/qemu-iotests/052 | 1 -
 tests/qemu-iotests/053 | 1 -
 tests/qemu-iotests/054 | 1 -
 tests/qemu-iotests/058 | 1 -
 tests/qemu-iotests/059 | 1 -
 tests/qemu-iotests/060 | 1 -
 tests/qemu-iotests/061 | 1 -
 tests/qemu-iotests/062 | 1 -
 tests/qemu-iotests/063 | 1 -
 tests/qemu-iotests/064 | 1 -
 tests/qemu-iotests/066 | 1 -
 tests/qemu-iotests/067 | 1 -
 tests/qemu-iotests/068 | 1 -
 tests/qemu-iotests/069 | 1 -
 tests/qemu-iotests/070 | 1 -
 tests/qemu-iotests/071 | 1 -
 tests/qemu-iotests/072 | 1 -
 tests/qemu-iotests/073 | 1 -
 tests/qemu-iotests/075 | 1 -
 tests/qemu-iotests/076 | 1 -
 tests/qemu-iotests/077 | 1 -
 tests/qemu-iotests/078 | 1 -
 tests/qemu-iotests/079 | 1 -
 tests/qemu-iotests/080 | 1 -
 tests/qemu-iotests/081 | 1 -
 tests/qemu-iotests/082 | 1 -
 tests/qemu-iotests/083 | 1 -
 tests/qemu-iotests/084 | 1 -
 tests/qemu-iotests/085 | 1 -
 tests/qemu-iotests/086 | 1 -
 tests/qemu-iotests/087 | 1 -
 tests/qemu-iotests/088 | 1 -
 tests/qemu-iotests/089 | 1 -
 tests/qemu-iotests/090 | 1 -
 tests/qemu-iotests/091 | 1 -
 tests/qemu-iotests/092 | 1 -
 tests/qemu-iotests/094 | 1 -
 tests/qemu-iotests/095 | 1 -
 tests/qemu-iotests/097 | 1 -
 tests/qemu-iotests/098 | 1 -
 tests/qemu-iotests/099 | 1 -
 tests/qemu-iotests/101 | 1 -
 tests/qemu-iotests/102 | 1 -
 tests/qemu-iotests/103 | 1 -
 tests/qemu-iotests/104 | 1 -
 tests/qemu-iotests/105 | 1 -
 tests/qemu-iotests/106 | 1 -
 tests/qemu-iotests/107 | 1 -
 tests/qemu-iotests/108 | 1 -
 tests/qemu-iotests/109 | 1 -
 tests/qemu-iotests/110 | 1 -
 tests/qemu-iotests/111 | 1 -
 tests/qemu-iotests/112 | 1 -
 tests/qemu-iotests/113 | 1 -
 tests/qemu-iotests/114 | 1 -
 tests/qemu-iotests/115 | 1 -
 tests/qemu-iotests/116 | 1 -
 tests/qemu-iotests/117 | 1 -
 tests/qemu-iotests/119 | 1 -
 tests/qemu-iotests/120 | 1 -
 tests/qemu-iotests/121 | 1 -
 tests/qemu-iotests/122 | 1 -
 tests/qemu-iotests/123 | 1 -
 tests/qemu-iotests/125 | 1 -
 tests/qemu-iotests/126 | 1 -
 tests/qemu-iotests/127 | 1 -
 tests/qemu-iotests/128 | 1 -
 tests/qemu-iotests/130 | 1 -
 tests/qemu-iotests/131 | 1 -
 tests/qemu-iotests/133 | 1 -
 tests/qemu-iotests/134 | 1 -
 tests/qemu-iotests/135 | 1 -
 tests/qemu-iotests/137 | 1 -
 tests/qemu-iotests/138 | 1 -
 tests/qemu-iotests/140 | 1 -
 tests/qemu-iotests/141 | 1 -
 tests/qemu-iotests/142 | 1 -
 tests/qemu-iotests/143 | 1 -
 tests/qemu-iotests/144 | 1 -
 tests/qemu-iotests/145 | 1 -
 tests/qemu-iotests/146 | 1 -
 tests/qemu-iotests/150 | 1 -
 tests/qemu-iotests/153 | 1 -
 tests/qemu-iotests/154 | 1 -
 tests/qemu-iotests/156 | 1 -
 tests/qemu-iotests/157 | 1 -
 tests/qemu-iotests/158 | 1 -
 tests/qemu-iotests/162 | 1 -
 tests/qemu-iotests/171 | 1 -
 tests/qemu-iotests/172 | 1 -
 tests/qemu-iotests/173 | 1 -
 tests/qemu-iotests/174 | 9 +++++++--
 tests/qemu-iotests/175 | 1 -
 tests/qemu-iotests/176 | 1 -
 tests/qemu-iotests/178 | 1 -
 tests/qemu-iotests/181 | 1 -
 tests/qemu-iotests/182 | 1 -
 tests/qemu-iotests/183 | 1 -
 tests/qemu-iotests/184 | 1 -
 tests/qemu-iotests/185 | 1 -
 tests/qemu-iotests/186 | 1 -
Quoted 8 lines
 tests/qemu-iotests/187 | 1 -
 tests/qemu-iotests/188 | 1 -
 tests/qemu-iotests/189 | 1 -
 tests/qemu-iotests/190 | 1 -
 tests/qemu-iotests/191 | 1 -
 tests/qemu-iotests/192 | 1 -
 tests/qemu-iotests/195 | 1 -
 151 files changed, 7 insertions(+), 152 deletions(-)

Looks good, but I guess it would make sense to drop the _fail function from common.rc then, too.

Another thought: Seeing the status=1... I think besides the _fail thing, 174 is also the only test that makes use of $status. How about a patch that removes that variable and simply performs "exit 1" in the trap line? I think all tests just do an immediate "exit 1" on error anyway.

Max

#20 lore raw

PATCH 8/10 qemu-iotests: clean up double comment characters

In reply to Cleber Rosa

This is a syntactic only change, just to make it consistent with the style used on all other tests.

---
 tests/qemu-iotests/048 | 37 ++++++++++++++++++-------------------
 tests/qemu-iotests/074 | 40 ++++++++++++++++++++--------------------
 2 files changed, 38 insertions(+), 39 deletions(-)
tests/qemu-iotests/048 +18 -19
index 531bed217c..3253d77c91 100755
@@ -1,23 +1,22 @@
 #!/bin/bash
-##
-## qemu-img compare test
-##
-##
-## Copyright (C) 2013 Red Hat, Inc.
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-##
+#
+# qemu-img compare test
+#
+#
+# Copyright (C) 2013 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 # Creator/Owner: [email protected]
 #
tests/qemu-iotests/074 +20 -20
index d454580067..d09c909bd8 100755
@@ -1,24 +1,24 @@
 #!/bin/bash
-##
-## qemu-img compare test (qcow2 only ones)
-##
-##
-## Copyright (C) 2013 Red Hat, Inc.
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-##
-## Creator/Owner: [email protected]
+#
+# qemu-img compare test (qcow2 only ones)
+#
+#
+# Copyright (C) 2013 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Creator/Owner: [email protected]
 #
 
 seq=`basename $0`
Signature · 1 line
2.13.6
Reviewed-by on v1 8/10
#21 lore raw

Re: [Qemu-devel] [PATCH 08/10] qemu-iotests: clean up double comment characters

Quoted 8 lines · Cleber Rosa

This is a syntactic only change, just to make it consistent with the style used on all other tests.

---
 tests/qemu-iotests/048 | 37 ++++++++++++++++++-------------------
 tests/qemu-iotests/074 | 40 ++++++++++++++++++++--------------------
 2 files changed, 38 insertions(+), 39 deletions(-)
#22 lore raw

PATCH 9/10 qemu-iotests: remove unused "here" variable

In reply to Cleber Rosa

Another legacy variable that did not convince me it has any purpose whatsoever.

---
 tests/qemu-iotests/001 | 1 -
 tests/qemu-iotests/002 | 1 -
 tests/qemu-iotests/003 | 1 -
 tests/qemu-iotests/004 | 1 -
 tests/qemu-iotests/005 | 1 -
 tests/qemu-iotests/007 | 1 -
 tests/qemu-iotests/008 | 1 -
 tests/qemu-iotests/009 | 1 -
 tests/qemu-iotests/010 | 1 -
 tests/qemu-iotests/011 | 1 -
 tests/qemu-iotests/012 | 1 -
 tests/qemu-iotests/013 | 1 -
 tests/qemu-iotests/014 | 1 -
 tests/qemu-iotests/015 | 1 -
 tests/qemu-iotests/017 | 1 -
 tests/qemu-iotests/018 | 1 -
 tests/qemu-iotests/019 | 1 -
 tests/qemu-iotests/020 | 1 -
 tests/qemu-iotests/021 | 1 -
 tests/qemu-iotests/022 | 1 -
 tests/qemu-iotests/023 | 1 -
 tests/qemu-iotests/024 | 1 -
 tests/qemu-iotests/025 | 1 -
 tests/qemu-iotests/026 | 1 -
 tests/qemu-iotests/027 | 1 -
 tests/qemu-iotests/028 | 1 -
 tests/qemu-iotests/029 | 1 -
 tests/qemu-iotests/031 | 1 -
 tests/qemu-iotests/032 | 1 -
 tests/qemu-iotests/033 | 1 -
 tests/qemu-iotests/034 | 1 -
 tests/qemu-iotests/035 | 1 -
 tests/qemu-iotests/036 | 1 -
 tests/qemu-iotests/037 | 1 -
 tests/qemu-iotests/038 | 1 -
 tests/qemu-iotests/039 | 1 -
 tests/qemu-iotests/042 | 1 -
 tests/qemu-iotests/043 | 1 -
 tests/qemu-iotests/046 | 1 -
 tests/qemu-iotests/047 | 1 -
 tests/qemu-iotests/049 | 1 -
 tests/qemu-iotests/050 | 1 -
 tests/qemu-iotests/051 | 1 -
 tests/qemu-iotests/052 | 1 -
 tests/qemu-iotests/053 | 1 -
 tests/qemu-iotests/054 | 1 -
 tests/qemu-iotests/058 | 1 -
 tests/qemu-iotests/059 | 1 -
 tests/qemu-iotests/060 | 1 -
 tests/qemu-iotests/061 | 1 -
 tests/qemu-iotests/062 | 1 -
 tests/qemu-iotests/063 | 1 -
 tests/qemu-iotests/064 | 1 -
 tests/qemu-iotests/066 | 1 -
 tests/qemu-iotests/067 | 1 -
 tests/qemu-iotests/068 | 1 -
 tests/qemu-iotests/069 | 1 -
 tests/qemu-iotests/070 | 1 -
 tests/qemu-iotests/071 | 1 -
 tests/qemu-iotests/072 | 1 -
 tests/qemu-iotests/073 | 1 -
 tests/qemu-iotests/075 | 1 -
 tests/qemu-iotests/076 | 1 -
 tests/qemu-iotests/077 | 1 -
 tests/qemu-iotests/078 | 1 -
 tests/qemu-iotests/079 | 1 -
 tests/qemu-iotests/080 | 1 -
 tests/qemu-iotests/081 | 1 -
 tests/qemu-iotests/082 | 1 -
 tests/qemu-iotests/083 | 1 -
 tests/qemu-iotests/084 | 1 -
 tests/qemu-iotests/085 | 1 -
 tests/qemu-iotests/086 | 1 -
 tests/qemu-iotests/087 | 1 -
 tests/qemu-iotests/088 | 1 -
 tests/qemu-iotests/089 | 1 -
 tests/qemu-iotests/090 | 1 -
 tests/qemu-iotests/091 | 1 -
 tests/qemu-iotests/092 | 1 -
 tests/qemu-iotests/094 | 1 -
 tests/qemu-iotests/095 | 1 -
 tests/qemu-iotests/097 | 1 -
 tests/qemu-iotests/098 | 1 -
 tests/qemu-iotests/099 | 1 -
 tests/qemu-iotests/101 | 1 -
 tests/qemu-iotests/102 | 1 -
 tests/qemu-iotests/103 | 1 -
 tests/qemu-iotests/104 | 1 -
 tests/qemu-iotests/105 | 1 -
 tests/qemu-iotests/106 | 1 -
 tests/qemu-iotests/107 | 1 -
 tests/qemu-iotests/108 | 1 -
 tests/qemu-iotests/109 | 1 -
 tests/qemu-iotests/110 | 1 -
 tests/qemu-iotests/111 | 1 -
 tests/qemu-iotests/112 | 1 -
 tests/qemu-iotests/113 | 1 -
 tests/qemu-iotests/114 | 1 -
 tests/qemu-iotests/115 | 1 -
 tests/qemu-iotests/116 | 1 -
 tests/qemu-iotests/117 | 1 -
 tests/qemu-iotests/119 | 1 -
 tests/qemu-iotests/120 | 1 -
 tests/qemu-iotests/121 | 1 -
 tests/qemu-iotests/122 | 1 -
 tests/qemu-iotests/123 | 1 -
 tests/qemu-iotests/125 | 1 -
 tests/qemu-iotests/126 | 1 -
 tests/qemu-iotests/127 | 1 -
 tests/qemu-iotests/128 | 1 -
 tests/qemu-iotests/130 | 1 -
 tests/qemu-iotests/131 | 1 -
 tests/qemu-iotests/133 | 1 -
 tests/qemu-iotests/134 | 1 -
 tests/qemu-iotests/135 | 1 -
 tests/qemu-iotests/137 | 1 -
 tests/qemu-iotests/138 | 1 -
 tests/qemu-iotests/140 | 1 -
 tests/qemu-iotests/141 | 1 -
 tests/qemu-iotests/142 | 1 -
 tests/qemu-iotests/143 | 1 -
 tests/qemu-iotests/144 | 1 -
 tests/qemu-iotests/145 | 1 -
 tests/qemu-iotests/146 | 1 -
 tests/qemu-iotests/150 | 1 -
 tests/qemu-iotests/153 | 1 -
 tests/qemu-iotests/154 | 1 -
 tests/qemu-iotests/156 | 1 -
 tests/qemu-iotests/157 | 1 -
 tests/qemu-iotests/158 | 1 -
 tests/qemu-iotests/159 | 1 -
 tests/qemu-iotests/160 | 1 -
 tests/qemu-iotests/162 | 1 -
 tests/qemu-iotests/170 | 1 -
 tests/qemu-iotests/171 | 1 -
 tests/qemu-iotests/172 | 1 -
 tests/qemu-iotests/173 | 1 -
 tests/qemu-iotests/174 | 1 -
 tests/qemu-iotests/175 | 1 -
 tests/qemu-iotests/176 | 1 -
 tests/qemu-iotests/177 | 1 -
 tests/qemu-iotests/178 | 1 -
 tests/qemu-iotests/179 | 1 -
 tests/qemu-iotests/181 | 1 -
 tests/qemu-iotests/182 | 1 -
 tests/qemu-iotests/183 | 1 -
 tests/qemu-iotests/184 | 1 -
 tests/qemu-iotests/185 | 1 -
 tests/qemu-iotests/186 | 1 -
 tests/qemu-iotests/187 | 1 -
 tests/qemu-iotests/188 | 1 -
 tests/qemu-iotests/189 | 1 -
 tests/qemu-iotests/190 | 1 -
 tests/qemu-iotests/191 | 1 -
 tests/qemu-iotests/192 | 1 -
 tests/qemu-iotests/195 | 1 -
 tests/qemu-iotests/197 | 1 -
 157 files changed, 157 deletions(-)
tests/qemu-iotests/001 +0 -1
index 5830f68ba0..ce671e50e7 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/002 +0 -1
index 7dd1774464..8f57a41953 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/003 +0 -1
index 13cc8041a3..102ff9cab9 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/004 +0 -1
index 710148c2bb..8ddae7fea4 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/005 +0 -1
index d2c6575992..6caf5b0241 100755
@@ -26,7 +26,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/007 +0 -1
index 3fe2fe5dad..fc4458e11d 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/008 +0 -1
index f021b8ea3a..7b891629db 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/009 +0 -1
index 8d56673bc6..6a2498f4ab 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/010 +0 -1
index 3f91224795..447914da1a 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/011 +0 -1
index 921f43c03d..d758d7a577 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/012 +0 -1
index 3121f947f6..a4a7303a9a 100755
@@ -25,7 +25,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/013 +0 -1
index 095c2a0cd6..1db4649541 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/014 +0 -1
index c28970732b..b679750ba6 100755
@@ -25,7 +25,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/015 +0 -1
index a5cda4742c..3ea0e5472d 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/017 +0 -1
index 2398fc2bf1..fb4974cd87 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/018 +0 -1
index 8d4ccda85e..06139efa64 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/019 +0 -1
index b06ef93976..ddf5f7f7f3 100755
@@ -25,7 +25,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/020 +0 -1
index b34cfc16e1..d26ef8df86 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/021 +0 -1
index 97e27d6cf3..1b6dfe0fc1 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/022 +0 -1
index bc9186c0fa..77a7516be2 100755
@@ -25,7 +25,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/023 +0 -1
index 99fda1ff14..eaa73ac866 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/024 +0 -1
index b3cabe1fb5..ce661cc5a3 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/025 +0 -1
index a781632b09..93814d5931 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/026 +0 -1
index 166c8267f7..7d8c07b240 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/027 +0 -1
index c9416c719f..a7349c178b 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/028 +0 -1
index f2991a28aa..85deaf2dad 100755
@@ -26,7 +26,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/029 +0 -1
index fee694f305..07df4b2959 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/031 +0 -1
index da44539b0f..21f8eae2a7 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/032 +0 -1
index 15a0ff6298..e4b62e6deb 100755
@@ -25,7 +25,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/033 +0 -1
index d4beecc9c0..2eca619837 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/034 +0 -1
index c0eb87b40a..90b49c2cde 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/035 +0 -1
index 04c4cf0f58..d174ae3c51 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/036 +0 -1
index 990b9d82b6..858caa889a 100755
@@ -26,7 +26,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/037 +0 -1
index c4d55babe2..ed57e5a2ed 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/038 +0 -1
index b35c30fa17..9266fbbb57 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/039 +0 -1
index 99a33df803..f57d931b5b 100755
@@ -26,7 +26,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/042 +0 -1
index 7fafb6a436..24b9c20749 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/043 +0 -1
index 0ce07adfd0..fee664cbfd 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/046 +0 -1
index c3c16ebd3d..9f7e4df3af 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/047 +0 -1
index ebbb36c349..e8ca27e3c8 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/049 +0 -1
index 984652cd97..8b235cec7f 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/050 +0 -1
index f290c68498..6131cc816a 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/051 +0 -1
index b6903d13c4..b5f1b34579 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/052 +0 -1
index 33c3e55713..2c423d7d34 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/053 +0 -1
index a84dde31e0..32c75472ae 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/054 +0 -1
index 0fc2a8faa6..d3b7f6a727 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/058 +0 -1
index 74118b93d3..01a47c6a9e 100755
@@ -25,7 +25,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/059 +0 -1
index fe16e9442d..2aa0a9eb83 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/060 +0 -1
index 98a946f99c..bcfa33db38 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/061 +0 -1
index 2c6da49646..03d1e5f435 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/062 +0 -1
index 3f97c7d6da..8ef0b9d923 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/063 +0 -1
index 9b8660e021..aeb247f3a7 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/064 +0 -1
index 40954b36d7..50214bb2c5 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/066 +0 -1
index 556b42bfe6..557a39f357 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/067 +0 -1
index b7a6ef2097..4a0f16c5bd 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/068 +0 -1
index 162cd26005..9f9fc4cb48 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/069 +0 -1
index 1f3baeea13..df3e2b0ae0 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/070 +0 -1
index 684742893c..915c02ecba 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/071 +0 -1
index 7b1fdf7989..865930d7b3 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/072 +0 -1
index 5d4e8becac..43cbeaf526 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/073 +0 -1
index f5be7347d1..d9819b6aa5 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/075 +0 -1
index b924d7a5f7..5d211b6eb3 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/076 +0 -1
index 64b935ad02..ddf3cf0a64 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/077 +0 -1
index 897afb688d..375872deed 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/078 +0 -1
index 36490ec94c..f9f53772d0 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/079 +0 -1
index d8a2a17e71..35bfab1ad7 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/080 +0 -1
index aa7b13776a..67998b6073 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/081 +0 -1
index d840841b0d..9ee474d0a7 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/082 +0 -1
index 4f1c03b882..e0f05fe236 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/083 +0 -1
index 39162b36ef..b2d6462526 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/084 +0 -1
index 3daf41615b..9b85dda50c 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/085 +0 -1
index 375a51e07a..adea26a781 100755
@@ -28,7 +28,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 snapshot_virt0="snapshot-v0.qcow2"
tests/qemu-iotests/086 +0 -1
index 1224e068b7..dda1bc9d07 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/087 +0 -1
index fb572dc5b8..1ee9b429c1 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/088 +0 -1
index 75e6ba9908..4bbcf47495 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/089 +0 -1
index dad9fcb69f..455e923440 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/090 +0 -1
index 74e14e9f00..959ed64083 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/091 +0 -1
index bb32f681bb..d6dd52fe52 100755
@@ -25,7 +25,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1    # failure is the default!
 
 MIG_FIFO="${TEST_DIR}/migrate"
tests/qemu-iotests/092 +0 -1
index 041d888984..2bf3c69a5f 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/094 +0 -1
index 47ff00651f..2869c26bd9 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/095 +0 -1
index bc80c019ed..41d24f9e5b 100755
@@ -27,7 +27,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/097 +0 -1
index 2a68a08358..8fce38e2ef 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/098 +0 -1
index afe5b72c87..14164dc83f 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/099 +0 -1
index ac94ca7f21..a36fe154da 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/101 +0 -1
index cc57078727..8520c771af 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/102 +0 -1
index 9acc2772c7..9676ce5529 100755
@@ -23,7 +23,6 @@
 seq=$(basename $0)
 echo "QA output created by $seq"
 
-here=$PWD
 status=1    # failure is the default!
 
 # get standard environment, filters and qemu instance handling
tests/qemu-iotests/103 +0 -1
index eaab111b5a..dbff3800b7 100755
@@ -23,7 +23,6 @@
 seq=$(basename $0)
 echo "QA output created by $seq"
 
-here=$PWD
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/104 +0 -1
index 5818b449da..f0a09daf46 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 trap "exit \$status" 0 1 2 3 15
tests/qemu-iotests/105 +0 -1
index e975f2930e..ef9ad60acf 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/106 +0 -1
index ee81af19da..9aef55962a 100755
@@ -23,7 +23,6 @@
 seq=$(basename $0)
 echo "QA output created by $seq"
 
-here=$PWD
 status=1	# failure is the default!
 
 # get standard environment and filters
tests/qemu-iotests/107 +0 -1
index 87e2a22cec..baddfa9d3d 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/108 +0 -1
index 31ea282f20..c5bad010c1 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/109 +0 -1
index e011ad86c3..b96be288c0 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/110 +0 -1
index e596efddb5..211b7a40eb 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/111 +0 -1
index 37223d93d7..2da9ba57cf 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/112 +0 -1
index 221892fbd1..72e35b3803 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/113 +0 -1
index 9d48020b94..2567ba4596 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/114 +0 -1
index 44ef79a87f..a1cb2ec2c8 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/115 +0 -1
index f2ec8fbd44..54c657a424 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/116 +0 -1
index 715a44200f..8d13d2443e 100755
@@ -26,7 +26,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/117 +0 -1
index 07aca0eba1..c725b1d710 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/119 +0 -1
index dbc7350458..3a0120872c 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/120 +0 -1
index 3816260951..70efb29a2c 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/121 +0 -1
index 04b38c9de8..103c5170ca 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/122 +0 -1
index ea4ba0f098..27f5cc0977 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/123 +0 -1
index 6701c7ab54..1755300a12 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/125 +0 -1
index 6a0504ba0a..45b0b109e0 100755
@@ -23,7 +23,6 @@
 seq=$(basename $0)
 echo "QA output created by $seq"
 
-here=$PWD
 status=1	# failure is the default!
 
 # get standard environment and filters
tests/qemu-iotests/126 +0 -1
index 882ace0191..497a8f1d8f 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/127 +0 -1
index e84f0d80f6..d9366d37b1 100755
@@ -23,7 +23,6 @@
 seq=$(basename $0)
 echo "QA output created by $seq"
 
-here=$PWD
 status=1    # failure is the default!
 
 # get standard environment, filters and qemu instance handling
tests/qemu-iotests/128 +0 -1
index 51009f18f6..9529df3dfd 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 devname="eiodev$$"
tests/qemu-iotests/130 +0 -1
index ed234c3b6d..f507a7ed7f 100755
@@ -25,7 +25,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/131 +0 -1
index 9c12d6c7f9..c809d3f8aa 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/133 +0 -1
index 61adc4374b..0f1dd4e5b3 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/134 +0 -1
index c1c45c66d6..57c5fdbab1 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/135 +0 -1
index 5c41718490..86f8aefa2a 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/137 +0 -1
index 1e6c6afcca..93f5c7ebaf 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/138 +0 -1
index cb98fc34b9..c5a0c85e94 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/140 +0 -1
index 63390fd896..55969e80f9 100755
@@ -27,7 +27,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/141 +0 -1
index 996bf16963..db79f457a7 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/142 +0 -1
index 6cb73bc6fa..93fd649a14 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/143 +0 -1
index 1ae5296607..727c703182 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/144 +0 -1
index d6015ce0eb..fc3e044012 100755
@@ -25,7 +25,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 TMP_SNAP1=${TEST_DIR}/tmp.qcow2
tests/qemu-iotests/145 +0 -1
index c81bbb8a20..3806f0e6be 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/146 +0 -1
index 238658d642..5276a31cc3 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1    # failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/150 +0 -1
index 6c5d54228b..65c32cf73b 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/153 +0 -1
index 54f3ad8c79..2a7bdad8c5 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 tmp=/tmp/$$
 status=1	# failure is the default!
 
tests/qemu-iotests/154 +0 -1
index 7b56d60339..b536c49887 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/156 +0 -1
index 618060180c..1fc4eab021 100755
@@ -31,7 +31,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/157 +0 -1
index c44edd65e7..cdc96e9746 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/158 +0 -1
index abf79f3cc2..08db8c95c0 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/159 +0 -1
index 799ff57040..d6fb17da2e 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1
 
 . ./common.rc
tests/qemu-iotests/160 +0 -1
index 41ffad5774..4a16bfb0bb 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1
 
 . ./common.rc
tests/qemu-iotests/162 +0 -1
index c601c13525..b435024c70 100755
@@ -24,7 +24,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 _cleanup()
tests/qemu-iotests/170 +0 -1
index 736c61f8e9..b76473f3b9 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1
 
 . ./common.rc
tests/qemu-iotests/171 +0 -1
index 93b119939d..e5c83af2e6 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/172 +0 -1
index 56376f0f37..0133691f9b 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/173 +0 -1
index f5185a1945..8214b3b999 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1    # failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/174 +0 -1
index b1527583c7..504efe318b 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/175 +0 -1
index b9703dd99c..298cc6465a 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/176 +0 -1
index 9f4a5db86a..273ed2c12f 100755
@@ -27,7 +27,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/177 +0 -1
index 2c0c70ec6d..d3216cd5fb 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/178 +0 -1
index 4eba90243d..3dbb15fd77 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1    # failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/179 +0 -1
index ccede3bc04..50d1c35380 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/181 +0 -1
index cd90eb98c5..e8f19ac868 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 MIG_SOCKET="${TEST_DIR}/migrate"
tests/qemu-iotests/182 +0 -1
index f7705b36f7..17396c0816 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 tmp=/tmp/$$
 status=1	# failure is the default!
 
tests/qemu-iotests/183 +0 -1
index ced0df4a76..bb7c5b7093 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1 # failure is the default!
 
 MIG_SOCKET="${TEST_DIR}/migrate"
tests/qemu-iotests/184 +0 -1
index c5d0226a67..93f19df963 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/185 +0 -1
index 09ebe6b659..2ebca91503 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1 # failure is the default!
 
 MIG_SOCKET="${TEST_DIR}/migrate"
tests/qemu-iotests/186 +0 -1
index a87a7f81ff..f25548b9bf 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/187 +0 -1
index 4d304f91ca..158f650f7c 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/188 +0 -1
index 6e945ccf38..ddcbecadc0 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/189 +0 -1
index 5213057b14..cefa774818 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/190 +0 -1
index 577bbb70f7..4f0b6711a2 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1    # failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/191 +0 -1
index 0f740f7b38..0337bedd00 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1 # failure is the default!
 
 MIG_SOCKET="${TEST_DIR}/migrate"
tests/qemu-iotests/192 +0 -1
index 5d0af35816..d6209c9d92 100755
@@ -24,7 +24,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1	# failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/195 +0 -1
index ff6b1fde9d..fe88617eed 100755
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`
 status=1 # failure is the default!
 
 # get standard environment, filters and checks
tests/qemu-iotests/197 +0 -1
index 9fb4a694a1..9e7c6cf339 100755
@@ -23,7 +23,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1 # failure is the default!
 
 # get standard environment, filters and checks
Signature · 1 line
2.13.6
Reviewed-by on v1 9/10
#23 lore raw

Re: [Qemu-devel] [PATCH 09/10] qemu-iotests: remove unused "here" variable

tests/qemu-iotests/001 line 26

Quoted 12 lines · Cleber Rosa

Another legacy variable that did not convince me it has any purpose whatsoever.

---

+++ b/tests/qemu-iotests/001

tests/qemu-iotests/001 +0 -1
@@ -23,7 +23,6 @@
 seq=`basename $0`
 echo "QA output created by $seq"
 
-here=`pwd`

Good riddance. And in the majority of the tests, it was a needless fork(), compared to my preference (which is also guaranteed by POSIX and by /bin/bash):

tests/qemu-iotests/060 line 30

Quoted 6 lines
tests/qemu-iotests/060 +1 -1
+++ b/tests/qemu-iotests/176
@@ -27,7 +27,6 @@
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"

since $PWD and pwd should always produce the same thing, if we even had a reason to use it. ;)

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#25 lore raw

PATCH 10/10 qemu-iotests: add section on how to write a new I/O test

In reply to Cleber Rosa

This adds some basic information on how to write a new test. I'm aware that some of the information in the wiki (Testing/QemuIoTests) could also belong here.

Since copying content over won't generate much interesting feedback, the goal here is to get feedback on the sample_test_templates, general workflow proposed for writing a new test, etc.

After feedback is received, I can go over and sync both sides (wiki and README).

---
 tests/qemu-iotests/README                          | 44 ++++++++++++++--
 tests/qemu-iotests/sample_test_templates/sample.py | 59 ++++++++++++++++++++++
 tests/qemu-iotests/sample_test_templates/sample.sh | 40 +++++++++++++++
 3 files changed, 138 insertions(+), 5 deletions(-)
 create mode 100755 tests/qemu-iotests/sample_test_templates/sample.py
 create mode 100755 tests/qemu-iotests/sample_test_templates/sample.sh
tests/qemu-iotests/README +39 -5
index 6079b401ae..efaf72d5e7 100644
@@ -1,20 +1,54 @@
+= This is the QEMU I/O test suite =
 
-=== This is the QEMU I/O test suite ===
-
-* Intro
+== Intro ==
 
 This package contains a simple test suite for the I/O layer of qemu.
 It does not require a guest, but only the qemu, qemu-img and qemu-io
 binaries.  This does limit it to exercise the low-level I/O path only
 but no actual block drivers like ide, scsi or virtio.
 
-* Usage
+== Usage ==
 
 Just run ./check to run all tests for the raw image format, or ./check
 -qcow2 to test the qcow2 image format.  The output of ./check -h explains
 additional options to test further image formats or I/O methods.
 
-* Feedback and patches
+== Writing a QEMU I/O test ==
+
+It's a common practice to start with an existing test that may relate
+to the task you have.  QEMU I/O tests are usually written either in
+shell or Python, so it's also a good idea to pick an existing test
+based on your familiarity with those languages and/or what you
+anticipate about your test.
+
+You can find templates available at "sample_test_templates/", or you
+can start with an existing test, such as 001 (shell based) or 030
+(Python based).
+
+After you pick your template, name it as a three-digits file, starting
+with the next available one.  If `ls -1 ??? | sort -rn | head -1` gives
+you "197", name your test "198".  Finally, add an entry to the "group"
+file, which manages just that, test group classification, allowing a
+user to run all "quick" tests, for instance.
+
+=== Test configuration, expected results and reporting ===
+
+The tests are (mostly) standard executable files, that are executed by
+"./check" as such.  Tests get most of their configuration (directly or
+indirectly) by environment variables.  Some of the framework auxiliary
+code (for instance, "common.rc") defines or changes some of the
+environment variables.  You'll come across tests that reference
+"$TEST_IMG", "$QEMU_IO" and other variables.
+
+The expected results for a test are stored in a file named after the
+(sequential) test number.  For test 001, the expected output (stdout +
+stderr) is stored at 001.out.
+
+Tests that finish successfully should exit with status code 0.  To be
+considered a successful run, a test must also produce output that
+matches what is recorded in the expected output file (say, 001.out).
+
+== Feedback and patches ==
 
 Please send improvements to the test suite, general feedback or just
 reports of failing tests cases to [email protected] with a CC:
tests/qemu-iotests/sample_test_templates/sample.py new file +59 -0

59 lines not on this page · raw message

tests/qemu-iotests/sample_test_templates/sample.sh new file +40 -0
new file mode 100755
index 0000000000..d50e228efc
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# DESCRIPTION HERE, such as "Test a complex thing using a simple thing"
+#
+# COPYRIGHT NOTICE HERE, such as "Copyright (C) YYYY Yourself, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Creator/Owner: [email protected]
+#
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+status=1	# failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+
+# describe supported environment, and then remove this line.
+ _supported_fmt generic
+ _supported_proto generic
+ _supported_os Linux
+
+# put your test code goes here, and then remove this line.
+
+# success, all done
+echo "*** done"
+status=0
Signature · 1 line
2.13.6
#26 lore raw

Re: [Qemu-devel] [PATCH 10/10] qemu-iotests: add section on how to write a new I/O test

Quoted 11 lines · Cleber Rosa

This adds some basic information on how to write a new test. I'm aware that some of the information in the wiki (Testing/QemuIoTests) could also belong here.

Since copying content over won't generate much interesting feedback, the goal here is to get feedback on the sample_test_templates, general workflow proposed for writing a new test, etc.

After feedback is received, I can go over and sync both sides (wiki and README).

Quoted 8 lines
---
 tests/qemu-iotests/README                          | 44 ++++++++++++++--
 tests/qemu-iotests/sample_test_templates/sample.py | 59 ++++++++++++++++++++++
 tests/qemu-iotests/sample_test_templates/sample.sh | 40 +++++++++++++++
 3 files changed, 138 insertions(+), 5 deletions(-)
 create mode 100755 tests/qemu-iotests/sample_test_templates/sample.py
 create mode 100755 tests/qemu-iotests/sample_test_templates/sample.sh

Thanks a lot!

Quoted 26 lines
tests/qemu-iotests/README +4 -5
index 6079b401ae..efaf72d5e7 100644
@@ -1,20 +1,54 @@
+= This is the QEMU I/O test suite =
 
-=== This is the QEMU I/O test suite ===
-
-* Intro
+== Intro ==
 
 This package contains a simple test suite for the I/O layer of qemu.
 It does not require a guest, but only the qemu, qemu-img and qemu-io
 binaries.  This does limit it to exercise the low-level I/O path only
 but no actual block drivers like ide, scsi or virtio.
 
-* Usage
+== Usage ==
 
 Just run ./check to run all tests for the raw image format, or ./check
 -qcow2 to test the qcow2 image format.  The output of ./check -h explains
 additional options to test further image formats or I/O methods.
 
-* Feedback and patches
+== Writing a QEMU I/O test ==

tests/qemu-iotests/README line 26

Quoted 10 lines
tests/qemu-iotests/README +10 -0
+
+It's a common practice to start with an existing test that may relate
+to the task you have.  QEMU I/O tests are usually written either in
+shell or Python, so it's also a good idea to pick an existing test
+based on your familiarity with those languages and/or what you
+anticipate about your test.
+
+You can find templates available at "sample_test_templates/", or you
+can start with an existing test, such as 001 (shell based) or 030
+(Python based).

It might make sense to mention 194 as an alternative, because 030 represents QMPTestCase-based Python tests and 194 is a plain output-comparison-based test (like the shell tests) which does not use that framework.

It should probably be noted somewhere that the shebang line for Python tests is vital to be exactly "#!/usr/bin/env python".

(Or we could change it to something like "#!qemu-python" to make it clear that we're not actually invoking env)

tests/qemu-iotests/README line 32

Quoted 6 lines
tests/qemu-iotests/README +6 -0
+
+After you pick your template, name it as a three-digits file, starting
+with the next available one.  If `ls -1 ??? | sort -rn | head -1` gives
+you "197", name your test "198".  Finally, add an entry to the "group"
+file, which manages just that, test group classification, allowing a
+user to run all "quick" tests, for instance.

We really need some overview over which groups we have...

I personally just see "Oh, they all have rw auto, so I should put my test into those groups, too" but that completely defies the purpose. And nobody ever complains about group classification for a newly added patch, except when it comes to the quick group...

tests/qemu-iotests/README line 45

Quoted 13 lines
tests/qemu-iotests/README +13 -0
+
+=== Test configuration, expected results and reporting ===
+
+The tests are (mostly) standard executable files, that are executed by
+"./check" as such.  Tests get most of their configuration (directly or
+indirectly) by environment variables.  Some of the framework auxiliary
+code (for instance, "common.rc") defines or changes some of the
+environment variables.  You'll come across tests that reference
+"$TEST_IMG", "$QEMU_IO" and other variables.
+
+The expected results for a test are stored in a file named after the
+(sequential) test number.  For test 001, the expected output (stdout +
+stderr) is stored at 001.out.

There is more that could be said about this (see 051.pc.out or 178.out.qcow2), but this should be enough for this document. If you ever need different reference outputs based on something, you'll probably be able to find out yourself.

tests/qemu-iotests/README line 47

Quoted 2 lines
tests/qemu-iotests/README +2 -0
+
+Tests that finish successfully should exit with status code 0.  To be

s/should/must/ (or "have to")

Quoted 24 lines
tests/qemu-iotests/README +4 -0
+considered a successful run, a test must also produce output that
+matches what is recorded in the expected output file (say, 001.out).
+
+== Feedback and patches ==
 
 Please send improvements to the test suite, general feedback or just
 reports of failing tests cases to [email protected] with a CC:
tests/qemu-iotests/sample_test_templates/sample.py new file +11 -0
new file mode 100755
index 0000000000..35a7410b5c
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+#
+# DESCRIPTION HERE, such as "Test a complex thing using a simple thing"
+#
+# COPYRIGHT NOTICE HERE, such as "Copyright (C) YYYY Yourself, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#

tests/qemu-iotests/sample_test_templates/sample.py line 21

Quoted 10 lines
tests/qemu-iotests/sample_test_templates/sample.py new file +10 -0
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Creator/Owner: [email protected]
+#

As said by the others, I'm not sure we need this line. git log should be enough to tell you to whom should send your patch emails for a broken test. :-)

Quoted 28 lines
tests/qemu-iotests/sample_test_templates/sample.py new file +28 -0
+
+import iotests
+
+
+class Sample(iotests.QMPTestCase):
+
+    def setUp(self):
+        """
+        Method that runs before test method(s).  Use it to prepare the
+        environment that is common to the all tests, but doesn't
+        necessarily mean that is part of the feature testing
+        specifics.
+
+        Remove this docstring unless you have a really good use for it.
+        """
+        pass
+
+    def tearDown(self):
+        """
+        Method that runs after the test method(s).  Use it to clean up
+        the environment created previously in setUp().
+
+        Remove this docstring unless you have a really good use for it.
+        """
+        pass
+
+    def test(self):
+        """

tests/qemu-iotests/sample_test_templates/sample.py line 59

Quoted 10 lines
tests/qemu-iotests/sample_test_templates/sample.py new file +10 -0
+        Test code goes here, or in any other method whose name starts
+        with "test".
+
+        It's a good idea to describe what it's about.
+        """
+        pass
+
+
+if __name__ == '__main__':
+    iotests.main()

This is a QMPTestCase-based Python test. That's OK, but I'd really like 194-like tests to gain popularity, so it should be noted somewhere (e.g. in the README and/or above the Sample class definition here) that you don't have to follow this structure, but that you can write simple reference-output-based tests as well.

Quoted 19 lines
tests/qemu-iotests/sample_test_templates/sample.sh new file +13 -0
new file mode 100755
index 0000000000..d50e228efc
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# DESCRIPTION HERE, such as "Test a complex thing using a simple thing"
+#
+# COPYRIGHT NOTICE HERE, such as "Copyright (C) YYYY Yourself, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of

tests/qemu-iotests/sample_test_templates/sample.sh line 23

Quoted 10 lines
tests/qemu-iotests/sample_test_templates/sample.sh new file +10 -0
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Creator/Owner: [email protected]
+#
+
+seq=`basename $0`

I remember Eric scolded me because he preferred seq="$(basename $0)" instead.

tests/qemu-iotests/sample_test_templates/sample.sh line 26

Quoted 3 lines
tests/qemu-iotests/sample_test_templates/sample.sh new file +3 -0
+echo "QA output created by $seq"
+
+status=1	# failure is the default!

Then again, why do we have these four lines anyway?

The echo is pretty pointless, nobody but it uses $seq, nor does anyone really need $status, do they?

tests/qemu-iotests/sample_test_templates/sample.sh line 30

Quoted 4 lines
tests/qemu-iotests/sample_test_templates/sample.sh new file +4 -0
+
+# get standard environment, filters and checks
+. ./common.rc
+

What about the cleanup function? I think every shell test has it and it does make sense to me.

tests/qemu-iotests/sample_test_templates/sample.sh line 40

Quoted 11 lines
tests/qemu-iotests/sample_test_templates/sample.sh new file +10 -0
+# describe supported environment, and then remove this line.
+ _supported_fmt generic
+ _supported_proto generic
+ _supported_os Linux
+
+# put your test code goes here, and then remove this line.
+
+# success, all done
+echo "*** done"
+status=0

I don't think we really need these three lines either... (in no test)

Max