Bug 15489 - testsuite_files determined incorrectly
testsuite_files determined incorrectly
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: libstdc++
3.4.0
: P2 normal
: 3.4.1
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-17 08:28 UTC by jbeulich
Modified: 2005-07-23 22:49 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
fix for first patch (1.60 KB, patch)
2004-05-25 17:07 UTC, Benjamin Kosnik
Details | Diff
try three (960 bytes, patch)
2004-05-28 04:20 UTC, Benjamin Kosnik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jbeulich 2004-05-17 08:28:23 UTC
When the source tree is consisting (mainly) of symbolic links (pointing into
another source tree), testsuite_files (as well as the other two related
variables) are empty, making a testsuite run meaningless. I'd suggest

--- /usr/local/src/gcc-3.4.0/libstdc++-v3/scripts/create_testsuite_files
2003-07-06 05:14:37.000000000 +0200
+++ 3.4.0/libstdc++-v3/scripts/create_testsuite_files	2004-05-14
14:54:57.000000000 +0200
@@ -35,7 +35,7 @@
 for d in [a-z]*; do
   test -d $d && dlist="$dlist $d"
 done
-find $dlist -type f -name "*.cc" | sort > $tmp.1
+find $dlist -xtype f -name "*.cc" | sort > $tmp.1
 
 # If the library is not configured to support wchar_t, don't run those tests.
 if test -f "$outdir/testsuite_wchar_t"; then
Comment 1 Benjamin Kosnik 2004-05-18 01:17:36 UTC
You should create a ChangeLog for this, and attach the patch you wrote here.
Then, mail this to gcc-patches and libstdc++ lists.

Although not necessary for these two bugs, you might want to consider getting an
FSF copyright assignment, or clarifying your status under existing assignments
at your company, if applicable.

best,
benjamin
Comment 2 CVS Commits 2004-05-18 18:42:37 UTC
Subject: Bug 15489

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2004-05-18 18:42:28

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/scripts: create_testsuite_files 
	libstdc++-v3/testsuite/lib: libstdc++.exp 

Log message:
	2004-05-18  Jan Beulich  <jbeulich@novell.com>
	
	PR libstdc++/15489
	* scripts/create_testsuite_files: Also find source files through
	symbolic links.
	
	2004-05-18  Jan Beulich  <jbeulich@novell.com>
	
	PR libstdc++/15488
	* testsuite/lib/libstdc++.exp: Make test files writable.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2482&r2=1.2483
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/scripts/create_testsuite_files.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/lib/libstdc++.exp.diff?cvsroot=gcc&r1=1.20&r2=1.21

Comment 3 CVS Commits 2004-05-19 23:36:46 UTC
Subject: Bug 15489

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	bkoz@gcc.gnu.org	2004-05-19 23:36:39

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/scripts: create_testsuite_files 
	libstdc++-v3/testsuite/lib: libstdc++.exp 

Log message:
	2004-05-19  Jan Beulich  <jbeulich@novell.com>
	
	PR libstdc++/15489
	* scripts/create_testsuite_files: Also find source files through
	symbolic links.
	
	2004-05-19  Jan Beulich  <jbeulich@novell.com>
	
	PR libstdc++/15488
	* testsuite/lib/libstdc++.exp: Make test files writable.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2224.2.108&r2=1.2224.2.109
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/scripts/create_testsuite_files.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.22.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/lib/libstdc++.exp.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.15.4.3&r2=1.15.4.4

Comment 4 Andrew Pinski 2004-05-19 23:52:03 UTC
Fixed.
Comment 5 Eric Botcazou 2004-05-23 23:12:15 UTC
I can't run the testsuite anymore on Solaris (3.4 branch) as of 05/23.  All was
working correctly on 05/16.
Comment 6 Eric Botcazou 2004-05-24 10:06:15 UTC
Same problem on mainline.
Comment 7 Benjamin Kosnik 2004-05-24 16:44:24 UTC
Eric, does reverting this patch fix your problem? If so, why?

-benjamin
Comment 8 Eric Botcazou 2004-05-24 18:50:29 UTC
I reverted both patches and did a 'gmake check-target-libstc++-v3" but with the
same result.  That's why I'd like to know if there is a way to rebuild the
testing framework from scratch once the compiler has been bootstrapped.  If
there is not, I'll bootstrap again.
Comment 9 Eric Botcazou 2004-05-25 06:39:09 UTC
Reverting both patches does fix the problem.  As I don't know really why, I'll
further investigate.

[Was the problem a regression on the 3.4 branch?  If no, I find it dangerous to
alter the testing framework on a release branch, that's probably the best way to
let regressions creep in.]
Comment 10 Eric Botcazou 2004-05-25 07:58:17 UTC
The culprit is the first patch to scripts/create_testsuite_files, probably a
portability problem but I'm no expert.

I'd suggest to revert it everywhere, and revert the second patch on 3.4 branch.
Comment 11 jbeulich 2004-05-25 08:08:31 UTC
It appears that the -xtype primary is a GNU/Linux extension, and I'd guess the
problem is that Solaris doesn't support it. I cannot, however, see a reasonable
alternative to this fix in order to address the original problem.
Comment 12 Benjamin Kosnik 2004-05-25 17:07:04 UTC
Created attachment 6378 [details]
fix for first patch


This patch works on x86/linux and darwin, and will (I think) fix the original
bug report.
Comment 13 Benjamin Kosnik 2004-05-25 17:07:43 UTC
This broke Darwin as well. Fixing...
Comment 14 CVS Commits 2004-05-25 17:53:10 UTC
Subject: Bug 15489

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2004-05-25 17:53:00

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/scripts: create_testsuite_files 

Log message:
	2004-05-25  Benjamin Kosnik  <bkoz@redhat.com>
	
	PR libstdc++/15489
	* scripts/create_testsuite_files: Revert xtype change, add non-GNU
	bits to do the same thing.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2495&r2=1.2496
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/scripts/create_testsuite_files.diff?cvsroot=gcc&r1=1.2&r2=1.3

Comment 15 CVS Commits 2004-05-25 19:09:33 UTC
Subject: Bug 15489

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	bkoz@gcc.gnu.org	2004-05-25 19:09:23

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/scripts: create_testsuite_files 

Log message:
	2004-05-25  Benjamin Kosnik  <bkoz@redhat.com>
	
	PR libstdc++/15489
	* scripts/create_testsuite_files: Revert xtype change, add
	non-GNU bits to do the same thing.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2224.2.114&r2=1.2224.2.115
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/scripts/create_testsuite_files.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.22.1&r2=1.1.22.2

Comment 16 Andrew Pinski 2004-05-26 04:02:55 UTC
Fixed.
Comment 17 jbeulich 2004-05-26 07:34:57 UTC
This still won't work if part of the files are links and part are actual files
(note the word 'mainly' in the original description). If the assumption (as is
being made in the new version of the change) is that there can only be files or
links to files that match *.cc, then why not use

find $dlist "(" -type f -o -type l ")" -name "*.cc" | sort > $tmp.1
Comment 18 Benjamin Kosnik 2004-05-28 04:20:22 UTC
Created attachment 6409 [details]
try three


Why not indeed.
Comment 19 Benjamin Kosnik 2004-05-30 16:13:15 UTC
Ok, this is fixed now, finally, I believe...