diff options
author | Kevin Wolf <kwolf@redhat.com> | 2017-06-09 13:32:48 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-06-26 14:51:12 +0200 |
commit | ecaf8c8a6fdd2153f1652d1598c4e344cc961e3b (patch) | |
tree | 361a9f15e96e759a26bc097350bd365e5d74102f /tests/qemu-iotests/common.qemu | |
parent | 4f78a16fee462471416dc49b409d57b2071cf3d9 (diff) |
qemu-iotests: Allow starting new qemu after cleanup
After _cleanup_qemu(), test cases should be able to start the next qemu
process and call _cleanup_qemu() for that one as well. For this to work
cleanly, we need to improve the cleanup so that the second invocation
doesn't try to kill the qemu instances from the first invocation a
second time (which would result in error messages).
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common.qemu')
-rw-r--r-- | tests/qemu-iotests/common.qemu | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu index 7a78a00999..76ef298d3f 100644 --- a/tests/qemu-iotests/common.qemu +++ b/tests/qemu-iotests/common.qemu @@ -222,5 +222,8 @@ function _cleanup_qemu() rm -f "${QEMU_FIFO_IN}_${i}" "${QEMU_FIFO_OUT}_${i}" eval "exec ${QEMU_IN[$i]}<&-" # close file descriptors eval "exec ${QEMU_OUT[$i]}<&-" + + unset QEMU_IN[$i] + unset QEMU_OUT[$i] done } |