public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Marc Poulhies <mpoulhies@kalrayinc.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	Luc Michel <lmichel@kalray.eu>
Subject: Re: [NEWS] libstdc++: Fix testsuite for skipping gdb tests on remote/non-native target
Date: Wed, 21 Jul 2021 16:53:52 +0100	[thread overview]
Message-ID: <CACb0b4nw+uxA6XYST2d0P2A0VOjwfqUzV6WwUo2BgjJyW4uOqA@mail.gmail.com> (raw)
In-Reply-To: <291496446.934555.1626879744068.JavaMail.zimbra@kalray.eu>

On Wed, 21 Jul 2021 at 16:02, Marc Poulhies via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> With the correct patch attached, sorry for the incorrect previous one !

Thanks for the patch. I agree we should skip the version checks, not
only the actual tests. But I wonder whether we want to do that in
xmethods.exp and prettyprinters.exp rather than in the gdb_batch_check
proc. Or maybe like this instead:

--- a/libstdc++-v3/testsuite/lib/gdb-test.exp
+++ b/libstdc++-v3/testsuite/lib/gdb-test.exp
@@ -280,6 +280,8 @@ proc gdb_batch_check {command pattern} {
# but not earlier versions.
# Return 1 if the version is ok, 0 otherwise.
proc gdb_version_check {} {
+    if { ![isnative] || [is_remote target] } { return 0 }
+
    return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \
             "<built-in function lookup_global_symbol>"]
}
@@ -288,6 +290,8 @@ proc gdb_version_check {} {
# in a manner similar to the check for a version of gdb which supports the
# pretty-printer tests below.
proc gdb_version_check_xmethods {} {
+    if { ![isnative] || [is_remote target] } { return 0 }
+
    return [gdb_batch_check \
             "python import gdb.xmethod; print(gdb.xmethod.XMethod)" \
             "<class 'gdb\\.xmethod\\.XMethod'>"]



I don't think it really makes much difference, I'm just unsure what is
"cleaner" and more consistent with DG conventions and/or the rest of
the gdb-test.exp file.


  reply	other threads:[~2021-07-21 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 14:12 Marc Poulhies
2021-07-21 15:02 ` [NEWS] " Marc Poulhies
2021-07-21 15:53   ` Jonathan Wakely [this message]
2021-07-22  9:19     ` Marc Poulhies

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=CACb0b4nw+uxA6XYST2d0P2A0VOjwfqUzV6WwUo2BgjJyW4uOqA@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=lmichel@kalray.eu \
    --cc=mpoulhies@kalrayinc.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).