[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] qemu-iotests: Allow starting n
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] qemu-iotests: Allow starting new qemu after cleanup |
Date: |
Fri, 9 Jun 2017 07:05:54 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 06/09/2017 06:50 AM, Kevin Wolf wrote:
> 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).
Yeah, idempotency is a nice thing.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> tests/qemu-iotests/common.qemu | 3 +++
> 1 file changed, 3 insertions(+)
>
Reviewed-by: Eric Blake <address@hidden>
> diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
> index 7a78a00..76ef298 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
> }
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
Re: [Qemu-block] [PATCH 3/3] qemu-iotests: Test exiting qemu with running job, Max Reitz, 2017/06/09