Browse Source

iotests: Use _rm_test_img for deleting test images

Just rm will not delete external data files.  Use _rm_test_img every
time we delete a test image.

(In the process, clean up the indentation of every _cleanup() this patch
touches.)

((Also, use quotes consistently.  I am happy to see unquoted instances
like "rm -rf $TEST_DIR/..." go.))

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-id: 20191107163708.833192-16-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
pull/89/head
Max Reitz 6 years ago
parent
commit
f91ecbd74e
  1. 6
      tests/qemu-iotests/019
  2. 6
      tests/qemu-iotests/020
  3. 10
      tests/qemu-iotests/024
  4. 2
      tests/qemu-iotests/028
  5. 2
      tests/qemu-iotests/029
  6. 4
      tests/qemu-iotests/043
  7. 2
      tests/qemu-iotests/048
  8. 4
      tests/qemu-iotests/050
  9. 4
      tests/qemu-iotests/053
  10. 2
      tests/qemu-iotests/058
  11. 2
      tests/qemu-iotests/059
  12. 2
      tests/qemu-iotests/061
  13. 6
      tests/qemu-iotests/063
  14. 2
      tests/qemu-iotests/069
  15. 2
      tests/qemu-iotests/074
  16. 2
      tests/qemu-iotests/080
  17. 6
      tests/qemu-iotests/081
  18. 9
      tests/qemu-iotests/085
  19. 2
      tests/qemu-iotests/088
  20. 2
      tests/qemu-iotests/092
  21. 2
      tests/qemu-iotests/094
  22. 5
      tests/qemu-iotests/095
  23. 7
      tests/qemu-iotests/099
  24. 4
      tests/qemu-iotests/109
  25. 4
      tests/qemu-iotests/110
  26. 6
      tests/qemu-iotests/122
  27. 2
      tests/qemu-iotests/123
  28. 4
      tests/qemu-iotests/141
  29. 2
      tests/qemu-iotests/142
  30. 4
      tests/qemu-iotests/144
  31. 10
      tests/qemu-iotests/153
  32. 8
      tests/qemu-iotests/156
  33. 2
      tests/qemu-iotests/159
  34. 3
      tests/qemu-iotests/160
  35. 4
      tests/qemu-iotests/161
  36. 2
      tests/qemu-iotests/170
  37. 6
      tests/qemu-iotests/172
  38. 3
      tests/qemu-iotests/173
  39. 2
      tests/qemu-iotests/178
  40. 2
      tests/qemu-iotests/182
  41. 2
      tests/qemu-iotests/183
  42. 4
      tests/qemu-iotests/185
  43. 6
      tests/qemu-iotests/187
  44. 2
      tests/qemu-iotests/190
  45. 6
      tests/qemu-iotests/191
  46. 2
      tests/qemu-iotests/195
  47. 2
      tests/qemu-iotests/197
  48. 3
      tests/qemu-iotests/200
  49. 2
      tests/qemu-iotests/215
  50. 2
      tests/qemu-iotests/225
  51. 3
      tests/qemu-iotests/229
  52. 4
      tests/qemu-iotests/232
  53. 2
      tests/qemu-iotests/243
  54. 4
      tests/qemu-iotests/244
  55. 4
      tests/qemu-iotests/247
  56. 4
      tests/qemu-iotests/249
  57. 2
      tests/qemu-iotests/252

6
tests/qemu-iotests/019

@ -30,9 +30,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.base"
rm -f "$TEST_IMG.orig"
_cleanup_test_img
_rm_test_img "$TEST_IMG.base"
_rm_test_img "$TEST_IMG.orig"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

6
tests/qemu-iotests/020

@ -28,9 +28,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.base"
rm -f "$TEST_IMG.orig"
_cleanup_test_img
_rm_test_img "$TEST_IMG.base"
_rm_test_img "$TEST_IMG.orig"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

10
tests/qemu-iotests/024

@ -29,12 +29,12 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_DIR/t.$IMGFMT.base_old"
rm -f "$TEST_DIR/t.$IMGFMT.base_new"
_rm_test_img "$TEST_DIR/t.$IMGFMT.base_old"
_rm_test_img "$TEST_DIR/t.$IMGFMT.base_new"
rm -f "$TEST_DIR/subdir/t.$IMGFMT"
rm -f "$TEST_DIR/subdir/t.$IMGFMT.base_old"
rm -f "$TEST_DIR/subdir/t.$IMGFMT.base_new"
_rm_test_img "$TEST_DIR/subdir/t.$IMGFMT"
_rm_test_img "$TEST_DIR/subdir/t.$IMGFMT.base_old"
_rm_test_img "$TEST_DIR/subdir/t.$IMGFMT.base_new"
rmdir "$TEST_DIR/subdir" 2> /dev/null
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/028

@ -32,7 +32,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_qemu
rm -f "${TEST_IMG}.copy"
_rm_test_img "${TEST_IMG}.copy"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/029

@ -28,7 +28,7 @@ status=1 # failure is the default!
_cleanup()
{
rm -f $TEST_IMG.snap
_rm_test_img "$TEST_IMG.snap"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/043

@ -29,7 +29,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG".[123].base
for img in "$TEST_IMG".[123].base; do
_rm_test_img "$img"
done
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/048

@ -31,7 +31,7 @@ _cleanup()
{
echo "Cleanup"
_cleanup_test_img
rm "${TEST_IMG_FILE2}"
_rm_test_img "${TEST_IMG_FILE2}"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/050

@ -29,8 +29,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.old"
rm -f "$TEST_IMG.new"
_rm_test_img "$TEST_IMG.old"
_rm_test_img "$TEST_IMG.new"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/053

@ -28,8 +28,8 @@ status=1 # failure is the default!
_cleanup()
{
rm -f "$TEST_IMG.orig"
_cleanup_test_img
_rm_test_img "$TEST_IMG.orig"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/058

@ -42,7 +42,7 @@ _cleanup()
{
nbd_server_stop
_cleanup_test_img
rm -f "$converted_image"
_rm_test_img "$converted_image"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/059

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.qcow2"
IMGFMT=qcow2 _rm_test_img "$TEST_IMG.qcow2"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/061

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f $TEST_IMG.data
_rm_test_img "$TEST_IMG.data"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

6
tests/qemu-iotests/063

@ -29,8 +29,10 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.orig" "$TEST_IMG.raw1" "$TEST_IMG.raw2"
_cleanup_test_img
for img in "$TEST_IMG".{orig,raw1,raw2,target}; do
_rm_test_img "$img"
done
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/069

@ -47,7 +47,7 @@ echo "=== Creating an image with a backing file and deleting that file ==="
echo
TEST_IMG="$TEST_IMG.base" _make_test_img $IMG_SIZE
_make_test_img -b "$TEST_IMG.base" $IMG_SIZE
rm -f "$TEST_IMG.base"
_rm_test_img "$TEST_IMG.base"
# Just open the image and close it right again (this should print an error message)
$QEMU_IO -c quit "$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt

2
tests/qemu-iotests/074

@ -31,7 +31,7 @@ _cleanup()
{
echo "Cleanup"
_cleanup_test_img
rm "${TEST_IMG2}"
_rm_test_img "${TEST_IMG2}"
rm -f "$TEST_DIR/blkdebug.conf"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/080

@ -28,7 +28,7 @@ status=1 # failure is the default!
_cleanup()
{
rm -f $TEST_IMG.snap
_rm_test_img "$TEST_IMG.snap"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

6
tests/qemu-iotests/081

@ -28,9 +28,9 @@ status=1 # failure is the default!
_cleanup()
{
rm -rf $TEST_DIR/1.raw
rm -rf $TEST_DIR/2.raw
rm -rf $TEST_DIR/3.raw
_rm_test_img "$TEST_DIR/1.raw"
_rm_test_img "$TEST_DIR/2.raw"
_rm_test_img "$TEST_DIR/3.raw"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

9
tests/qemu-iotests/085

@ -41,10 +41,13 @@ _cleanup()
_cleanup_qemu
for i in $(seq 1 ${SNAPSHOTS})
do
rm -f "${TEST_DIR}/${i}-${snapshot_virt0}"
rm -f "${TEST_DIR}/${i}-${snapshot_virt1}"
_rm_test_img "${TEST_DIR}/${i}-${snapshot_virt0}"
_rm_test_img "${TEST_DIR}/${i}-${snapshot_virt1}"
done
for img in "${TEST_IMG}".{1,2,base}
do
_rm_test_img "$img"
done
rm -f "${TEST_IMG}" "${TEST_IMG}.1" "${TEST_IMG}.2" "${TEST_IMG}.base"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/088

@ -28,7 +28,7 @@ status=1 # failure is the default!
_cleanup()
{
rm -f $TEST_IMG.snap
_rm_test_img "$TEST_IMG.snap"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/092

@ -28,7 +28,7 @@ status=1 # failure is the default!
_cleanup()
{
rm -f $TEST_IMG.snap
_rm_test_img "$TEST_IMG.snap"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/094

@ -30,7 +30,7 @@ _cleanup()
{
_cleanup_qemu
_cleanup_test_img
rm -f "$TEST_DIR/source.$IMGFMT"
_rm_test_img "$TEST_DIR/source.$IMGFMT"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

5
tests/qemu-iotests/095

@ -32,8 +32,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_qemu
rm -f "${TEST_IMG}.base" "${TEST_IMG}.snp1"
_cleanup_test_img
_rm_test_img "${TEST_IMG}.base"
_rm_test_img "${TEST_IMG}.snp1"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

7
tests/qemu-iotests/099

@ -29,7 +29,10 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
_cleanup_test_img
_rm_test_img "$TEST_IMG.compare"
rm -f "$TEST_DIR/blkdebug.conf"
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@ -121,8 +124,6 @@ echo
test_qemu "file.driver=blkdebug,file.image.filename=$TEST_IMG"
rm -f "$TEST_IMG.compare" "$TEST_DIR/blkdebug.conf"
# success, all done
echo "*** done"
rm -f $seq.full

4
tests/qemu-iotests/109

@ -29,8 +29,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_qemu
rm -f $TEST_IMG.src
_cleanup_test_img
_rm_test_img "$TEST_IMG.src"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/110

@ -28,8 +28,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.copy"
_cleanup_test_img
_rm_test_img "$TEST_IMG.copy"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

6
tests/qemu-iotests/122

@ -28,8 +28,10 @@ status=1 # failure is the default!
_cleanup()
{
rm -f "$TEST_IMG".[123]
_cleanup_test_img
for img in "$TEST_IMG".[123]; do
_rm_test_img "$img"
done
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/123

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$SRC_IMG"
_rm_test_img "$SRC_IMG"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/141

@ -30,7 +30,9 @@ _cleanup()
{
_cleanup_qemu
_cleanup_test_img
rm -f "$TEST_DIR"/{b,m,o}.$IMGFMT
for img in "$TEST_DIR"/{b,m,o}.$IMGFMT; do
_rm_test_img "$img"
done
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/142

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f $TEST_IMG.snap
_rm_test_img "$TEST_IMG.snap"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/144

@ -34,7 +34,9 @@ TMP_SNAP2=${TEST_DIR}/tmp2.qcow2
_cleanup()
{
_cleanup_qemu
rm -f "${TEST_IMG}" "${TMP_SNAP1}" "${TMP_SNAP2}"
for img in "${TEST_IMG}" "${TMP_SNAP1}" "${TMP_SNAP2}"; do
_rm_test_img "$img"
done
}
trap "_cleanup; exit \$status" 0 1 2 3 15

10
tests/qemu-iotests/153

@ -30,13 +30,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "${TEST_IMG}.base"
rm -f "${TEST_IMG}.overlay"
rm -f "${TEST_IMG}.convert"
rm -f "${TEST_IMG}.a"
rm -f "${TEST_IMG}.b"
rm -f "${TEST_IMG}.c"
rm -f "${TEST_IMG}.lnk"
for img in "${TEST_IMG}".{base,overlay,convert,a,b,c,lnk}; do
_rm_test_img "$img"
done
}
trap "_cleanup; exit \$status" 0 1 2 3 15

8
tests/qemu-iotests/156

@ -37,7 +37,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_qemu
rm -f "$TEST_IMG"{,.target}{,.backing,.overlay}
for img in "$TEST_IMG"{,.target}{,.backing,.overlay}; do
_rm_test_img "$img"
done
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@ -120,7 +122,9 @@ _send_qemu_cmd $QEMU_HANDLE \
'"status": "null"'
# Remove the source images
rm -f "$TEST_IMG{,.backing,.overlay}"
for img in "$TEST_IMG{,.backing,.overlay}"; do
_rm_test_img "$img"
done
echo

2
tests/qemu-iotests/159

@ -28,7 +28,7 @@ status=1
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.out"
_rm_test_img "$TEST_IMG.out"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

3
tests/qemu-iotests/160

@ -28,7 +28,8 @@ status=1
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.out" "$TEST_IMG.out.dd"
_rm_test_img "$TEST_IMG.out"
_rm_test_img "$TEST_IMG.out.dd"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/161

@ -30,8 +30,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.base"
rm -f "$TEST_IMG.int"
_rm_test_img "$TEST_IMG.base"
_rm_test_img "$TEST_IMG.int"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/170

@ -28,7 +28,7 @@ status=1
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.out"
_rm_test_img "$TEST_IMG.out"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

6
tests/qemu-iotests/172

@ -28,9 +28,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.2"
rm -f "$TEST_IMG.3"
_cleanup_test_img
_rm_test_img "$TEST_IMG.2"
_rm_test_img "$TEST_IMG.3"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

3
tests/qemu-iotests/173

@ -29,7 +29,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_qemu
rm -f "${QEMU_TEST_DIR}/image.base" "${QEMU_TEST_DIR}/image.snp1"
_rm_test_img "${TEST_DIR}/image.base"
_rm_test_img "${TEST_DIR}/image.snp1"
_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/178

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.converted"
_rm_test_img "$TEST_IMG.converted"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/182

@ -30,7 +30,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.overlay"
_rm_test_img "$TEST_IMG.overlay"
rm -f "$SOCK_DIR/nbd.socket"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/183

@ -31,7 +31,7 @@ MIG_SOCKET="${SOCK_DIR}/migrate"
_cleanup()
{
rm -f "${MIG_SOCKET}"
rm -f "${TEST_IMG}.dest"
_rm_test_img "${TEST_IMG}.dest"
_cleanup_test_img
_cleanup_qemu
}

4
tests/qemu-iotests/185

@ -28,8 +28,8 @@ status=1 # failure is the default!
_cleanup()
{
rm -f "${TEST_IMG}.mid"
rm -f "${TEST_IMG}.copy"
_rm_test_img "${TEST_IMG}.mid"
_rm_test_img "${TEST_IMG}.copy"
_cleanup_test_img
_cleanup_qemu
}

6
tests/qemu-iotests/187

@ -28,9 +28,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.2"
rm -f "$TEST_IMG.3"
_cleanup_test_img
_rm_test_img "$TEST_IMG.2"
_rm_test_img "$TEST_IMG.3"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/190

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.converted"
_rm_test_img "$TEST_IMG.converted"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

6
tests/qemu-iotests/191

@ -28,9 +28,9 @@ status=1 # failure is the default!
_cleanup()
{
rm -f "${TEST_IMG}.mid"
rm -f "${TEST_IMG}.ovl2"
rm -f "${TEST_IMG}.ovl3"
_rm_test_img "${TEST_IMG}.mid"
_rm_test_img "${TEST_IMG}.ovl2"
_rm_test_img "${TEST_IMG}.ovl3"
_cleanup_test_img
_cleanup_qemu
}

2
tests/qemu-iotests/195

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.mid"
_rm_test_img "$TEST_IMG.mid"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/197

@ -43,7 +43,7 @@ esac
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_WRAP"
_rm_test_img "$TEST_WRAP"
rm -f "$BLKDBG_CONF"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

3
tests/qemu-iotests/200

@ -31,7 +31,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_qemu
rm -f "${TEST_IMG}" "${BACKING_IMG}"
_rm_test_img "${TEST_IMG}"
_rm_test_img "${BACKING_IMG}"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/215

@ -40,7 +40,7 @@ esac
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_WRAP"
_rm_test_img "$TEST_WRAP"
rm -f "$BLKDBG_CONF"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/225

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.not_base"
_rm_test_img "$TEST_IMG.not_base"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

3
tests/qemu-iotests/229

@ -31,7 +31,8 @@ _cleanup()
{
_cleanup_qemu
_cleanup_test_img
rm -f "$TEST_IMG" "$DEST_IMG"
_rm_test_img "$TEST_IMG"
_rm_test_img "$DEST_IMG"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/232

@ -29,7 +29,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f $TEST_IMG.[01234]
for img in "$TEST_IMG".[01234]; do
_rm_test_img "$img"
done
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/243

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f $TEST_IMG.data
_rm_test_img "$TEST_IMG.data"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/244

@ -29,8 +29,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f $TEST_IMG.data
rm -f $TEST_IMG.src
_rm_test_img "$TEST_IMG.data"
_rm_test_img "$TEST_IMG.src"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/247

@ -29,7 +29,9 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f $TEST_IMG.[01234]
for img in "$TEST_IMG".[01234]; do
_rm_test_img "$img"
done
}
trap "_cleanup; exit \$status" 0 1 2 3 15

4
tests/qemu-iotests/249

@ -30,8 +30,8 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.base"
rm -f "$TEST_IMG.int"
_rm_test_img "$TEST_IMG.base"
_rm_test_img "$TEST_IMG.int"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

2
tests/qemu-iotests/252

@ -29,7 +29,7 @@ status=1 # failure is the default!
_cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.base_new"
_rm_test_img "$TEST_IMG.base_new"
}
trap "_cleanup; exit \$status" 0 1 2 3 15

Loading…
Cancel
Save