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 DCF323858D20 for ; Mon, 12 Jun 2023 23:11:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DCF323858D20 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=1686611493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/UE2VpIId/LfKdGY1JboAWf0hHk5cfnxselrqOZVSME=; b=GrMUDv2yu0nOIH+ttR7SsbPprInuWDs4m4lsO8VjKzJSy3cloNZqXxs1AImjG+rdls3Z0+ brLP2Jd6itSDC7X+i5Z4XJ0p7JyxeQvwpju7itJDAoK3Q5j8Rx1uGRU1YRfHY1/9n10W+F We9uM5trGnXpmcSRA2yEp0q4v/YxcbY= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-PTDUT4RYNH27FP4sjXC6YQ-1; Mon, 12 Jun 2023 19:11:31 -0400 X-MC-Unique: PTDUT4RYNH27FP4sjXC6YQ-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-3f9a6c18c34so5730051cf.3 for ; Mon, 12 Jun 2023 16:11:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686611491; x=1689203491; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/UE2VpIId/LfKdGY1JboAWf0hHk5cfnxselrqOZVSME=; b=I0PA14RCWwynSsO9MWAu9z1MvsCvMVcGSZpu87Shct5nqyFz03eWUk9G9GBWWi45TV nSnZh4tehpRyvHs2D39L+YcglCFqIorVHbMIUWD74U4pmUsbIwQ+6Sou1UhuoBvZlIDX zTp/ngCt3Mol884LJ+E/xY5QGACeX4Pxufi3T8jNigVp5jALgTFLS8dn4f4L1el0zrG9 2SpV338Wn270B2/AuQYNKn7pAFneWiV9W6iGl8Pmp30OHUUu4YV1dGkv5vYh2O6vvCiP FFKQ7plmjU6QntlqirvmA/8YNLAV78FC5G793GBmqYDkrEv7gUJwKlPVk/AJYfj/AL5E Citw== X-Gm-Message-State: AC+VfDxl9HpslzXa6751E4W/fFK9fQI6jdQ86yo5wEsMwb8HVzGF4Myj q8oZp+kvmiv7K6ho+uPWZL2N9zhIPrzitG2YyQrI8zvIfG1WFQkprC8Tzhcj5k5Phv6gcFEgSoW hJmwOHvduml+ebnThmDCBenBXoMKW//NZ7DwrnjjRa3HvKag7QMIyRS5TyRPZtMS4K5h8wfYyb4 7Qlg== X-Received: by 2002:ac8:7d96:0:b0:3f6:b713:f3d7 with SMTP id c22-20020ac87d96000000b003f6b713f3d7mr16897464qtd.31.1686611490797; Mon, 12 Jun 2023 16:11:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4sJZa+a6xRrLYrh5l55gZkUlNn4SQ4W3k2H2khvv64zgyjBsbfolICWmm9Jac5XK+Ekmn6bg== X-Received: by 2002:ac8:7d96:0:b0:3f6:b713:f3d7 with SMTP id c22-20020ac87d96000000b003f6b713f3d7mr16897440qtd.31.1686611490402; Mon, 12 Jun 2023 16:11:30 -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 i1-20020ac85c01000000b003fb6cd74482sm109595qti.50.2023.06.12.16.11.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 16:11:30 -0700 (PDT) Message-ID: <597669a9e530048508052785128f976cddfbd7fd.camel@redhat.com> Subject: PING: Re: [PATCH 1/3] testsuite: move handle-multiline-outputs to before check for blank lines From: David Malcolm To: gcc-patches@gcc.gnu.org Date: Mon, 12 Jun 2023 19:11:28 -0400 In-Reply-To: <20230531180630.3127108-2-dmalcolm@redhat.com> References: <20230531180630.3127108-1-dmalcolm@redhat.com> <20230531180630.3127108-2-dmalcolm@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,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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: Please can someone review this testsuite patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620275.html Thanks Dave 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-n= ot-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/malloc-= 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-f= ixit-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-dg-= prune): Move call to > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0handle-multiline-outputs = 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-e= nd-multiline-output): Move call to > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0maybe-handle-nn-line-numb= ers 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_gc= c_output): Move calls to > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0maybe-handle-nn-line-numb= ers 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 "imp= licit 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 declar= ation 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 after= 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 out= put > directives. > +=C2=A0=C2=A0=C2=A0 # This is done before the check for blank lines so th= at > multiline > +=C2=A0=C2=A0=C2=A0 # output directives can have blank lines within them. > +=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 o= ther/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 obs= cure > 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: $e= ntry" 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 pass= on platforms > that don't support it. > =C2=A0=C2=A0=C2=A0=C2=A0 regsub -all "(^|\n)\[^\n\]*lto1: warning: visibi= lity 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 obs= cure > 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 out= put > 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