public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs/c-torture.exp/.cexp and 14 char limit
@ 1997-12-05  1:13 Philippe De Muyter
  1997-12-06  9:00 ` Jeffrey A Law
  1998-01-19  2:06 ` Jeffrey A Law
  0 siblings, 2 replies; 7+ messages in thread
From: Philippe De Muyter @ 1997-12-05  1:13 UTC (permalink / raw)
  To: egcs mailing list

Please include the following patch in the egcs source tree.
Without it, c-torture.exp tries to execute some C programs as Expect programs :)


Fri Dec  5 09:52:54 1997  Philippe De Muyter  <phdm@macqel.be>

	* lib/c-torture.exp (c-torture, c-torture-execute): Avoid confusing
 	.c files as .cexp files on 14-char limited filesystems.

--- ./lib/c-torture.exp	Fri Dec  5 09:47:40 1997
+++ ./lib/c-torture.exp	Fri Dec  5 00:38:05 1997
@@ -135,11 +135,15 @@
 
     # Check for alternate driver.
     if [file exists [file rootname $src].cexp] {
-	verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
-	set done_p 0
-	catch "set done_p \[source [file rootname $src].cexp\]"
-	if { $done_p } {
-	    return
+	# Avoid false positive when working on a 14-char fs and src has 14 char.
+	catch "exec cmp $src \[file rootname $src\].cexp" exec_output
+	    if ![string match "" $exec_output] then {
+	    verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
+	    set done_p 0
+	    catch "set done_p \[source [file rootname $src].cexp\]"
+	    if { $done_p } {
+		return
+	    }
 	}
     }
    
@@ -290,13 +294,17 @@
 
     # Check for alternate driver.
     if [file exists [file rootname $src].cexp] {
-	verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
-	set done_p 0
-	catch "set done_p \[source [file rootname $src].cexp\]"
-	if { $done_p } {
-	    return
+	# Avoid false positive when working on a 14-char fs and src has 14 char.
+	catch "exec cmp $src \[file rootname $src\].cexp" exec_output
+	    if ![string match "" $exec_output] then {
+		verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
+		set done_p 0
+		catch "set done_p \[source [file rootname $src].cexp\]"
+		if { $done_p } {
+		    return
+		}
+	    }
 	}
-    }
    
     # Look for a loop within the source code - if we don't find one,
     # don't pass -funroll[-all]-loops.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: egcs/c-torture.exp/.cexp and 14 char limit
  1997-12-05  1:13 egcs/c-torture.exp/.cexp and 14 char limit Philippe De Muyter
@ 1997-12-06  9:00 ` Jeffrey A Law
  1997-12-06 14:13   ` Philippe De Muyter
  1998-01-19  2:06 ` Jeffrey A Law
  1 sibling, 1 reply; 7+ messages in thread
From: Jeffrey A Law @ 1997-12-06  9:00 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: egcs mailing list

  In message < 199712050904.KAA23053@mail.macqel.be >you write:
  > Please include the following patch in the egcs source tree.
  > Without it, c-torture.exp tries to execute some C programs as Expect progra
  > ms :)
Which tests have this problem -- I'd just assume rename them to
handle 14char filesystems.

jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: egcs/c-torture.exp/.cexp and 14 char limit
  1997-12-06  9:00 ` Jeffrey A Law
@ 1997-12-06 14:13   ` Philippe De Muyter
  1997-12-07 20:11     ` Jeffrey A Law
  0 siblings, 1 reply; 7+ messages in thread
From: Philippe De Muyter @ 1997-12-06 14:13 UTC (permalink / raw)
  To: law; +Cc: egcs

> 
> 
>   In message < 199712050904.KAA23053@mail.macqel.be >you write:
>   > Please include the following patch in the egcs source tree.
>   > Without it, c-torture.exp tries to execute some C programs as Expect progra
>   > ms :)
> Which tests have this problem -- I'd just assume rename them to
> handle 14char filesystems.

Well, the first one (the one which always caused dejagnu to abort with :

  Running /usr/gnu/tmp/egcs-971122/gcc/testsuite/gcc.c-torture/compile/compile.exp
   ...
  ERROR: (DejaGnu) proc "typedef union" does not exist.
  The error code is
  
                  === gcc Summary ===
  
  # of expected passes            972
  # of expected failures          1

) is compile/combine-hang.c
             12345678901234
When c-torture checks for the existence
  of compile/combine-hang.cexp
             12345678901234
it gets a success, but the file it gets is actually combine-hang.c.

I prefer my patch than imposing a 13-char limit to testcase names, but
another possible fix would be to choose another suffix than 'cexp' for the
testcase-specific expect files, a suffix that would not begin with the
letter 'c'.

Philippe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: egcs/c-torture.exp/.cexp and 14 char limit
  1997-12-06 14:13   ` Philippe De Muyter
@ 1997-12-07 20:11     ` Jeffrey A Law
  1997-12-08  4:13       ` Philippe De Muyter
  1997-12-16 14:02       ` Philippe De Muyter
  0 siblings, 2 replies; 7+ messages in thread
From: Jeffrey A Law @ 1997-12-07 20:11 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: egcs

  In message < 199712062212.XAA00817@mail.macqel.be >you write:
  > I prefer my patch than imposing a 13-char limit to testcase names, but
  > another possible fix would be to choose another suffix than 'cexp' for the
  > testcase-specific expect files, a suffix that would not begin with the
  > letter 'c'.
We'd prefer not to have names > 14chars.

jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: egcs/c-torture.exp/.cexp and 14 char limit
  1997-12-07 20:11     ` Jeffrey A Law
@ 1997-12-08  4:13       ` Philippe De Muyter
  1997-12-16 14:02       ` Philippe De Muyter
  1 sibling, 0 replies; 7+ messages in thread
From: Philippe De Muyter @ 1997-12-08  4:13 UTC (permalink / raw)
  To: law; +Cc: egcs

>   In message < 199712062212.XAA00817@mail.macqel.be >you write:
>   > I prefer my patch than imposing a 13-char limit to testcase names, but
>   > another possible fix would be to choose another suffix than 'cexp' for the
>   > testcase-specific expect files, a suffix that would not begin with the
>   > letter 'c'.
> We'd prefer not to have names > 14chars.

There is only one file with name > 14 chars in gcc.c-torture :

	gcc/testsuite/gcc.c-torture/code_quality/code_quality.exp

but that is not what we are talking about.

The problem is that lib/c-torture.exp builds artificially filenames by
removing .c at the end of the name of the c-torture testcases (e.g.
combine-hang.c that has 14 chars), then adds .cexp (giving combine-hang.cexp
that has 17 chars, but that is identical to combine-hang.c in the 14 first
chars), and then tests if such a file exists.  It then gets a wrong
positive answer and subsequently tries to execute combine-hang.c as
an Expect source file.

We could change lib/c-torture.exp to, given a xxx.c file, check for
existence of a xxx.<suffix> file where <suffix> is any single character
that is not 'c'.  This would imply renaming all the existant .cexp files
into .<suffix> files.  If <suffix> has to be 'cexp', then we must limit
filenames of the testcases to 11 characters to allow for the replacement
of 'c' by 'cexp'.

My proposed patch has the advantage not to need renaming of any file,
but I am willing to submit another patch with the change of <suffix>
solution with the <suffix> of your choice.

Regards

Philippe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: egcs/c-torture.exp/.cexp and 14 char limit
  1997-12-07 20:11     ` Jeffrey A Law
  1997-12-08  4:13       ` Philippe De Muyter
@ 1997-12-16 14:02       ` Philippe De Muyter
  1 sibling, 0 replies; 7+ messages in thread
From: Philippe De Muyter @ 1997-12-16 14:02 UTC (permalink / raw)
  To: law; +Cc: egcs

>   In message < 199712062212.XAA00817@mail.macqel.be >you write:
>   > I prefer my patch than imposing a 13-char limit to testcase names, but
>   > another possible fix would be to choose another suffix than 'cexp' for the
>   > testcase-specific expect files, a suffix that would not begin with the
>   > letter 'c'.
> We'd prefer not to have names > 14chars.

There is only one file with name > 14 chars in gcc.c-torture :

	gcc/testsuite/gcc.c-torture/code_quality/code_quality.exp

but that is not what we are talking about.

The problem is that lib/c-torture.exp builds artificially filenames by
removing .c at the end of the name of the c-torture testcases (e.g.
combine-hang.c that has 14 chars), then adds .cexp (giving combine-hang.cexp
that has 17 chars, but that is identical to combine-hang.c in the 14 first
chars), and then tests if such a file exists.  It then gets a wrong
positive answer and subsequently tries to execute combine-hang.c as
an Expect source file.

We could change lib/c-torture.exp to, given a xxx.c file, check for
existence of a xxx.<suffix> file where <suffix> is any single character
that is not 'c'.  This would imply renaming all the existant .cexp files
into .<suffix> files.  If <suffix> has to be 'cexp', then we must limit
filenames of the testcases to 11 characters to allow for the replacement
of 'c' by 'cexp'.

My proposed patch has the advantage not to need renaming of any file,
but I am willing to submit another patch with the change of <suffix>
solution with the <suffix> of your choice.

Regards

Philippe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: egcs/c-torture.exp/.cexp and 14 char limit
  1997-12-05  1:13 egcs/c-torture.exp/.cexp and 14 char limit Philippe De Muyter
  1997-12-06  9:00 ` Jeffrey A Law
@ 1998-01-19  2:06 ` Jeffrey A Law
  1 sibling, 0 replies; 7+ messages in thread
From: Jeffrey A Law @ 1998-01-19  2:06 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: egcs mailing list

  In message <199712050904.KAA23053@mail.macqel.be>you write:
  > Please include the following patch in the egcs source tree.
  > Without it, c-torture.exp tries to execute some C programs as Expect programs :)
  > 
  > 
  > Fri Dec  5 09:52:54 1997  Philippe De Muyter  <phdm@macqel.be>
  > 
  > 	* lib/c-torture.exp (c-torture, c-torture-execute): Avoid confusing
  >  	.c files as .cexp files on 14-char limited filesystems.
This patch is just papering around the problem.  There's only a few .cexp files
in the testsuite (less than 10).  So I changed the drivers to look for a .x
file and renamed all the .cexp files to .x files.

jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-01-19  2:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-05  1:13 egcs/c-torture.exp/.cexp and 14 char limit Philippe De Muyter
1997-12-06  9:00 ` Jeffrey A Law
1997-12-06 14:13   ` Philippe De Muyter
1997-12-07 20:11     ` Jeffrey A Law
1997-12-08  4:13       ` Philippe De Muyter
1997-12-16 14:02       ` Philippe De Muyter
1998-01-19  2:06 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).