From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Gustavo Romero <gustavo.romero@linaro.org>,
qemu-devel@nongnu.org, peter.maydell@linaro.org,
alex.bennee@linaro.org, richard.henderson@linaro.org
Cc: John Snow <jsnow@redhat.com>
Subject: Re: [PATCH 3/4] tests: Gently exit from GDB when tests complete
Date: Thu, 16 May 2024 09:07:31 +0200 [thread overview]
Message-ID: <ff7b8585-d838-45bb-aec0-bcbf6900b7c8@linaro.org> (raw)
In-Reply-To: <20240515173132.2462201-4-gustavo.romero@linaro.org>
On 15/5/24 19:31, Gustavo Romero wrote:
> GDB commit a207f6b3a38 ('Rewrite "python" command exception handling')
> changed how exit() called from Python scripts loaded by GDB behave,
> turning it into an exception instead of a generic error code that is
> returned. This change caused several QEMU tests to crash with the
> following exception:
>
> Python Exception <class 'SystemExit'>: 0
> Error occurred in Python: 0
>
> This happens because in tests/guest-debug/test_gdbstub.py exit is
> called after the tests have completed.
>
> This commit fixes it by politely asking GDB to exit via gdb.execute,
> passing the proper fail_count to be reported to 'make', instead of
> abruptly calling exit() from the Python script.
>
> Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
> ---
> tests/guest-debug/test_gdbstub.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/guest-debug/test_gdbstub.py b/tests/guest-debug/test_gdbstub.py
> index 7f71d34da1..46fbf98f0c 100644
> --- a/tests/guest-debug/test_gdbstub.py
> +++ b/tests/guest-debug/test_gdbstub.py
> @@ -57,4 +57,4 @@ def main(test, expected_arch=None):
> pass
>
> print("All tests complete: {} failures".format(fail_count))
> - exit(fail_count)
> + gdb.execute(f"exit {fail_count}")
Yay!
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2024-05-16 7:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 17:31 [PATCH 0/4] Add MTE stubs for aarch64 user mode Gustavo Romero
2024-05-15 17:31 ` [PATCH 1/4] gdbstub: Add support for target-specific stubs Gustavo Romero
2024-05-16 10:37 ` Philippe Mathieu-Daudé
2024-05-28 16:32 ` Alex Bennée
2024-05-15 17:31 ` [PATCH 2/4] gdbstub: Add support for MTE in user mode Gustavo Romero
2024-05-16 10:43 ` Philippe Mathieu-Daudé
2024-05-16 11:44 ` Richard Henderson
2024-05-16 12:22 ` Richard Henderson
2024-05-28 16:34 ` Alex Bennée
2024-05-15 17:31 ` [PATCH 3/4] tests: Gently exit from GDB when tests complete Gustavo Romero
2024-05-16 7:07 ` Philippe Mathieu-Daudé [this message]
2024-05-15 17:31 ` [PATCH 4/4] tests/tcg/aarch64: Add MTE gdbstub tests Gustavo Romero
2024-05-28 16:06 ` [PATCH 0/4] Add MTE stubs for aarch64 user mode Alex Bennée
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=ff7b8585-d838-45bb-aec0-bcbf6900b7c8@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=gustavo.romero@linaro.org \
--cc=jsnow@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).