mirror of
https://github.com/qemu/qemu.git
synced 2025-08-14 20:31:47 +00:00
iotests: Fix cleanup path in some tests
Some iotests leave behind some external data file when run for qcow2 with -o data_file. Fix that. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200224171631.384314-1-mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
808cf3cb6a
commit
801ddbda71
@ -39,6 +39,7 @@ SNAPSHOTS=10
|
|||||||
_cleanup()
|
_cleanup()
|
||||||
{
|
{
|
||||||
_cleanup_qemu
|
_cleanup_qemu
|
||||||
|
_cleanup_test_img
|
||||||
for i in $(seq 1 ${SNAPSHOTS})
|
for i in $(seq 1 ${SNAPSHOTS})
|
||||||
do
|
do
|
||||||
_rm_test_img "${TEST_DIR}/${i}-${snapshot_virt0}"
|
_rm_test_img "${TEST_DIR}/${i}-${snapshot_virt0}"
|
||||||
|
@ -26,6 +26,12 @@ echo "QA output created by $seq"
|
|||||||
|
|
||||||
status=1 # failure is the default!
|
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
|
# get standard environment, filters and checks
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
|
@ -26,7 +26,7 @@ status=1 # failure is the default!
|
|||||||
_cleanup()
|
_cleanup()
|
||||||
{
|
{
|
||||||
_cleanup_test_img
|
_cleanup_test_img
|
||||||
rm -f "$TEST_IMG.mid"
|
_rm_test_img "$TEST_IMG.mid"
|
||||||
}
|
}
|
||||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user