Bug 65032 - runtest doesn't accept valid arguments
Summary: runtest doesn't accept valid arguments
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dejagnu (Show other bugs)
(Show other bugs)
Version: 7.3
Hardware: All Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-05-16 12:37 UTC by Manfred Hollstein
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-05-16 12:37:20 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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:

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.

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