Hi!

On Thu, 28 Feb 2019 18:02:32 +0100, Thomas Schwinge <tho...@codesourcery.com> 
wrote:
> On Fri, 02 Jan 2015 12:28:10 +0100, Tobias Burnus <bur...@net-b.de> wrote:
> > [...]
> > 
> > I additionally propagated the dg-compile-aux-modules support to caf.dg 
> 
> That got committed in r219143:
> 
> > --- a/gcc/testsuite/gfortran.dg/coarray/caf.exp
> > +++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp
> > @@ -43,6 +43,21 @@ global DG_TORTURE_OPTIONS torture_with_loops
> >  torture-init
> >  set-torture-options $DG_TORTURE_OPTIONS
> >  
> > +global gfortran_test_path
> > +global gfortran_aux_module_flags
> > +set gfortran_test_path $srcdir/$subdir
> > +set gfortran_aux_module_flags $DEFAULT_FFLAGS
> > +proc dg-compile-aux-modules { args } {
> > +    global gfortran_test_path
> > +    global gfortran_aux_module_flags
> > +    if { [llength $args] != 2 } {
> > +   error "dg-set-target-env-var: needs one argument"
> > +   return
> > +    }
> > +    dg-test $gfortran_test_path/[lindex $args 1] "" 
> > $gfortran_aux_module_flags
> > +    # cleanup-modules isn't intentionally invoked here.
> > +}
> 
> I just noticed that this copy is missing Jakub's r215293 changes that he
> had applied a few months *earlier* to the master copy of
> 'dg-compile-aux-modules', in 'gcc/testsuite/gfortran.dg/dg.exp', see
> attached, and/or
> <http://mid.mail-archive.com/20140916093700.GW17454@tucnak.redhat.com>.
> I can't easily test it with the affected DejaGnu version 1.4.4 (which is
> still the minimum version required now), but it tests fine with DejaGnu
> 1.5, and seems straight-forward, so I propose I commit "as obvious" these
> changes to the 'gcc/testsuite/gfortran.dg/coarray/caf.exp' copy, too?
> (It's exactly these changes missing to make the two copies identical.)

For testing GCC with a custom DejaGnu installation, you apparently just
have to put its installation directory into 'PATH'.

Testing with DejaGnu 1.4.4 (specifically, the 'dejagnu-1.4.4-release' Git
tag), one runs into:

    cannot trap SIGSEGV
        while executing
    "trap "send_error \"got a \[trap -name\] signal, $str \\n\"; log_and_exit;" 
$signal"
        ("foreach" body line 4)
        invoked from within
    "foreach sig "{SIGTERM {terminated}}  {SIGINT  {interrupted by user}}  
{SIGQUIT {interrupted by user}}  {SIGSEGV {segmentation violation}}" {
            set sign..."
        invoked from within
    "if ![exp_debug] {
        foreach sig "{SIGTERM {terminated}} \
                 {SIGINT  {interrupted by user}} \
                 {SIGQUIT {interrupted by user}..."
        (file "[...]/share/dejagnu/runtest.exp" line 1503)

This is an incompatibility with "recent" versions of 'expect'; see
<https://bugs.debian.org/301557>, for example, and this is resolved by
DejaGnu commit 504776814fa56295c4cff40d78a1be446f851a7c.


With that resolved, no problems found -- that is, confirming that 15
years old DejaGnu version 1.4.4 still works fine for GCC testing (in my
configuration).


I convinced myself that my proposed changes are the right thing to do,
and committed "[testsuite, Fortran] Apply DejaGnu 1.4.4 work-around also
to 'gfortran.dg/coarray/caf.exp:dg-compile-aux-modules'" to trunk in
r269848, to gcc-8-branch in r269849, and to gcc-7-branch in r269850, see
attached.


> The other copy, created later, in
> 'gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp' already
> does exactly match the master copy.
> 
> 
> And then, of course, we really should unify all 'dg-compile-aux-modules'
> copies into one shared file.  (But it's not completely straight-forward,
> because of the handling of 'gfortran_test_path', and
> 'gfortran_aux_module_flags'.)


Grüße
 Thomas


>From e78648a61e4e5fc60d400c2d2c89254aee4c0715 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 21 Mar 2019 19:16:29 +0000
Subject: [PATCH] [testsuite, Fortran] Apply DejaGnu 1.4.4 work-around also to
 'gfortran.dg/coarray/caf.exp:dg-compile-aux-modules'

See trunk r215293.  This unifies all 'dg-compile-aux-modules' instances.

	gcc/testsuite/
	PR fortran/56408
	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround
	missing nexted dg-test call support in dejaGNU 1.4.4.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269848 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog                   |  4 ++++
 gcc/testsuite/gfortran.dg/coarray/caf.exp | 12 +++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 914ba7237033..40446965212e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
 2019-03-21  Thomas Schwinge  <tho...@codesourcery.com>
 
+	PR fortran/56408
+	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround
+	missing nexted dg-test call support in dejaGNU 1.4.4.
+
 	PR fortran/29383
 	* gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in
 	other '*.exp' files.
diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp
index 4c6dba1dc22b..e3204c34779b 100644
--- a/gcc/testsuite/gfortran.dg/coarray/caf.exp
+++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp
@@ -54,8 +54,18 @@ proc dg-compile-aux-modules { args } {
 	error "dg-set-target-env-var: needs one argument"
 	return
     }
+
+    set level [info level]
+    if { [info procs dg-save-unknown] != [list] } {
+	rename dg-save-unknown dg-save-unknown-level-$level
+    }
+
     dg-test $gfortran_test_path/[lindex $args 1] "" $gfortran_aux_module_flags
-    # cleanup-modules isn't intentionally invoked here.
+    # cleanup-modules is intentionally not invoked here.
+
+    if { [info procs dg-save-unknown-level-$level] != [list] } {
+	rename dg-save-unknown-level-$level dg-save-unknown
+    }
 }
 
 # Add -latomic only where supported.  Assume built-in support elsewhere.
-- 
2.17.1

>From f0c23d90fc45bbfc1cf3cab52ddd3631b3a9be13 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 21 Mar 2019 19:16:54 +0000
Subject: [PATCH] [testsuite, Fortran] Apply DejaGnu 1.4.4 work-around also to
 'gfortran.dg/coarray/caf.exp:dg-compile-aux-modules'

See trunk r215293.  This unifies all 'dg-compile-aux-modules' instances.

	gcc/testsuite/
	PR fortran/56408
	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround
	missing nexted dg-test call support in dejaGNU 1.4.4.

trunk r269848

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@269849 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog                   |  4 ++++
 gcc/testsuite/gfortran.dg/coarray/caf.exp | 12 +++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9aa82da9a4aa..38982cf82f4b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
 2019-03-21  Thomas Schwinge  <tho...@codesourcery.com>
 
+	PR fortran/56408
+	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround
+	missing nexted dg-test call support in dejaGNU 1.4.4.
+
 	PR fortran/29383
 	* gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in
 	other '*.exp' files.
diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp
index d1a7a56970fc..f7f57f4477f1 100644
--- a/gcc/testsuite/gfortran.dg/coarray/caf.exp
+++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp
@@ -54,8 +54,18 @@ proc dg-compile-aux-modules { args } {
 	error "dg-set-target-env-var: needs one argument"
 	return
     }
+
+    set level [info level]
+    if { [info procs dg-save-unknown] != [list] } {
+	rename dg-save-unknown dg-save-unknown-level-$level
+    }
+
     dg-test $gfortran_test_path/[lindex $args 1] "" $gfortran_aux_module_flags
-    # cleanup-modules isn't intentionally invoked here.
+    # cleanup-modules is intentionally not invoked here.
+
+    if { [info procs dg-save-unknown-level-$level] != [list] } {
+	rename dg-save-unknown-level-$level dg-save-unknown
+    }
 }
 
 # Add -latomic only where supported.  Assume built-in support elsewhere.
-- 
2.17.1

>From a6d1bc4242db77bd89a521e2a5260e6318c9c6ec Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 21 Mar 2019 19:17:12 +0000
Subject: [PATCH] [testsuite, Fortran] Apply DejaGnu 1.4.4 work-around also to
 'gfortran.dg/coarray/caf.exp:dg-compile-aux-modules'

See trunk r215293.  This unifies all 'dg-compile-aux-modules' instances.

	gcc/testsuite/
	PR fortran/56408
	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround
	missing nexted dg-test call support in dejaGNU 1.4.4.

trunk r269848

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@269850 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog                   |  4 ++++
 gcc/testsuite/gfortran.dg/coarray/caf.exp | 12 +++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ca849083d7f4..5e6c1971413f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
 2019-03-21  Thomas Schwinge  <tho...@codesourcery.com>
 
+	PR fortran/56408
+	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround
+	missing nexted dg-test call support in dejaGNU 1.4.4.
+
 	PR fortran/29383
 	* gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in
 	other '*.exp' files.
diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp
index edac7dc981f0..be5cf27935e6 100644
--- a/gcc/testsuite/gfortran.dg/coarray/caf.exp
+++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp
@@ -54,8 +54,18 @@ proc dg-compile-aux-modules { args } {
 	error "dg-set-target-env-var: needs one argument"
 	return
     }
+
+    set level [info level]
+    if { [info procs dg-save-unknown] != [list] } {
+	rename dg-save-unknown dg-save-unknown-level-$level
+    }
+
     dg-test $gfortran_test_path/[lindex $args 1] "" $gfortran_aux_module_flags
-    # cleanup-modules isn't intentionally invoked here.
+    # cleanup-modules is intentionally not invoked here.
+
+    if { [info procs dg-save-unknown-level-$level] != [list] } {
+	rename dg-save-unknown-level-$level dg-save-unknown
+    }
 }
 
 # Add -latomic only where supported.  Assume built-in support elsewhere.
-- 
2.17.1

Reply via email to