qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Gustavo Romero <gustavo.romero@linaro.org>,
	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: Mon, 21 Oct 2024 21:31:53 +0200	[thread overview]
Message-ID: <cd561063296a9e42053d7e1c07cf49617938466a.camel@linux.ibm.com> (raw)
In-Reply-To: <e22adb4e-86a2-43aa-a9f4-2e9f40bb4d87@linaro.org>

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.

> Acked-by: Gustavo Romero <gustavo.romero@linaro.org>
> 
> 
> Cheers,
> Gustavo
> 
> [0] https://sourceware.org/bugzilla/show_bug.cgi?id=31946



  reply	other threads:[~2024-10-21 19:32 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 [this message]
2024-10-22  4:14       ` Philippe Mathieu-Daudé
2024-10-22 12:17       ` Gustavo Romero

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=cd561063296a9e42053d7e1c07cf49617938466a.camel@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=alex.bennee@linaro.org \
    --cc=gustavo.romero@linaro.org \
    --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).