[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/6] iotests: Fix cleanup path in some tests
From: |
Max Reitz |
Subject: |
[PULL 5/6] iotests: Fix cleanup path in some tests |
Date: |
Tue, 24 Mar 2020 13:20:43 +0100 |
Some iotests leave behind some external data file when run for qcow2
with -o data_file. Fix that.
Signed-off-by: Max Reitz <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/085 | 1 +
tests/qemu-iotests/087 | 6 ++++++
tests/qemu-iotests/279 | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085
index 46981dbb64..dd3c993a2d 100755
--- a/tests/qemu-iotests/085
+++ b/tests/qemu-iotests/085
@@ -39,6 +39,7 @@ SNAPSHOTS=10
_cleanup()
{
_cleanup_qemu
+ _cleanup_test_img
for i in $(seq 1 ${SNAPSHOTS})
do
_rm_test_img "${TEST_DIR}/${i}-${snapshot_virt0}"
diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087
index d6c8613419..bdfdad3454 100755
--- a/tests/qemu-iotests/087
+++ b/tests/qemu-iotests/087
@@ -26,6 +26,12 @@ echo "QA output created by $seq"
status=1 # failure is the default!
+_cleanup()
+{
+ _cleanup_test_img
+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
# get standard environment, filters and checks
. ./common.rc
. ./common.filter
diff --git a/tests/qemu-iotests/279 b/tests/qemu-iotests/279
index 30d29b1cb2..75a4747e6b 100755
--- a/tests/qemu-iotests/279
+++ b/tests/qemu-iotests/279
@@ -26,7 +26,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.25.1
- [PULL 0/6] Block patches for 5.0-rc0, Max Reitz, 2020/03/24
- [PULL 1/6] block: Avoid memleak on qcow2 image info failure, Max Reitz, 2020/03/24
- [PULL 2/6] block: Assert BlockDriver::format_name is not NULL, Max Reitz, 2020/03/24
- [PULL 3/6] block: bdrv_set_backing_bs: fix use-after-free, Max Reitz, 2020/03/24
- [PULL 4/6] block/qcow2: zero data_file child after free, Max Reitz, 2020/03/24
- [PULL 5/6] iotests: Fix cleanup path in some tests,
Max Reitz <=
- [PULL 6/6] iotests/026: Move v3-exclusive test to new file, Max Reitz, 2020/03/24
- Re: [PULL 0/6] Block patches for 5.0-rc0, Peter Maydell, 2020/03/24