diff mbox series

[committed] Make test names unique for a couple of goacc tests

Message ID 507c210a-e2f2-903a-bc01-8415ac7cef99@gmail.com
State Committed
Commit f75b237254f32d5be32c9d9610983b777abea633
Headers show
Series [committed] Make test names unique for a couple of goacc tests | expand

Commit Message

Jeff Law Sept. 19, 2021, 5:35 p.m. UTC
A couple of goacc tests do not have unique names.  This causes problems 
for the test comparison script when one of the test passes and the other 
fails -- in this scenario the test comparison script claims there is a 
regression.

This slipped through for a while because I had turned off x86_64 testing 
(others test it regularly and I was revamping the tester's hardware 
requirements).  Now that I've acquired more x86_64 resources and turned 
on native x86 testing again, it's been flagged.

This patch just adds a numeric suffix to the TODO string to disambiguate 
them.

Committed to the trunk,
Jeff
commit f75b237254f32d5be32c9d9610983b777abea633
Author: Jeff Law <jeffreyalaw@gmail.com>
Date:   Sun Sep 19 13:31:32 2021 -0400

    [committed] Make test names unique for a couple of goacc tests
    
    gcc/testsuite
            * gfortran.dg/goacc/privatization-1-compute.f90: Make test names
            unique.
            * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f:
            Likewise.

Comments

Thomas Schwinge Sept. 22, 2021, 11:03 a.m. UTC | #1
Hi!

On 2021-09-19T11:35:00-0600, Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> A couple of goacc tests do not have unique names.

Thanks for fixing this up, and sorry, largely my "fault", I suppose.  ;-|

> This causes problems
> for the test comparison script when one of the test passes and the other
> fails -- in this scenario the test comparison script claims there is a
> regression.

So I understand correctly that this is a problem not just for actual
mixed PASS vs. FAIL (which we'd like you to report anyway!) that appear
for the same line, but also for mixed PASS vs. XFAIL?  (Because, the
latter appears to be what you're addressing with your commit here.)

> This slipped through for a while because I had turned off x86_64 testing
> (others test it regularly and I was revamping the tester's hardware
> requirements).  Now that I've acquired more x86_64 resources and turned
> on native x86 testing again, it's been flagged.

(I don't follow that argument -- these test cases should be all generic?
Anyway, not important, I guess.)

> This patch just adds a numeric suffix to the TODO string to disambiguate
> them.

So, instead of doing this manually (always error-prone!), like you've...

> Committed to the trunk,

> commit f75b237254f32d5be32c9d9610983b777abea633
> Author: Jeff Law <jeffreyalaw@gmail.com>
> Date:   Sun Sep 19 13:31:32 2021 -0400
>
>     [committed] Make test names unique for a couple of goacc tests

> --- a/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
> +++ b/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
> @@ -39,9 +39,9 @@ contains
>            !$acc atomic write ! ... to force 'TREE_ADDRESSABLE'.
>            y = a
>      !$acc end parallel
> -    ! { dg-note {variable 'i' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compute$c_compute }
> -    ! { dg-note {variable 'j' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compute$c_compute }
> -    ! { dg-note {variable 'a' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compute$c_compute }
> +    ! { dg-note {variable 'i' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO2" { xfail *-*-* } l_compute$c_compute }
> +    ! { dg-note {variable 'j' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO3" { xfail *-*-* } l_compute$c_compute }
> +    ! { dg-note {variable 'a' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO4" { xfail *-*-* } l_compute$c_compute }

... etc. (also similarly in a handful of earlier commits, if I remember
correctly), why don't we do that programmatically, like in the attached
"Make sure that we get unique test names if several DejaGnu directives
refer to the same line", once and for all?  OK to push after proper
testing?


Grüße
 Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
diff mbox series

Patch

diff --git a/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90 b/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
index ed7e9ec6437..31f998dfc92 100644
--- a/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
+++ b/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90
@@ -39,9 +39,9 @@  contains
           !$acc atomic write ! ... to force 'TREE_ADDRESSABLE'.
           y = a
     !$acc end parallel
-    ! { dg-note {variable 'i' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compute$c_compute }
-    ! { dg-note {variable 'j' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compute$c_compute }
-    ! { dg-note {variable 'a' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compute$c_compute }
+    ! { dg-note {variable 'i' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO2" { xfail *-*-* } l_compute$c_compute }
+    ! { dg-note {variable 'j' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO3" { xfail *-*-* } l_compute$c_compute }
+    ! { dg-note {variable 'a' in 'private' clause potentially has improper OpenACC privatization level: 'parm_decl'} "TODO4" { xfail *-*-* } l_compute$c_compute }
     ! { dg-note {variable 'C\.[0-9]+' declared in block potentially has improper OpenACC privatization level: 'const_decl'} "TODO" { target *-*-* } l_compute$c_compute }
     ! { dg-note {variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } l_compute$c_compute }
   end subroutine f
diff --git a/gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-2.f b/gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-2.f
index 04d507fef9a..949d571ee55 100644
--- a/gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-2.f
+++ b/gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-2.f
@@ -22,8 +22,8 @@ 
 ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
          do j = 1, n
             call workerr (a, n) ! { dg-message "optimized: assigned OpenACC worker vector loop parallelism" }
-! { dg-bogus "note: routine 'workerr' declared here" "TODO" { xfail { ! offloading_enabled } } .-1 }
-! { dg-bogus "note: routine 'workerr_' declared here" "TODO" { xfail offloading_enabled } .-2 }
+! { dg-bogus "note: routine 'workerr' declared here" "TODO1" { xfail { ! offloading_enabled } } .-1 }
+! { dg-bogus "note: routine 'workerr_' declared here" "TODO2" { xfail offloading_enabled } .-2 }
          end do
       end do
 !$acc end parallel loop
@@ -36,8 +36,8 @@ 
          do j = 1, n
             call gangr (a, n) ! { dg-message "optimized: assigned OpenACC worker vector loop parallelism" }
 ! { dg-error "routine call uses same OpenACC parallelism as containing loop" "" { target *-*-* } .-1 }
-! { dg-bogus "note: routine 'gangr' declared here" "TODO" { xfail { ! offloading_enabled } } .-2 }
-! { dg-bogus "note: routine 'gangr_' declared here" "TODO" { xfail offloading_enabled } .-3 }
+! { dg-bogus "note: routine 'gangr' declared here" "TODO1" { xfail { ! offloading_enabled } } .-2 }
+! { dg-bogus "note: routine 'gangr_' declared here" "TODO2" { xfail offloading_enabled } .-3 }
          end do
       end do
 !$acc end parallel loop
@@ -162,8 +162,8 @@ 
 !$acc parallel loop ! { dg-message "optimized: assigned OpenACC gang worker loop parallelism" }
       do i = 1, n
          call vectorr (a, n) ! { dg-message "optimized: assigned OpenACC vector loop parallelism" }
-! { dg-bogus "note: routine 'vectorr' declared here" "TODO" { xfail { ! offloading_enabled } } .-1 }
-! { dg-bogus "note: routine 'vectorr_' declared here" "TODO" { xfail offloading_enabled } .-2 }
+! { dg-bogus "note: routine 'vectorr' declared here" "TODO1" { xfail { ! offloading_enabled } } .-1 }
+! { dg-bogus "note: routine 'vectorr_' declared here" "TODO2" { xfail offloading_enabled } .-2 }
       end do
 !$acc end parallel loop
 
@@ -214,8 +214,8 @@ 
 ! { dg-warning "insufficient partitioning available to parallelize loop" "" { target *-*-* } .-1 }
          do j = 1, n
             a(i) = workerf (a, n) ! { dg-message "optimized: assigned OpenACC worker vector loop parallelism" }
-! { dg-bogus "note: routine 'workerf' declared here" "TODO" { xfail { ! offloading_enabled } } .-1 }
-! { dg-bogus "note: routine 'workerf_' declared here" "TODO" { xfail offloading_enabled } .-2 }
+! { dg-bogus "note: routine 'workerf' declared here" "TODO1" { xfail { ! offloading_enabled } } .-1 }
+! { dg-bogus "note: routine 'workerf_' declared here" "TODO2" { xfail offloading_enabled } .-2 }
          end do
       end do
 !$acc end parallel loop
@@ -228,8 +228,8 @@ 
          do j = 1, n
             a(i) = gangf (a, n) ! { dg-message "optimized: assigned OpenACC worker vector loop parallelism" }
 ! { dg-error "routine call uses same OpenACC parallelism as containing loop" "" { target *-*-* } .-1 }
-! { dg-bogus "note: routine 'gangf' declared here" "TODO" { xfail { ! offloading_enabled } } .-2 }
-! { dg-bogus "note: routine 'gangf_' declared here" "TODO" { xfail offloading_enabled } .-3 }
+! { dg-bogus "note: routine 'gangf' declared here" "TODO1" { xfail { ! offloading_enabled } } .-2 }
+! { dg-bogus "note: routine 'gangf_' declared here" "TODO2" { xfail offloading_enabled } .-3 }
          end do
       end do
 !$acc end parallel loop
@@ -354,8 +354,8 @@ 
 !$acc parallel loop ! { dg-message "optimized: assigned OpenACC gang worker loop parallelism" }
       do i = 1, n
          a(i) = vectorf (a, n) ! { dg-message "optimized: assigned OpenACC vector loop parallelism" }
-! { dg-bogus "note: routine 'vectorf' declared here" "TODO" { xfail { ! offloading_enabled } } .-1 }
-! { dg-bogus "note: routine 'vectorf_' declared here" "TODO" { xfail offloading_enabled } .-2 }
+! { dg-bogus "note: routine 'vectorf' declared here" "TODO1" { xfail { ! offloading_enabled } } .-1 }
+! { dg-bogus "note: routine 'vectorf_' declared here" "TODO2" { xfail offloading_enabled } .-2 }
       end do
 !$acc end parallel loop