Bug 10819 - testsuite creates CR+LF on compiler version lines in test summary files
Summary: testsuite creates CR+LF on compiler version lines in test summary files
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 3.4.0
: P3 minor
Target Milestone: 3.3.3
Assignee: Andrew Pinski
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2003-05-16 15:26 UTC by Robert Schiele
Modified: 2005-11-12 06:37 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-11-25 01:21:21


Attachments
Fix for this bug (485 bytes, patch)
2003-12-07 12:23 UTC, Robert Schiele
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schiele 2003-05-16 15:26:00 UTC
The testsuite creates CR+LF on compiler version lines in test summary files like:

/local/build/gcc/testsuite/../g++ version 3.3 <== HERE

This confuses some implementations of Mail and thus they send the report as a binary attachment. Results can be seen here: http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00946.html

Release:
3.3, 3.3.1 20030515 (prerelease), 3.4 20030515 (experimental)

Environment:
Seems to be independent of environment. I have it on all my platforms. Might depend on dejagnu/expect releases. If you can't reproduce, ask for additional information you need.

How-To-Repeat:
Run the testsuite and inspect one of the summary files.
Comment 1 Robert Schiele 2003-05-16 15:26:00 UTC
Fix:
Workaround: Place some sed/awk/whatever command into contrib/test_results to filter this rubbish out, but the better way would be to prevent the testsuite from behaving this way, but I do not know dejagnu enough to identify the real problem here.
Comment 2 Andrew Pinski 2003-05-24 00:50:08 UTC
confirmed on mainline (20030523).
Comment 3 Robert Schiele 2003-12-07 12:23:01 UTC
Created attachment 5293 [details]
Fix for this bug

As some people feel annoyed about my application/octet-stream testresults, but
no one cared to fix this bug, I decided to fix it myself. ;-)

This patch does apply to cvs HEAD and 3.3 branch, but will most likely apply to
any other branch as well.

I think the changes are rather straight forward but if you have
doubts/questions about the change feel free to contact me.
Comment 4 Andreas Tobler 2003-12-09 14:18:05 UTC
and here the test run on darwin7.0.0

http://gcc.gnu.org/ml/gcc-testresults/2003-12/msg00365.html

Ready to apply ?
Comment 5 Andrew Pinski 2003-12-10 20:30:34 UTC
I am applying it :).
Comment 6 CVS Commits 2003-12-10 20:36:07 UTC
Subject: Bug 10819

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pinskia@gcc.gnu.org	2003-12-10 20:36:02

Modified files:
	gcc            : ChangeLog 
	gcc/testsuite/lib: g++.exp g77.exp gcc.exp objc.exp 

Log message:
	2003-12-09  Robert Schiele  <rschiele@uni-mannheim.de>
	
	PR other/10819
	* lib/gcc.exp (default_gcc_version): Do not match NL/CR characters
	to fix Bug 10819.
	* lib/g++.exp (g++_version): Likewise.
	* lib/g77.exp (g77_version): Likewise.
	* lib/objc.exp (default_objc_version): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1975&r2=2.1976
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/lib/g++.exp.diff?cvsroot=gcc&r1=1.33&r2=1.34
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/lib/g77.exp.diff?cvsroot=gcc&r1=1.16&r2=1.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/lib/gcc.exp.diff?cvsroot=gcc&r1=1.12&r2=1.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/lib/objc.exp.diff?cvsroot=gcc&r1=1.19&r2=1.20

Comment 7 Andrew Pinski 2003-12-10 20:36:35 UTC
Fixed for 3.4.
Comment 9 Andrew Pinski 2003-12-10 23:39:34 UTC
Fixed also for 3.3.3.
Comment 10 CVS Commits 2004-05-13 14:38:58 UTC
Subject: Bug 10819

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	schwab@gcc.gnu.org	2004-05-13 14:38:54

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/lib: gfortran.exp 

Log message:
	PR other/10819
	* lib/gfortran.exp (gfortran_version): Do not match NL/CR
	characters.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3735&r2=1.3736
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/lib/gfortran.exp.diff?cvsroot=gcc&r1=1.2&r2=1.3