From: Markus Armbruster <armbru@redhat.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Richard Henderson <richard.henderson@linaro.org>,
David Hildenbrand <david@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Eric Blake <eblake@redhat.com>,
qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@linux.ibm.com>
Subject: Re: [PATCH v3 1/2] qapi: Add exit-failure PanicAction
Date: Mon, 01 Aug 2022 16:14:56 +0200 [thread overview]
Message-ID: <87y1w8caov.fsf@pond.sub.org> (raw)
In-Reply-To: <20220725223746.227063-2-iii@linux.ibm.com> (Ilya Leoshkevich's message of "Tue, 26 Jul 2022 00:37:45 +0200")
Ilya Leoshkevich <iii@linux.ibm.com> writes:
> 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>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Reviewed-by: David Hildenbrand <david@redhat.com>
[...]
> diff --git a/qapi/run-state.json b/qapi/run-state.json
> index 6e2162d7b3..9273ea6516 100644
> --- a/qapi/run-state.json
> +++ b/qapi/run-state.json
> @@ -364,10 +364,13 @@
##
# @PanicAction:
This is the type of set-action argument @panic, which is documented as
"action taken on guest panic."
#
# @none: Continue VM execution
I guess this is effectively "do nothing / ignore".
#
# @pause: Pause the VM
Clear enough.
> #
> # @shutdown: Shutdown the VM and exit, according to the shutdown action
I guess this is the value of set-action argument @shutdown, which is
can be
* @poweroff, documented as "Shutdown the VM and exit"
Do we exit successfully, i.e. with zero status?
* @pause, documented as "pause the VM"
PanicAction's documentation claims "shutdown the VM and exit", but we
don't, we pause instead. Not this patch's problem.
> #
> +# @exit-failure: Shutdown the VM and exit with nonzero status
non-zero
> +# (since 7.1)
> +#
> # Since: 6.0
> ##
> { 'enum': 'PanicAction',
> - 'data': [ 'pause', 'shutdown', 'none' ] }
> + 'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] }
>
> ##
> # @watchdog-set-action:
Not this patch's problem, but here goes anyway:
##
# @set-action:
#
# Set the actions that will be taken by the emulator in response to guest
# events.
#
# @reboot: @RebootAction action taken on guest reboot.
#
# @shutdown: @ShutdownAction action taken on guest shutdown.
#
# @panic: @PanicAction action taken on guest panic.
#
# @watchdog: @WatchdogAction action taken when watchdog timer expires .
#
# Returns: Nothing on success.
#
# Since: 6.0
#
# Example:
#
# -> { "execute": "set-action",
# "arguments": { "reboot": "shutdown",
# "shutdown" : "pause",
# "panic": "pause",
# "watchdog": "inject-nmi" } }
# <- { "return": {} }
##
The arguments are all optional, but the documentation neglects to spell
out what "absent" means. I guess it means "no change".
The documentation also neglects to spell out the initial settings,
i.e. behavior when you don't configure an action with set-action.
[...]
next prev parent reply other threads:[~2022-08-01 14:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 22:37 [PATCH v3 0/2] accel/tcg: Test unaligned stores to s390x low-address-protected lowcore Ilya Leoshkevich
2022-07-25 22:37 ` [PATCH v3 1/2] qapi: Add exit-failure PanicAction Ilya Leoshkevich
2022-08-01 14:14 ` Markus Armbruster [this message]
2022-07-25 22:37 ` [PATCH v3 2/2] tests/tcg/s390x: Test unaligned accesses to lowcore Ilya Leoshkevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1w8caov.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=eblake@redhat.com \
--cc=iii@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).