Bug 65032

Summary: runtest doesn't accept valid arguments
Product: [Retired] Red Hat Linux Reporter: Manfred Hollstein <manfredh>
Component: dejagnuAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-05-16 12:37:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Manfred Hollstein 2002-05-16 12:37:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.1 (X11; Linux i686; U;) Gecko/20020510

Description of problem:
Passing arguments like

 CC="gcc -L/home/gnu/binutils-2.12.1-i686-redhat7-linux-gnu/ld"

to runtest results in an error message:

  Illegal Argument "CC="gcc -L/home/gnu/binutils-2.12.1-i686-redhat7-linux-gnu/ld""

The problem is caused by not checking env. variable like
arguments in the main loop used to parse arguments in
/usr/share/dejagnu/runtest.exp. The attached patch fixes this.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Get binutils-2.12.1.tar.bz2 from any GNU mirror
2.Run configure, make, make check
3.Watch out for an error message when running the testsuite for ld
	

Actual Results:  Error message is produced as described above.

Expected Results:  No such error message should have been generated.

Additional info:

This patch fixes the bug:

--- /usr/share/dejagnu/runtest.exp.orig Thu Feb 28 15:37:12 2002
+++ /usr/share/dejagnu/runtest.exp      Thu May 16 14:22:03 2002
@@ -1164,6 +1164,19 @@ for { set i 0 } { $i < $argc } { incr i 
            exit 0
        }
 
+       "[A-Z0-9_-.]*=*" { # process makefile style args like CC=gcc, etc...
+           if [regexp "^(\[A-Z0-9_-\]+)=(.*)$" $option junk var val] {
+               set $var $val
+               verbose "$var is now $val"
+               append makevars "set $var $val;" ;# FIXME: Used anywhere?
+               unset junk var val
+           } else {
+               send_error "Illegal variable specification:\n"
+               send_error "$option\n"
+           }
+           continue
+       }
+
        default {
            if [info exists tool] {
                if { [info proc ${tool}_option_proc] != "" } {

Comment 1 Jakub Jelinek 2002-05-17 09:34:53 UTC
This has been fixed in rawhide dejagnu 1.4.2-4.