Bug 65032 - runtest doesn't accept valid arguments
runtest doesn't accept valid arguments
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: dejagnu (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-16 08:37 EDT by Manfred Hollstein
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-05-16 08:37:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Manfred Hollstein 2002-05-16 08:37:13 EDT
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 05:34:53 EDT
This has been fixed in rawhide dejagnu 1.4.2-4.

Note You need to log in before you can comment on or make changes to this bug.