This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
LD testsuite breaks with too many '-v' in RUNTESTFLAGS.
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 04 Mar 2009 03:42:25 +0000
- Subject: LD testsuite breaks with too many '-v' in RUNTESTFLAGS.
Hi all,
I noticed a minor bug in the testsuite. In ld/testsuite/lib/ld-lib.exp, the
procedure "run_dump_test" ends with these lines:
-------------------------------<quote>-------------------------------
verbose_eval {[file_contents $dumpfile]} 3
if { [regexp_diff $dumpfile "${file}.d"] } then {
fail $testname
verbose "output is [file_contents $dumpfile]" 2
return
}
pass $testname
}
-------------------------------<quote>-------------------------------
If you have the logging turned up enough for the verbose_eval to fire, the
testrun crashes. This causes all the expect scripts that feature dump_tests
to throw exceptions and fail at the point they first run a dump test. Here's
a hunk of the diffs between the log files after running
make -k check-ld RUNTESTFLAGS="-v -v -v" 2>&1 | tee check-good.log
and
make -k check-ld RUNTESTFLAGS="-v -v -v -v" 2>&1 | tee check-bad.log
-------------------------------<quote>-------------------------------
@@ -3991,19 +4364,46 @@ board_info ubique file_transfer
getting ubique file_transfer
board_info ubique connect
getting ubique connect
+looking for ubique_file
+looking for telnet_file
+looking for standard_file
call_remote calling standard_file
dest in proc standard_file is ubique
calling is_remote ubique
board_info build name
getting ubique name
board is build, not remote
- Regexp-diff'ing: tmpdir/dump.out
/gnu/binutils/src/ld/testsuite/ld-discard/zero-rel.d
-regexp "^.*: file format .*elf.*$"
-line "tmpdir/dump: file format elf32-i386"
-regexp "^Contents of section .debug_info:$"
-line "Contents of section .debug_info:"
-regexp "^ 0000 0+( 0+)? +(\.+) .*$"
-line " 0000 00000000 00000000 ........ "
+ERROR: tcl error sourcing /gnu/binutils/src/ld/testsuite/ld-discard/discard.exp.
+ERROR: can't read "dumpfile": no such variable
+ while executing
+"file_contents $dumpfile"
+ invoked from within
+"verbose [file_contents $dumpfile] 3"
+ ("eval" body line 1)
+ invoked from within
+"eval verbose "$expr" $level "
+ invoked from within
+"if $verbose>$level then { eval verbose "$expr" $level }"
+ (procedure "verbose_eval" line 3)
+ invoked from within
+"verbose_eval {[file_contents $dumpfile]} 3"
+ (procedure "run_dump_test" line 320)
+ invoked from within
+"run_dump_test [file rootname [lindex $test_list $i]]"
+ ("for" body line 7)
+ invoked from within
+"for { set i 0 } { $i < [llength $test_list] } { incr i } {
+ # We need to strip the ".d", but can leave the dirname.
+ verbose [file rootname [lin..."
+ (file "/gnu/binutils/src/ld/testsuite/ld-discard/discard.exp" line 43)
+ invoked from within
+"source /gnu/binutils/src/ld/testsuite/ld-discard/discard.exp"
+ ("uplevel" body line 1)
+ invoked from within
+"uplevel #0 source /gnu/binutils/src/ld/testsuite/ld-discard/discard.exp"
+ invoked from within
+"catch "uplevel #0 source $test_file_name""
+testcase /gnu/binutils/src/ld/testsuite/ld-discard/discard.exp completed in 1
seconds
Looking in /gnu/binutils/src/ld/testsuite/ld-elf for directories that match "*"
Ignoring directory CVS
Looking in /gnu/binutils/src/ld/testsuite/ld-elf
-------------------------------<quote>-------------------------------
As you can see, it for some reason can't access the $dumpfile variable
within the scope of the eval. I don't speak tcl good, so I thought I'd see if
anyone here can suggest a way to fix the syntax of the command so that it
works before proposing a patch to delete the line altogether; anyone got a
suggestion?
cheers,
DaveK