From: Gustavo Romero <gustavo.romero@linaro.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
Peter Maydell <peter.maydell@linaro.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [PATCH] tests/tcg: Stop using exit() in the gdbstub testcases
Date: Tue, 22 Oct 2024 09:17:30 -0300 [thread overview]
Message-ID: <9472465a-c7e3-43bd-a7cc-2f8ec2601df1@linaro.org> (raw)
In-Reply-To: <cd561063296a9e42053d7e1c07cf49617938466a.camel@linux.ibm.com>
Hi Ilya,
On 10/21/24 16:31, Ilya Leoshkevich wrote:
> On Mon, 2024-10-21 at 16:08 -0300, Gustavo Romero wrote:
>> Hi,
>>
>> On 10/21/24 12:08, Peter Maydell wrote:
>>> On Mon, 21 Oct 2024 at 16:02, Ilya Leoshkevich <iii@linux.ibm.com>
>>> wrote:
>>>>
>>>> GDB 15 does not like exit() anymore:
>>>>
>>>> (gdb) python exit(0)
>>>> Python Exception <class 'SystemExit'>: 0
>>>> Error occurred in Python: 0
>>>>
>>>> Use the GDB's own exit command, like it's already done in a
>>>> couple
>>>> places, everywhere.
>>>
>>> This is the same bug that commit 93a3048dcf4565 is
>>> fixing, but it looks like we didn't catch everywhere.
>>
>> Yep.
>>
>> So maybe now change in test_gdbstub.py this line:
>>
>> gdb.execute(f"exit {fail_count}")
>>
>> to use the new gdb_exit()?
>
> Thanks for taking a look! I think I'm already doing this here?
>
> @@ -62,4 +68,4 @@ def main(test, expected_arch=None):
> pass
>
> print("All tests complete: {} failures".format(fail_count))
> - gdb.execute(f"exit {fail_count}")
> + gdb_exit(fail_count)
>
>> BTW, last news from this issue is that it seems to be fixed
>> in GDB 15.2 [0] (I haven't tried it). However, the fix using
>> gdb.exit(n) is still correct.
>
> Interesting, I didn't realize this was a bug and not a design
> change. Still, given that the buggy GDBs are out there, I'd prefer to
> have this change.
Yeah, exactly, for my fix I understood it was a design change at that
time too, then there is this fix on GDB 15.2 :) Right, I also prefer
having these fixes in place for QEMU. Thanks.
Cheers,
Gustavo
prev parent reply other threads:[~2024-10-22 12:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 15:01 [PATCH] tests/tcg: Stop using exit() in the gdbstub testcases Ilya Leoshkevich
2024-10-21 15:08 ` Peter Maydell
2024-10-21 19:08 ` Gustavo Romero
2024-10-21 19:31 ` Ilya Leoshkevich
2024-10-22 4:14 ` Philippe Mathieu-Daudé
2024-10-22 12:17 ` Gustavo Romero [this message]
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=9472465a-c7e3-43bd-a7cc-2f8ec2601df1@linaro.org \
--to=gustavo.romero@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=iii@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.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).