diff mbox series

libstdc++/testsuite: Tweak dg-prune-output regex for out-of-tree contexts

Message ID 5A82B8CE-AF5B-462F-A70D-3AE7F535509B@adacore.com
State New
Headers show
Series libstdc++/testsuite: Tweak dg-prune-output regex for out-of-tree contexts | expand

Commit Message

Olivier Hainque Dec. 18, 2020, 9:06 p.m. UTC
Hello,

This patch is a proposal to update the dg-prune-output
regex in 20_util/bind/ref_neg.cc to account for possible
extra subdirs of include/ before reaching "functional"
in out-of-build-tree test runs (c++/10.2.1 in our case).

I noticed only afterwards that many other tests seem to
have adopted a simpler
 
  // { dg-prune-output "include" }

Not entirely sure this would be appropriate here as well.

This variant cures the failures we saw when running tests
from our gcc-10 installed toolchain and I verified that the
test still passes from a build tree on mainline, x86_64-linux
host in both cases.

Is this ok to commit ?

Thanks in advance,

Olivier


2020-12-18  Olivier Hainque  <hainque@adacore.com>

libstdc++-v3/

        * testsuite/20_util/bind/ref_neg.cc: Account for
	out-of-build-tree contexts in the dg-prune-output
	regexp.
From 8ca4da2b492417752ab1fa7b86b75208ea17adc1 Mon Sep 17 00:00:00 2001
From: Olivier Hainque <hainque@adacore.com>
Date: Fri, 18 Dec 2020 18:09:21 +0000
Subject: [PATCH] Tweak dg-prune-output regex for out-of-tree contexts

libstdc++-v3/

	* testsuite/20_util/bind/ref_neg.cc: Tweak
	dg-prune-output regex for out-of-tree contexts.
---
 libstdc++-v3/testsuite/20_util/bind/ref_neg.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jonathan Wakely Dec. 18, 2020, 10:24 p.m. UTC | #1
On 18/12/20 22:06 +0100, Olivier Hainque wrote:
>Hello,
>
>This patch is a proposal to update the dg-prune-output
>regex in 20_util/bind/ref_neg.cc to account for possible
>extra subdirs of include/ before reaching "functional"
>in out-of-build-tree test runs (c++/10.2.1 in our case).
>
>I noticed only afterwards that many other tests seem to
>have adopted a simpler
>
>  // { dg-prune-output "include" }
>
>Not entirely sure this would be appropriate here as well.
>
>This variant cures the failures we saw when running tests
>from our gcc-10 installed toolchain and I verified that the
>test still passes from a build tree on mainline, x86_64-linux
>host in both cases.
>
>Is this ok to commit ?

Yes, OK, although I wonder if this would be better:

{ dg-prune-output "/(functional|bits/invoke.h):" }
Olivier Hainque Dec. 21, 2020, 10:57 a.m. UTC | #2
Thanks for your prompt feedback on this Jonathan.

> On 18 Dec 2020, at 23:24, Jonathan Wakely <jwakely@redhat.com> wrote:
> 
>> Is this ok to commit ?
> 
> Yes, OK, although I wonder if this would be better:
> 
> { dg-prune-output "/(functional|bits/invoke.h):" }

Probably more robust, I agree. This still works
both with build tree (tested on mainline) and install
tree (tested on our gcc-10 branch).

Same ChangeLog.

Olivier
From fe8db9fe481fe705400b1366a8709f7048418c7f Mon Sep 17 00:00:00 2001
From: Olivier Hainque <hainque@adacore.com>
Date: Fri, 18 Dec 2020 18:09:21 +0000
Subject: [PATCH] Tweak dg-prune-output regex for out-of-tree contexts

libstdc++-v3/

	* testsuite/20_util/bind/ref_neg.cc: Tweak the
	dg-prune-output regex for out-of-build-tree contexts.
---
 libstdc++-v3/testsuite/20_util/bind/ref_neg.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
index d77ad90cc253..cc392b63a466 100644
--- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
@@ -49,7 +49,8 @@ void test02()
 }
 
 // Ignore the reasons for deduction/substitution failure in the headers.
-// { dg-prune-output "/include/(functional|bits/invoke.h):" }
+// Arrange for the match to work on installed trees as well as build trees.
+// { dg-prune-output "/(functional|bits/invoke.h):" }
 
 int main()
 {
Jonathan Wakely Dec. 21, 2020, 11:40 a.m. UTC | #3
On 21/12/20 11:57 +0100, Olivier Hainque wrote:
>Thanks for your prompt feedback on this Jonathan.
>
>> On 18 Dec 2020, at 23:24, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>>> Is this ok to commit ?
>>
>> Yes, OK, although I wonder if this would be better:
>>
>> { dg-prune-output "/(functional|bits/invoke.h):" }
>
>Probably more robust, I agree. This still works
>both with build tree (tested on mainline) and install
>tree (tested on our gcc-10 branch).
>
>Same ChangeLog.

OK to commit like that then, thanks.


>From fe8db9fe481fe705400b1366a8709f7048418c7f Mon Sep 17 00:00:00 2001
>From: Olivier Hainque <hainque@adacore.com>
>Date: Fri, 18 Dec 2020 18:09:21 +0000
>Subject: [PATCH] Tweak dg-prune-output regex for out-of-tree contexts
>
>libstdc++-v3/
>
>	* testsuite/20_util/bind/ref_neg.cc: Tweak the
>	dg-prune-output regex for out-of-build-tree contexts.
>---
> libstdc++-v3/testsuite/20_util/bind/ref_neg.cc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
>index d77ad90cc253..cc392b63a466 100644
>--- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
>+++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
>@@ -49,7 +49,8 @@ void test02()
> }
>
> // Ignore the reasons for deduction/substitution failure in the headers.
>-// { dg-prune-output "/include/(functional|bits/invoke.h):" }
>+// Arrange for the match to work on installed trees as well as build trees.
>+// { dg-prune-output "/(functional|bits/invoke.h):" }
>
> int main()
> {
>-- 
>2.17.1
>

>
>
>
>
Olivier Hainque Dec. 22, 2020, 10:07 a.m. UTC | #4
> On 21 Dec 2020, at 12:40, Jonathan Wakely <jwakely@redhat.com> wrote:

>> Probably more robust, I agree. This still works
>> both with build tree (tested on mainline) and install
>> tree (tested on our gcc-10 branch).
>> 
>> Same ChangeLog.
> 
> OK to commit like that then, thanks.

Sure, will do. Thanks for your feedback,

Cheers,

Olivier
diff mbox series

Patch

diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
index d77ad90cc253..bf9d3c0b3145 100644
--- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
@@ -49,7 +49,8 @@  void test02()
 }
 
 // Ignore the reasons for deduction/substitution failure in the headers.
-// { dg-prune-output "/include/(functional|bits/invoke.h):" }
+// Account for possible extra subdirs in out-of-tree test runs.
+// { dg-prune-output "/include/(c../\[0-9.\]*/)?(functional|bits/invoke.h):" }
 
 int main()
 {