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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8C2863858CDA for ; Wed, 28 Jun 2023 18:06:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C2863858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687975563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6KKc/+Dc2GT9hl2obw259tAdh7+Ds6acf0q2or4wX1E=; b=d6DFYLvNxcVb9HQ52+gZtsbQantxbFY2uBBLuVtvVv1fNyNnKP3pv7BUkZaIOAwstl88pB z442TEByHHbJOjYpWazOfywoEJ/yKZMXeeBrDeST5froskRjNYx3FXOrYcu37Pa0xeJbf7 WAHJEpGPfQbYlbUxsLxDxOjshxI8ROc= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-342-tXlBojs3O2q-mgWMiMDFEA-1; Wed, 28 Jun 2023 14:05:59 -0400 X-MC-Unique: tXlBojs3O2q-mgWMiMDFEA-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2b69c26daeeso1142071fa.0 for ; Wed, 28 Jun 2023 11:05:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687975558; x=1690567558; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6KKc/+Dc2GT9hl2obw259tAdh7+Ds6acf0q2or4wX1E=; b=IjgcVTvc3QOWnExVW+PhI93RlZ7kerMJllEtRiEAtEsBvDDqI9OCS7BjdYbQX8cBXR SV7WcqXpxOP3oVb791Ucq1y3xAlu3cQHWWUTpiC+4oZ9WWmxU+He6Dkov1X3UzO6H6ES Bc2gr1ewN4O0LNpzQRIEgaM5tRsL0Ggd+8LBgDwH766CD8cVK6UwXOOt8vGbApFeUwB7 81D9QZ3TwL0ZEG7TMC6tS1EIJ1o7lTUXZu8Iz1wYmTe7xFMwOCqIbhH9ttQg6gY/RtRb D38k11mgS5zcNcAfWCdCwJSwt75a3kgmdtjsvNNFcTEXHoE+Ls6UkGuB0FufiTLpyhaR JGRw== X-Gm-Message-State: AC+VfDzPtNsMYP+do6CiDUDkWR8bnYt92Yj/vW73RkY3hl31FJFSgATg vWPCpsONrgmxulMzqU1qqoulRVYAAceJUwOa/KD8qu5QzCgY8nDLGm9P37YI+fnbttA5eXypVXR tdzmLHqZ2PpzrKli0afhYVkyh7wmzHSADK4+lYfvutQ== X-Received: by 2002:a05:651c:2314:b0:2b6:9ebc:d8cb with SMTP id bi20-20020a05651c231400b002b69ebcd8cbmr799505ljb.23.1687975558314; Wed, 28 Jun 2023 11:05:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yix8ge3qQ6GI+zuDxlJNqhPvLncrjrFpCgv1+hGZKigckj5WxCc8CEUsyGgnXZq6HAAPdIoajyX9fwbPBHBo= X-Received: by 2002:a05:651c:2314:b0:2b6:9ebc:d8cb with SMTP id bi20-20020a05651c231400b002b69ebcd8cbmr799499ljb.23.1687975557955; Wed, 28 Jun 2023 11:05:57 -0700 (PDT) MIME-Version: 1.0 References: <20230628155703.2948377-1-tromey@adacore.com> In-Reply-To: <20230628155703.2948377-1-tromey@adacore.com> From: Jonathan Wakely Date: Wed, 28 Jun 2023 19:05:46 +0100 Message-ID: Subject: Re: [PATCH] Relax type-printer regexp in libstdc++ test suite To: Tom Tromey Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="0000000000008658dc05ff346ff5" X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000008658dc05ff346ff5 Content-Type: text/plain; charset="UTF-8" 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 > > --0000000000008658dc05ff346ff5--