This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Filenames with "=" crash contrib/test_summary
- To: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- Subject: Re: Filenames with "=" crash contrib/test_summary
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 09 Aug 2000 02:12:08 -0300
- Cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <A9E96A79C068D211A6A90000C07BDF0D88F1D9@crtsmail.crts.techaust.riotinto.com.au>
On Aug 8, 2000, "Billinghurst, David (CRTS)" <David.Billinghurst@riotinto.com> wrote:
>> From: Alexandre Oliva [SMTP:aoliva@redhat.com]
>> The problem seems to be that the version of gawk you're using
>> interprets any argument containing `=' as a variable assignment,
>> instead of checking whether what is on the left of the `=' sign is a
>> valid variable name.
> Quite right. Moving to gawk 3.0.5 (from 3.0.0) solves the problem.
> Still a portablilty issue, but probably not worth solving.
It was simple enough. I'm checking in the following patch:
Index: contrib/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* test_summary: AWK breaks with filenames containing `='.
Index: contrib/test_summary
===================================================================
RCS file: /cvs/gcc/egcs/contrib/test_summary,v
retrieving revision 1.15
diff -u -r1.15 test_summary
--- contrib/test_summary 2000/06/04 02:06:54 1.15
+++ contrib/test_summary 2000/08/09 05:09:06
@@ -82,6 +82,10 @@
done &&
$anyfile &&
if $forcemail || $anychange; then :; else mailto=nobody; fi &&
+# We use cat instead of listing the files as arguments to AWK because
+# GNU awk 3.0.0 would break if any of the filenames contained `=' and
+# was preceded by an invalid ``variable'' name.
+cat ./config.status $files |
$AWK '
BEGIN {
lang="";
@@ -122,7 +126,7 @@
print "Mail -s \"Results for " prefix version lang "testsuite on " host "\" '"${mailto}"' &&";
}}
{ next; }
-' ./config.status $files | sed "s/\([\`\$\\\\]\)/\\\\\\1/g" &&
+' | sed "s/\([\`\$\\\\]\)/\\\\\\1/g" &&
if $move; then
for file in $files `ls -1 $files | sed s/sum$/log/`; do
[ -f $file ] && echo "mv `pwd`/$file `pwd`/$file.sent &&"
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me