Message ID | 20230628155703.2948377-1-tromey@adacore.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9030198vqr; Wed, 28 Jun 2023 08:58:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4sEIeGiBwyjr5OG1KUHMfvvIEamWRX39yfnHIor5QtpO5bct5+ph4S/XXNB3Oh0Q2Zccz+ X-Received: by 2002:a17:907:74c:b0:968:236:eb17 with SMTP id xc12-20020a170907074c00b009680236eb17mr31683593ejb.24.1687967911723; Wed, 28 Jun 2023 08:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687967911; cv=none; d=google.com; s=arc-20160816; b=zIJeiiZRaNaZWaWBgFsBbKfEZxYiS5VCXqqT9h7EGng9mOW/zXdFearPS6JbdODqqH Mx7l08Fe+yL91uGCt6Ppa/51k6oTKYqwL5S7wc+hQ8GlVkRIrlBLTxLW8w6YA1GPlVYM ukHWzsgyF8oremd1xYs3rmdBH7McwFZbx3XCYDdY96kNVhqWQGlnEC6CluD5q+k4xrCw VtgzNVONaeKA1ETAVKMbUGkCX6ZgsnWtHdsAQih7zXGNcFCoo+QeUxXtfflhuU1uGhl3 OAnyQfEIFnRnvG53aA6d6tLEyLnhRQQmV6ITiE5Sfn0k/y9eyMSIuNCBVg+553HpIkJd LgUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=XhdpzdsP49vBj6DnNKDku91mfaQxiUetkg2b+G8A3Vo=; fh=Ogh3zaPUNpdNYHofIVNHsbX+D3lwaT1T8Jhe/MolwAA=; b=EWDzegrmFT/eSP9cJ/pdSU5GCwqFFI/Y4gX6l+D2rnQe4nEafPr6wVAQBqdtmUP1JW jnmocdAuakHdLjUCA2w26L5/3OfNgO6WD1lksZMPcLKgFlhEJPw6APW/ZC3bkamFf5J1 zYdlUkYgrPfxqftVckz/sgb3U0R4sMTdmhwhf+DYzyPgBG5EeFAVBrLH/QY6gbftQWsx MUACSGHGpUFnIyuj5n75JjAP8G+IO9uGQRjj6aKNU9AhW/iPQ024WVAY+k+xIr5pOQxC +gqxQAQYHoVTvTMrQ7NBo8mYvI2V/eqvP1pvgU5k4O6dWNBhtqxsECNMf4YhtF1a2MHf ncFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xFH4ndaB; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id oz14-20020a170906cd0e00b009928751cc01si706483ejb.936.2023.06.28.08.58.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 08:58:31 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xFH4ndaB; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 05D2F3858028 for <ouuuleilei@gmail.com>; Wed, 28 Jun 2023 15:58:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05D2F3858028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687967891; bh=XhdpzdsP49vBj6DnNKDku91mfaQxiUetkg2b+G8A3Vo=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=xFH4ndaBvFK90PzcM3ZCAzTBG4VEnMFliao8KqGOaeG3QPUQCKKvbWqdKDMsWSvbN +4kX1vh3kCjBp6C9J8conSvKmoozfjTgQUHIwAqiGvhdmseVkjxyNtxAirzuXAhh5f /dpJgBoN0te0NC/lROv9rYCF413EKREik6GKVrPM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id D8ED13858D37 for <gcc-patches@gcc.gnu.org>; Wed, 28 Jun 2023 15:57:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8ED13858D37 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-7835971026fso2053739f.3 for <gcc-patches@gcc.gnu.org>; Wed, 28 Jun 2023 08:57:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687967846; x=1690559846; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XhdpzdsP49vBj6DnNKDku91mfaQxiUetkg2b+G8A3Vo=; b=agKUw4BHBSZnMfYk03URzkCLlSIPO+dLkmiiLK+QwCDAAisUnv+/KWIwsa4Xu2SzfM 0j0aTSPz594p+2ZafJiu6fp1uUVTL2M0yTpH2zU8rzlD+arBUnGwFNfftwPfN59Xisdw Sjrv4iMCAtUU/OUEtOV+oGIG97V5Ab8M9KY08wa7LJZjuuLl1FN0ZrjGvUfs+x0cOZJV 52U3aTweAljO31DGiQE5xkSDd5/Kgkp5/o5xBUUThBLOv5XLaG+sbj7wZTM2xAL++TIg LlDDQ2IPPg/kMXWRqHdTfAwGPX7eyI545kOnJvRLFOfOgJbPkLHDY3E3S4n/Ayc/2Wu1 Qquw== X-Gm-Message-State: AC+VfDyo1CsDpxmTfg5jCN7dKGEtyGIks/77fbWT3zfcqNOyuw3XYCSL pA81i1n11ZUUSv2/UR3bEMsdQKf4XvmGtjBLHmEXPg== X-Received: by 2002:a6b:6513:0:b0:786:2672:5331 with SMTP id z19-20020a6b6513000000b0078626725331mr1127936iob.2.1687967846086; Wed, 28 Jun 2023 08:57:26 -0700 (PDT) Received: from localhost.localdomain (71-211-136-248.hlrn.qwest.net. [71.211.136.248]) by smtp.gmail.com with ESMTPSA id f25-20020a056638023900b0042887e69e99sm3178159jaq.95.2023.06.28.08.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 08:57:25 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Tom Tromey <tromey@adacore.com> Subject: [PATCH] Relax type-printer regexp in libstdc++ test suite Date: Wed, 28 Jun 2023 09:57:03 -0600 Message-Id: <20230628155703.2948377-1-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Tom Tromey via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Tom Tromey <tromey@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769962641051789782?= X-GMAIL-MSGID: =?utf-8?q?1769962641051789782?= |
Series |
Relax type-printer regexp in libstdc++ test suite
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Tom Tromey
June 28, 2023, 3:57 p.m. UTC
The libstdc++ test suite checks whether gdb type printers are available like so: set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \ "\\\[\\\]"] This regexp assumes that the list of printers is empty. However, sometimes it's convenient to ship a gdb that comes with some default printers, causing this to erroneously report that gdb is "too old". I believe the intent of this check is to ensure that gdb.type_printers exists -- not to check its starting value. This patch changes the check to accept any Python list as output. Note that the patch doesn't look for the trailing "]". I tried this but in my case the output was too long for expect. It seemed fine to just check the start, as the point really is to reject the case where the command prints an error message. * testsuite/lib/gdb-test.exp (gdb-test): Relax type-printer regexp. --- libstdc++-v3/testsuite/lib/gdb-test.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Comments
On Wed, 28 Jun 2023 at 16:58, Tom Tromey via Libstdc++ < libstdc++@gcc.gnu.org> wrote: > The libstdc++ test suite checks whether gdb type printers are > available like so: > > set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" > \ > "\\\[\\\]"] > > This regexp assumes that the list of printers is empty. However, > sometimes it's convenient to ship a gdb that comes with some default > printers, causing this to erroneously report that gdb is "too old". > > I believe the intent of this check is to ensure that gdb.type_printers > exists -- not to check its starting value. This patch changes the > check to accept any Python list as output. > > Note that the patch doesn't look for the trailing "]". I tried this > but in my case the output was too long for expect. It seemed fine to > just check the start, as the point really is to reject the case where > the command prints an error message. > Looks good. OK for trunk, and OK to backport after some soak time on trunk. Thanks. > * testsuite/lib/gdb-test.exp (gdb-test): Relax type-printer > regexp. > --- > libstdc++-v3/testsuite/lib/gdb-test.exp | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/libstdc++-v3/testsuite/lib/gdb-test.exp > b/libstdc++-v3/testsuite/lib/gdb-test.exp > index 3728a060aa4..d8e572ef7b3 100644 > --- a/libstdc++-v3/testsuite/lib/gdb-test.exp > +++ b/libstdc++-v3/testsuite/lib/gdb-test.exp > @@ -107,8 +107,12 @@ proc gdb-test { marker {selector {}} {load_xmethods > 0} } { > } > } > > + # A very old version of gdb will not have the type_printers > + # global. Some organizations may ship a gdb that has some default > + # type printers, so accept any list output as indication that the > + # global exists. > set do_whatis_tests [gdb_batch_check "python > print(gdb.type_printers)" \ > - "\\\[\\\]"] > + "\\\[.+"] > if {!$do_whatis_tests} { > send_log "skipping 'whatis' tests - gdb too old" > } > -- > 2.40.1 > >
>>>>> Jonathan Wakely <jwakely@redhat.com> writes: > Looks good. OK for trunk, and OK to backport after some soak time on trunk. Thanks. AdaCore doesn't need a backport of this, and I don't think it's extremely important; so unless you want me to do it, I don't plan to. I did check it in on trunk earlier today. thanks, Tom
On Thu, 29 Jun 2023 at 17:59, Tom Tromey <tromey@adacore.com> wrote: > >>>>> Jonathan Wakely <jwakely@redhat.com> writes: > > > Looks good. OK for trunk, and OK to backport after some soak time on > trunk. Thanks. > > AdaCore doesn't need a backport of this, and I don't think it's > extremely important; so unless you want me to do it, I don't plan to. > OK, we can always backport it later if anybody else needs it. > I did check it in on trunk earlier today. > > Thanks.
diff --git a/libstdc++-v3/testsuite/lib/gdb-test.exp b/libstdc++-v3/testsuite/lib/gdb-test.exp index 3728a060aa4..d8e572ef7b3 100644 --- a/libstdc++-v3/testsuite/lib/gdb-test.exp +++ b/libstdc++-v3/testsuite/lib/gdb-test.exp @@ -107,8 +107,12 @@ proc gdb-test { marker {selector {}} {load_xmethods 0} } { } } + # A very old version of gdb will not have the type_printers + # global. Some organizations may ship a gdb that has some default + # type printers, so accept any list output as indication that the + # global exists. set do_whatis_tests [gdb_batch_check "python print(gdb.type_printers)" \ - "\\\[\\\]"] + "\\\[.+"] if {!$do_whatis_tests} { send_log "skipping 'whatis' tests - gdb too old" }