This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/21910] Files from previous runs can make some testcases fail
- From: "e9925248 at stud4 dot tuwien dot ac dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2005 07:51:55 -0000
- Subject: [Bug testsuite/21910] Files from previous runs can make some testcases fail
- References: <20050604104619.21910.e9925248@stud4.tuwien.ac.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From e9925248 at stud4 dot tuwien dot ac dot at 2005-06-06 07:51 -------
In the normal case (no error happens), cleanup-tree-dump will delete such files,
as a more verbose run of the testsuite shows:
Testing tree-ssa/ssa-sink-2.c
doing compile
Invoking the compiler as /tmp/gcc/host-i686-pc-linux-gnu/gcc/xgcc
-B/tmp/gcc/host-i686-pc-linux-gnu/gcc/
/tmp/gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-2.c -O2 -fdump-tree-sink-stats
-fno-show-column -S -o ssa-sink-2.s
Executing on host: /tmp/gcc/host-i686-pc-linux-gnu/gcc/xgcc
-B/tmp/gcc/host-i686-pc-linux-gnu/gcc/
/tmp/gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-2.c -O2 -fdump-tree-sink-stats
-fno-show-column -S -o ssa-sink-2.s (timeout = 300)
pid is 14380 -14380
waitres is 14380 exp6 0 0
output is
Checking pattern "sparc-*-sunos*" with i686-pc-linux-gnu
Checking pattern "alpha*-*-*" with i686-pc-linux-gnu
Checking pattern "hppa*-*-hpux*" with i686-pc-linux-gnu
Checking pattern "sparc-*-sunos*" with i686-pc-linux-gnu
Checking pattern "alpha*-*-*" with i686-pc-linux-gnu
Checking pattern "hppa*-*-hpux*" with i686-pc-linux-gnu
remove-build-file `ssa-sink-2.c.t??.sink'
remove-build-file `ssa-sink-2.c.t52.sink'
In my case, cleanup-tree-dump is not executed, as scan-tree-dump-times fails
before, because of the additonal file:
Testing tree-ssa/ssa-sink-1.c
doing compile
Invoking the compiler as /tmp/gcc/host-i686-pc-linux-gnu/gcc/xgcc
-B/tmp/gcc/host-i686-pc-linux-gnu/gcc/
/tmp/gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-1.c -O2 -fdump-tree-sink-stats
-fno-show-column -S -o ssa-sink-1.s
Executing on host: /tmp/gcc/host-i686-pc-linux-gnu/gcc/xgcc
-B/tmp/gcc/host-i686-pc-linux-gnu/gcc/
/tmp/gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-1.c -O2 -fdump-tree-sink-stats
-fno-show-column -S -o ssa-sink-1.s (timeout = 300)
pid is 14375 -14375
waitres is 14375 exp6 0 0
output is
Checking pattern "sparc-*-sunos*" with i686-pc-linux-gnu
Checking pattern "alpha*-*-*" with i686-pc-linux-gnu
Checking pattern "hppa*-*-hpux*" with i686-pc-linux-gnu
Checking pattern "sparc-*-sunos*" with i686-pc-linux-gnu
Checking pattern "alpha*-*-*" with i686-pc-linux-gnu
Checking pattern "hppa*-*-hpux*" with i686-pc-linux-gnu
ERROR: gcc.dg/tree-ssa/ssa-sink-1.c: error executing dg-final: couldn't open
"ssa-sink-1.c.t46.sink ssa-sink-1.c.t52.sink": no such file or directory
Error/Warning threshold exceeded: 1 0 (max. 1 3)
To solve this problem, the scan-tree-* functions need to check for this case and
remove the old files, so that at least future runs will not suffer from this
problem, eg:
Index: scantree.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/scantree.exp,v
retrieving revision 1.3
diff -u -r1.3 scantree.exp
--- scantree.exp 31 Mar 2005 00:28:49 -0000 1.3
+++ scantree.exp 6 Jun 2005 07:44:44 -0000
@@ -95,6 +95,12 @@
set src [file tail [lindex $testcase 0]]
set output_file "[glob $src.t??.[lindex $args 2]]"
+ if { [llength $output_file] > 1 } {
+ remove-build-file "$src.t??.[lindex $args 2]"
+ error "More than one dump file found: $output_file"
+ return
+ }
+
set fd [open $output_file r]
set text [read $fd]
close $fd
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21910