From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id ECB773858020 for ; Wed, 21 Jul 2021 15:54:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ECB773858020 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-277-_Gacy91GNv65bdG6-Kc-Ag-1; Wed, 21 Jul 2021 11:54:05 -0400 X-MC-Unique: _Gacy91GNv65bdG6-Kc-Ag-1 Received: by mail-wr1-f71.google.com with SMTP id d8-20020adf9c880000b0290141a87409b5so1177266wre.16 for ; Wed, 21 Jul 2021 08:54:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5OKVptYDs0A00llrWvqp3UXPwoqL+X3n11vjsY0xvdg=; b=QN4DqKtXaEw6yVTKgDjHA4BHPb78DXyd23E9b9u2Jmu3kfY9598PaAU/y1jv9h1cA7 eovq/SfcIigiLq/LzmnAwrHkN7n+OtNIQpDKiusFL8QS2A2SDkfcED3yEszOYuzRG5xc f7bVGaeL0tGrDajvcVTrf0WdVIEKEAqKiqujrRQ6AL2Qe93bf9jrENI/Hh3YQ+VatMBZ PV1ctiRUm8MrWbHFv/nice+FqcmTguqOAwuMecwKZMy0xm1dSyeY0duI89XksCATwEAv cPi2FFtzpCxQClkBtM2WGVfarajGg3R4mokRZkAOhPlrYEGy2PtMKvgg0a/6nlXzcUmS 0k9Q== X-Gm-Message-State: AOAM531cC8iPgY6Mm6w3nZ9041MO9aelc4ofJYntBse5XegZ906+V/Ys kyAXNSIPKLnNtWlGgWF6xjL6I+qJWTpL7UdPasiyk0mV59tPhM9ITcyDDm9ofND8dc+Mi2OkOZ8 EFNapY4qiFFO1PVPQarEBSg6YQmL41xQ= X-Received: by 2002:a05:6000:1375:: with SMTP id q21mr43935185wrz.147.1626882844263; Wed, 21 Jul 2021 08:54:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrYEH9nNDrBP2KiCr59qEV22LSPaILqFOfQhNwQoD5QHJlPzJu0oQ0bvhMj1dBy7nzbmZbOyh2ft1KG48VbGs= X-Received: by 2002:a05:6000:1375:: with SMTP id q21mr43935155wrz.147.1626882843924; Wed, 21 Jul 2021 08:54:03 -0700 (PDT) MIME-Version: 1.0 References: <1855720815.793351.1626790336484.JavaMail.zimbra@kalray.eu> <291496446.934555.1626879744068.JavaMail.zimbra@kalray.eu> In-Reply-To: <291496446.934555.1626879744068.JavaMail.zimbra@kalray.eu> From: Jonathan Wakely Date: Wed, 21 Jul 2021 16:53:52 +0100 Message-ID: Subject: Re: [NEWS] libstdc++: Fix testsuite for skipping gdb tests on remote/non-native target To: Marc Poulhies Cc: "libstdc++" , gcc-patches , Luc Michel X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2021 15:54:08 -0000 On Wed, 21 Jul 2021 at 16:02, Marc Poulhies via Libstdc++ 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)" \ ""] } @@ -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)" \ ""] 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.