[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH for-2.10 1/1] qemu-iotests: _cleanup_qemu must b
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH for-2.10 1/1] qemu-iotests: _cleanup_qemu must be called on exit |
Date: |
Tue, 18 Apr 2017 12:38:08 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 |
On 04/18/2017 12:31 PM, Jeff Cody wrote:
> For the tests that use the common.qemu functions for running a QEMU
> process, _cleanup_qemu must be called in the exit function.
>
> If it is not, if the qemu process aborts, then not all of the droppings
> are cleaned up (e.g. pidfile, fifos).
>
> This updates those tests that did not have a cleanup in qemu-iotests.
>
> (I swapped spaces for tabs in test 102 as well)
>
> Reported-by: Eric Blake <address@hidden>
> Signed-off-by: Jeff Cody <address@hidden>
> ---
> +++ b/tests/qemu-iotests/094
> @@ -27,7 +27,14 @@ echo "QA output created by $seq"
> here="$PWD"
> status=1 # failure is the default!
>
> -trap "exit \$status" 0 1 2 3 15
> +_cleanup()
> +{
> + _cleanup_qemu
> + _cleanup_test_img
> + rm -f "$TEST_DIR/source.$IMGFMT"
> +}
> +
> +trap "cleanup; exit \$status" 0 1 2 3 15
s/cleanup/_cleanup/
Once you fix that typo,
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature