[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] qapi: Add exit-failure PanicAction
From: |
Eric Blake |
Subject: |
Re: [PATCH v2 1/2] qapi: Add exit-failure PanicAction |
Date: |
Mon, 25 Jul 2022 12:52:41 -0500 |
User-agent: |
NeoMutt/20220429 |
On Sat, Jul 23, 2022 at 01:36:13AM +0200, Ilya Leoshkevich wrote:
> Currently QEMU exits with code 0 on both panic an shutdown. For tests
> it is useful to return 1 on panic, so that it counts as a test
> failure.
>
> Introduce a new exit-failure PanicAction that makes main() return
> EXIT_FAILURE. Tests can use -action panic=exit-failure option to
> activate this behavior.
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> +++ b/qapi/run-state.json
> @@ -364,10 +364,12 @@
> #
> # @shutdown: Shutdown the VM and exit, according to the shutdown action
> #
> +# @exit-failure: Shutdown the VM and exit with nonzero status
Missing a '(since 7.1)' tag. Otherwise a nice addition.
> +#
> # Since: 6.0
> ##
> { 'enum': 'PanicAction',
> - 'data': [ 'pause', 'shutdown', 'none' ] }
> + 'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] }
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org