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.129.124]) by sourceware.org (Postfix) with ESMTPS id 04281385828D for ; Tue, 20 Jun 2023 17:21:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 04281385828D 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=1687281683; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CQKW/yyRt7KacTD1880ymA7jfJWuXPj1o0UW11AmNXY=; b=EPGy1qWEhYKJY6kj4XPUzzOb8r9a2VCe7tvgssxa4WkcLwBgTUhKB8HoHu2B8I7I9PXDn4 ZKrsyuQ+y+Qz6DLbQzJs1T6sqwKiGzC8+F1cJH+73sGIMOOGS58fORaTAonIg1eFGfM0OR KEKXZMWn8A0k6uRoWbsXmletTCm/fYI= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-593-AucsZmLOOVCzeGokXccp5g-1; Tue, 20 Jun 2023 13:21:21 -0400 X-MC-Unique: AucsZmLOOVCzeGokXccp5g-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-62ff97aec4bso35459266d6.1 for ; Tue, 20 Jun 2023 10:21:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687281680; x=1689873680; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CQKW/yyRt7KacTD1880ymA7jfJWuXPj1o0UW11AmNXY=; b=k/yTSreaf6N2Tnd5MKfdB8CR3JG7YAvL0jzzHZ+WC12s3kcKoYW8qv7jGwbUGLkiGj AJ/7lA+prCPYJ2Cwghd+h5aVRlTuz+QljlAZ0GoR/hELXuD5wukYBGrE099oLCvjNCrC hdhzenetZcZp2qVOc42uIkCOrRsAO3CXSsgHLTUsWrtxlS5HfzXncH03JEaPqUBh6uyr QfOhWltm4dkcPC9sw9VrLHZF4t0Y7HfvkFUiZ7fzs4gpxSrfIvNmX+z0h0E3UsY1hhEa meA3N4jl01Fo+omT66v9U6qfBzq+CT3uMUzmiMSt0rraXmUQ+4GXJxi6D+v5DsQAi20v 7HoA== X-Gm-Message-State: AC+VfDwSX2UoDaGDcqfUAWwmiFzEpTlh0575JBQROmyI/Nrll/T1CiQs k0QjlC2Ox+yybCEyjfyfKq4mu6weKrCvsqPA0P+1JN7PSyokINyPLHIfj1Vd45KkQzaV64Waq/j eWdyUwGOYXIEKlax5VWIVJVL0uOpT5siflTLwRVx95ti0K3szMlxBKsOneY2ZKEuL6WeNkmpR3U qmYQ== X-Received: by 2002:a05:6214:1c0a:b0:62d:ddeb:3770 with SMTP id u10-20020a0562141c0a00b0062dddeb3770mr19382420qvc.0.1687281680207; Tue, 20 Jun 2023 10:21:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WoNHocCr09NCBVhPFbz5q33rP2ykmK6CTS7Cm0I7ym38x2UutzZsPY2GDgQ1bjX/egBgSgA== X-Received: by 2002:a05:6214:1c0a:b0:62d:ddeb:3770 with SMTP id u10-20020a0562141c0a00b0062dddeb3770mr19382395qvc.0.1687281679835; Tue, 20 Jun 2023 10:21:19 -0700 (PDT) Received: from t14s.localdomain (c-76-28-97-5.hsd1.ma.comcast.net. [76.28.97.5]) by smtp.gmail.com with ESMTPSA id k14-20020a0cf58e000000b006300722883fsm1470678qvm.33.2023.06.20.10.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 10:21:19 -0700 (PDT) Message-ID: <49c4907267894bc85f1227693ecfa663a4d820d5.camel@redhat.com> Subject: PING^2: Re: [PATCH 1/3] testsuite: move handle-multiline-outputs to before check for blank lines From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump Date: Tue, 20 Jun 2023 13:21:18 -0400 In-Reply-To: <597669a9e530048508052785128f976cddfbd7fd.camel@redhat.com> References: <20230531180630.3127108-1-dmalcolm@redhat.com> <20230531180630.3127108-2-dmalcolm@redhat.com> <597669a9e530048508052785128f976cddfbd7fd.camel@redhat.com> User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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 List-Id: Does this testsuite patch look OK? https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620275.html Thanks David On Mon, 2023-06-12 at 19:11 -0400, David Malcolm wrote: > Please can someone review this testsuite patch: > =C2=A0 https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620275.html >=20 > Thanks > Dave >=20 > On Wed, 2023-05-31 at 14:06 -0400, David Malcolm wrote: > > I have followup patches that require checking for multiline > > patterns > > that have blank lines within them, so this moves the handling of > > multiline patterns before the check for blank lines, allowing for > > such > > multiline patterns. > >=20 > > Doing so uncovers some issues with existing multiline directives, > > which > > the patch fixes. > >=20 > > gcc/testsuite/ChangeLog: > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* c-c++-common/Wlogical= -not-parentheses-2.c: Split up the > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0multiline directive. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* gcc.dg/analyzer/mallo= c-macro-inline-events.c: Remove > > redundant > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dg-regexp directives. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* gcc.dg/missing-header= -fixit-5.c: Split up the multiline > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0directives. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* lib/gcc-dg.exp (gcc-d= g-prune): Move call to > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0handle-multiline-output= s from prune_gcc_output to here. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* lib/multiline.exp (dg= -end-multiline-output): Move call to > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0maybe-handle-nn-line-nu= mbers from prune_gcc_output to here. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* lib/prune.exp (prune_= gcc_output): Move calls to > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0maybe-handle-nn-line-nu= mbers and handle-multiline-outputs > > from > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0here to the above. > > --- > > =C2=A0.../c-c++-common/Wlogical-not-parentheses-2.c=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 2 ++ > > =C2=A0.../gcc.dg/analyzer/malloc-macro-inline-events.c=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 |=C2=A0 5 ----- > > =C2=A0gcc/testsuite/gcc.dg/missing-header-fixit-5.c=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 10 > > ++++++++-- > > =C2=A0gcc/testsuite/lib/gcc-dg.exp=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 5 +++++ > > =C2=A0gcc/testsuite/lib/multiline.exp=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 7 > > ++++++- > > =C2=A0gcc/testsuite/lib/prune.exp=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 7 ------ > > - > > =C2=A06 files changed, 21 insertions(+), 15 deletions(-) > >=20 > > diff --git a/gcc/testsuite/c-c++-common/Wlogical-not-parentheses- > > 2.c > > b/gcc/testsuite/c-c++-common/Wlogical-not-parentheses-2.c > > index ba8dce84f5d..2d9382014c4 100644 > > --- a/gcc/testsuite/c-c++-common/Wlogical-not-parentheses-2.c > > +++ b/gcc/testsuite/c-c++-common/Wlogical-not-parentheses-2.c > > @@ -12,6 +12,8 @@ foo (int aaa, int bbb) > > =C2=A0/* { dg-begin-multiline-output "" } > > =C2=A0=C2=A0=C2=A0 r +=3D !aaa =3D=3D bbb; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ^~ > > +=C2=A0=C2=A0 { dg-end-multiline-output "" } */ > > +/* { dg-begin-multiline-output "" } > > =C2=A0=C2=A0=C2=A0 r +=3D !aaa =3D=3D bbb; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (=C2=A0=C2=A0 ) > > diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-macro-inline- > > events.c b/gcc/testsuite/gcc.dg/analyzer/malloc-macro-inline- > > events.c > > index f08aee626a5..9134bb4781e 100644 > > --- a/gcc/testsuite/gcc.dg/analyzer/malloc-macro-inline-events.c > > +++ b/gcc/testsuite/gcc.dg/analyzer/malloc-macro-inline-events.c > > @@ -12,11 +12,6 @@ int test (void *ptr) > > =C2=A0=C2=A0 WRAPPED_FREE (ptr); /* { dg-message "in expansion of macro > > 'WRAPPED_FREE'" } */ > > =C2=A0=C2=A0 WRAPPED_FREE (ptr); /* { dg-message "in expansion of macro > > 'WRAPPED_FREE'" } */ > > =C2=A0 > > -=C2=A0 /* Erase the spans indicating the header file > > -=C2=A0=C2=A0=C2=A0=C2=A0 (to avoid embedding path assumptions).=C2=A0 = */ > > -=C2=A0 /* { dg-regexp "\[^|\]+/malloc-macro.h:\[0-9\]+:\[0-9\]+:" } */ > > -=C2=A0 /* { dg-regexp "\[^|\]+/malloc-macro.h:\[0-9\]+:\[0-9\]+:" } */ > > - > > =C2=A0=C2=A0 /* { dg-begin-multiline-output "" } > > =C2=A0=C2=A0=C2=A0 NN | #define WRAPPED_FREE(PTR) free(PTR) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~~~ > > diff --git a/gcc/testsuite/gcc.dg/missing-header-fixit-5.c > > b/gcc/testsuite/gcc.dg/missing-header-fixit-5.c > > index 916033c689c..bf44feb24a9 100644 > > --- a/gcc/testsuite/gcc.dg/missing-header-fixit-5.c > > +++ b/gcc/testsuite/gcc.dg/missing-header-fixit-5.c > > @@ -12,14 +12,18 @@ foo (char *m, int i) > > =C2=A0=C2=A0 /* { dg-begin-multiline-output "" } > > =C2=A0=C2=A0=C2=A0 11 |=C2=A0=C2=A0 if (isdigit (m[0])) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 ^~~~~~~ > > +=C2=A0=C2=A0=C2=A0=C2=A0 { dg-end-multiline-output "" } */ > > +=C2=A0 /* { dg-begin-multiline-output "" } > > =C2=A0=C2=A0 +++ |+#include > > =C2=A0=C2=A0=C2=A0=C2=A0 1 |=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { dg-end-multiline-output "" } */ > > =C2=A0=C2=A0=C2=A0=C2=A0 { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return abs (i); /* { dg-warning "i= mplicit declaration of > > function" } */ > > =C2=A0=C2=A0 /* { dg-begin-multiline-output "" } > > -=C2=A0=C2=A0 19 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return abs (i); > > +=C2=A0=C2=A0 21 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return abs (i); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~ > > +=C2=A0=C2=A0=C2=A0=C2=A0 { dg-end-multiline-output "" } */ > > +=C2=A0 /* { dg-begin-multiline-output "" } > > =C2=A0=C2=A0 +++ |+#include > > =C2=A0=C2=A0=C2=A0=C2=A0 1 |=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { dg-end-multiline-output "" } */ > > @@ -27,8 +31,10 @@ foo (char *m, int i) > > =C2=A0=C2=A0 else > > =C2=A0=C2=A0=C2=A0=C2=A0 putchar (m[0]); /* { dg-warning "implicit decl= aration of > > function" } */ > > =C2=A0=C2=A0 /* { dg-begin-multiline-output "" } > > -=C2=A0=C2=A0 28 |=C2=A0=C2=A0=C2=A0=C2=A0 putchar (m[0]); > > +=C2=A0=C2=A0 32 |=C2=A0=C2=A0=C2=A0=C2=A0 putchar (m[0]); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~ > > +=C2=A0=C2=A0=C2=A0=C2=A0 { dg-end-multiline-output "" } */ > > +=C2=A0 /* { dg-begin-multiline-output "" } > > =C2=A0=C2=A0 +++ |+#include > > =C2=A0=C2=A0=C2=A0=C2=A0 1 |=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { dg-end-multiline-output "" } */ > > diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc- > > dg.exp > > index 4ed4233efff..6475cab46de 100644 > > --- a/gcc/testsuite/lib/gcc-dg.exp > > +++ b/gcc/testsuite/lib/gcc-dg.exp > > @@ -364,6 +364,11 @@ proc gcc-dg-prune { system text } { > > =C2=A0=C2=A0=C2=A0=C2=A0 # Always remember to clear it in .exp file aft= er executed all > > tests. > > =C2=A0=C2=A0=C2=A0=C2=A0 global dg_runtest_extra_prunes > > =C2=A0 > > +=C2=A0=C2=A0=C2=A0 # Call into multiline.exp to handle any multiline o= utput > > directives. > > +=C2=A0=C2=A0=C2=A0 # This is done before the check for blank lines so = that > > multiline > > +=C2=A0=C2=A0=C2=A0 # output directives can have blank lines within the= m. > > +=C2=A0=C2=A0=C2=A0 set text [handle-multiline-outputs $text] > > + > > =C2=A0=C2=A0=C2=A0=C2=A0 # Complain about blank lines in the output (PR= other/69006) > > =C2=A0=C2=A0=C2=A0=C2=A0 global allow_blank_lines > > =C2=A0=C2=A0=C2=A0=C2=A0 if { !$allow_blank_lines } { > > diff --git a/gcc/testsuite/lib/multiline.exp > > b/gcc/testsuite/lib/multiline.exp > > index 73621a0bdbd..4c25bb76f43 100644 > > --- a/gcc/testsuite/lib/multiline.exp > > +++ b/gcc/testsuite/lib/multiline.exp > > @@ -139,7 +139,7 @@ proc dg-end-multiline-output { args } { > > =C2=A0=C2=A0=C2=A0=C2=A0 verbose "within dg-end-multiline-output: > > multiline_expected_outputs: $multiline_expected_outputs" 3 > > =C2=A0} > > =C2=A0 > > -# Hook to be called by prune.exp's prune_gcc_output to > > +# Hook to be called by gcc-dg.exp's gcc-dg-prune to > > =C2=A0# look for the expected multiline outputs, pruning them, > > =C2=A0# reporting PASS for those that are found, and FAIL for > > =C2=A0# those that weren't found. > > @@ -149,6 +149,11 @@ proc dg-end-multiline-output { args } { > > =C2=A0proc handle-multiline-outputs { text } { > > =C2=A0=C2=A0=C2=A0=C2=A0 global multiline_expected_outputs > > =C2=A0=C2=A0=C2=A0=C2=A0 global testname_with_flags > > + > > +=C2=A0=C2=A0=C2=A0 # If dg-enable-nn-line-numbers was provided, then o= bscure > > source-margin > > +=C2=A0=C2=A0=C2=A0 # line numbers by converting them to "NN" form. > > +=C2=A0=C2=A0=C2=A0 set text [maybe-handle-nn-line-numbers $text] > > +=C2=A0=C2=A0=C2=A0=20 > > =C2=A0=C2=A0=C2=A0=C2=A0 set index 0 > > =C2=A0=C2=A0=C2=A0=C2=A0 foreach entry $multiline_expected_outputs { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0verbose "=C2=A0 entry: = $entry" 3 > > diff --git a/gcc/testsuite/lib/prune.exp > > b/gcc/testsuite/lib/prune.exp > > index cfe427c99ac..8d37b24e59b 100644 > > --- a/gcc/testsuite/lib/prune.exp > > +++ b/gcc/testsuite/lib/prune.exp > > @@ -108,13 +108,6 @@ proc prune_gcc_output { text } { > > =C2=A0=C2=A0=C2=A0=C2=A0 # Many tests that use visibility will still pa= ss on platforms > > that don't support it. > > =C2=A0=C2=A0=C2=A0=C2=A0 regsub -all "(^|\n)\[^\n\]*lto1: warning: visi= bility attribute > > not supported in this configuration; ignored\[^\n\]*" $text "" text > > =C2=A0 > > -=C2=A0=C2=A0=C2=A0 # If dg-enable-nn-line-numbers was provided, then o= bscure > > source-margin > > -=C2=A0=C2=A0=C2=A0 # line numbers by converting them to "NN" form. > > -=C2=A0=C2=A0=C2=A0 set text [maybe-handle-nn-line-numbers $text] > > -=C2=A0=C2=A0=C2=A0=20 > > -=C2=A0=C2=A0=C2=A0 # Call into multiline.exp to handle any multiline o= utput > > directives. > > -=C2=A0=C2=A0=C2=A0 set text [handle-multiline-outputs $text] > > - > > =C2=A0=C2=A0=C2=A0=C2=A0 #send_user "After:$text\n" > > =C2=A0 > > =C2=A0=C2=A0=C2=A0=C2=A0 return $text >=20