diff mbox series

Fix dg-prune-output regex for versioned namespace

Message ID 0ebfc100-c444-410c-0faa-b8dd9a9a2de8@gmail.com
State New
Headers show
Series Fix dg-prune-output regex for versioned namespace | expand

Commit Message

François Dumont Oct. 24, 2018, 7:30 p.m. UTC
Some tests dg-prune-output regex need to be adapted to pass when 
versioned namespace is activated.

I preferred to add the version namespace in the regex rather than 
removing namespace qualification. Let me know if you would prefer the 
other approach.

     * testsuite/23_containers/deque/48101_neg.cc: Add optional version
     namespace in dg-prune-output regex.
     * testsuite/23_containers/vector/48101_neg.cc: Likewise.
     * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.

Tested under Linux x86_64 with and without versioned namespace.

Ok to commit ?

François

Comments

Jonathan Wakely Oct. 25, 2018, 11:16 a.m. UTC | #1
On 24/10/18 21:30 +0200, François Dumont wrote:
>Some tests dg-prune-output regex need to be adapted to pass when 
>versioned namespace is activated.
>
>I preferred to add the version namespace in the regex rather than 
>removing namespace qualification. Let me know if you would prefer the 
>other approach.
>
>    * testsuite/23_containers/deque/48101_neg.cc: Add optional version
>    namespace in dg-prune-output regex.
>    * testsuite/23_containers/vector/48101_neg.cc: Likewise.
>    * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
>
>Tested under Linux x86_64 with and without versioned namespace.
>
>Ok to commit ?

We can just simplify them instead of making them more complicated.

>François
>

>diff --git a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
>index 1f9e3e3b932..6f5a648e059 100644
>--- a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
>+++ b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
>@@ -26,5 +26,5 @@ test01()
> }
> 
> // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 }
>-// { dg-prune-output "std::allocator<.* has no member named " }
>+// { dg-prune-output "std::(__8::)?allocator<.* has no member named " }

Please just use "::allocator<.* has no member named "


> // { dg-prune-output "must have the same value_type as its allocator" }
>diff --git a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
>index 620170d0a15..709fc7e1649 100644
>--- a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
>+++ b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
>@@ -26,5 +26,5 @@ test01()
> }
> 
> // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 }
>-// { dg-prune-output "std::allocator<.* has no member named " }
>+// { dg-prune-output "std::(__8::)?allocator<.* has no member named " }

Same here.

> // { dg-prune-output "must have the same value_type as its allocator" }
>diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
>index b9a1235e1fe..72eedf50d21 100644
>--- a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
>+++ b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
>@@ -32,4 +32,4 @@ void foo(std::iostream& s) {
>   s << p; // { dg-error "no match" }
>   s >> p; // { dg-error "no match" }
> }
>-// { dg-prune-output "no type .* std::enable_if" }
>+// { dg-prune-output "no type .* std::(__8::)?enable_if" }

And just "no type .*::enable_if" here.
François Dumont Oct. 28, 2018, 9:04 p.m. UTC | #2
On 10/25/18 1:16 PM, Jonathan Wakely wrote:
> On 24/10/18 21:30 +0200, François Dumont wrote:
>> Some tests dg-prune-output regex need to be adapted to pass when 
>> versioned namespace is activated.
>>
>> I preferred to add the version namespace in the regex rather than 
>> removing namespace qualification. Let me know if you would prefer the 
>> other approach.
>>
>>     * testsuite/23_containers/deque/48101_neg.cc: Add optional version
>>     namespace in dg-prune-output regex.
>>     * testsuite/23_containers/vector/48101_neg.cc: Likewise.
>>     * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
>>
>> Tested under Linux x86_64 with and without versioned namespace.
>>
>> Ok to commit ?
>
> We can just simplify them instead of making them more complicated.

Yes we can, I even proposed it.

So I took it for an ok and after checking your proposal with versioned 
namespace enabled and disabled I comitted it.

     * testsuite/23_containers/deque/48101_neg.cc: Remove dg-prune-output
     'std' from regex pattern for versioned namespace compatibility.
     * testsuite/23_containers/vector/48101_neg.cc: Likewise.
     * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.

François
diff --git a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
index 1f9e3e3b932..5d59f593c41 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
@@ -26,5 +26,5 @@ test01()
 }
 
 // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 }
-// { dg-prune-output "std::allocator<.* has no member named " }
+// { dg-prune-output "::allocator<.* has no member named " }
 // { dg-prune-output "must have the same value_type as its allocator" }
diff --git a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
index 620170d0a15..89eb62617e5 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
@@ -26,5 +26,5 @@ test01()
 }
 
 // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 }
-// { dg-prune-output "std::allocator<.* has no member named " }
+// { dg-prune-output "::allocator<.* has no member named " }
 // { dg-prune-output "must have the same value_type as its allocator" }
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
index b9a1235e1fe..b1fb13a0dcf 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
@@ -32,4 +32,4 @@ void foo(std::iostream& s) {
   s << p; // { dg-error "no match" }
   s >> p; // { dg-error "no match" }
 }
-// { dg-prune-output "no type .* std::enable_if" }
+// { dg-prune-output "no type .*enable_if" }
diff mbox series

Patch

diff --git a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
index 1f9e3e3b932..6f5a648e059 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc
@@ -26,5 +26,5 @@  test01()
 }
 
 // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 }
-// { dg-prune-output "std::allocator<.* has no member named " }
+// { dg-prune-output "std::(__8::)?allocator<.* has no member named " }
 // { dg-prune-output "must have the same value_type as its allocator" }
diff --git a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
index 620170d0a15..709fc7e1649 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc
@@ -26,5 +26,5 @@  test01()
 }
 
 // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 }
-// { dg-prune-output "std::allocator<.* has no member named " }
+// { dg-prune-output "std::(__8::)?allocator<.* has no member named " }
 // { dg-prune-output "must have the same value_type as its allocator" }
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
index b9a1235e1fe..72eedf50d21 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/path/io/dr2989.cc
@@ -32,4 +32,4 @@  void foo(std::iostream& s) {
   s << p; // { dg-error "no match" }
   s >> p; // { dg-error "no match" }
 }
-// { dg-prune-output "no type .* std::enable_if" }
+// { dg-prune-output "no type .* std::(__8::)?enable_if" }