This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix run_list_test for MIPS gas


I'm getting the following testsuite output for MIPS gas:

-----------------------------------------------------------------------
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
ERROR: wrong # args: should be "run_list_test name opts"
FAIL: MIPS ELF reloc 2 (32-bit)
FAIL: MIPS ld-st-la constants (ABI o32)
FAIL: MIPS ld-st-la constants (ABI o32, shared)
ERROR: tcl error sourcing /scratch/richard/binutils/HEAD/src/gas/testsuite/gas/mips/mips.exp.
ERROR: wrong # args: should be "run_list_test name opts"
    while executing
"run_list_test "ldstla-32-1" "-mabi=32"  "MIPS ld-st-la bad constants (ABI o32)""
    invoked from within
"if { [istarget mips*-*-vxworks*] } {
    run_dump_test "vxworks1"
    run_dump_test "vxworks1-xgot"
    run_dump_test "vxworks1-el"
    run_dump_test ..."
    (file "/scratch/richard/binutils/HEAD/src/gas/testsuite/gas/mips/mips.exp" line 369)
    invoked from within
"source /scratch/richard/binutils/HEAD/src/gas/testsuite/gas/mips/mips.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source /scratch/richard/binutils/HEAD/src/gas/testsuite/gas/mips/mips.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name""
-----------------------------------------------------------------------

There are two problems: mips.exp uses run_list_test with no options
argument, and cr16.exp overrides the gas-defs.exp definition before
mips.exp runs.

I think the best fix for the first problem is to make the options
optional.  For the second, it's trivially safe to delete the cr16.exp
definition because cr16.exp contains no list tests.

Tested on mipsisa64-elf.  OK to install?

Richard


gas/testsuite/
	* lib/gas-defs.exp (run_list_test): Make the options optional.
	* gas/cr16/cr16.exp (run_list_test): Delete.

Index: gas/testsuite/lib/gas-defs.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/lib/gas-defs.exp,v
retrieving revision 1.26
diff -u -p -r1.26 gas-defs.exp
--- gas/testsuite/lib/gas-defs.exp	3 Jul 2007 11:01:12 -0000	1.26
+++ gas/testsuite/lib/gas-defs.exp	23 Jul 2007 11:41:18 -0000
@@ -890,14 +890,14 @@ if ![string length [info proc prune_warn
     }
 }
 
-# run_list_test NAME OPTS (optional): TESTNAME
+# run_list_test NAME (optional): OPTS TESTNAME
 #
 # Assemble the file "NAME.d" with command line options OPTS and
 # compare the assembler standard error output against thee regular
 # expressions given in the file "NAME.l".  If TESTNAME is provided,
 # it will be used as the name of the test.
 
-proc run_list_test { name opts {testname {}} } {
+proc run_list_test { name {opts {}} {testname {}} } {
     global srcdir subdir
     if { [string length $testname] == 0 } then {
 	set testname "[file tail $subdir] $name"
Index: gas/testsuite/gas/cr16/cr16.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/cr16/cr16.exp,v
retrieving revision 1.1
diff -u -p -r1.1 cr16.exp
--- gas/testsuite/gas/cr16/cr16.exp	29 Jun 2007 14:09:31 -0000	1.1
+++ gas/testsuite/gas/cr16/cr16.exp	23 Jul 2007 11:41:18 -0000
@@ -2,19 +2,6 @@
 # Driver for CR16 assembler testsuite
 #
 
-proc run_list_test { name opts } {
-  global srcdir subdir
-  set testname "cr16 $name"
-  set file $srcdir/$subdir/$name
-  gas_run ${name}.s $opts ">&dump.out"
-  if {[regexp_diff "dump.out" "${file}.l"] } {
-    fail $testname
-    verbose "output is [file_contents "dump.out"]" 2
-    return
-  }
-  pass $testname
-}
-
 if ![istarget cr16-*-*] {
     return
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]