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]

[PATCH 18/19] ld: testsuite: Sanitize output from ld


Apparently the leading dashes from an LD error message confuse DejaGnu.

This patch fixes the following DejaGnu error:

  --defsym:1: undefined symbol `foo2' referenced in expression
  failed with: <--defsym:1: undefined symbol `foo2' referenced in expression>, no expected output
  ERROR: tcl error sourcing /home/dinux/projects/misc/binutils-gdb/ld/testsuite/ld-gc/gc.exp.
  ERROR: usage: send [args] string
      while executing
  "send_log "$comp_output\n""
      (procedure "run_dump_test" line 376)
      invoked from within
  "run_dump_test "pr13683""
      (file "/home/dinux/projects/misc/binutils-gdb/ld/testsuite/ld-gc/gc.exp" line 136)
      invoked from within
  "source /home/dinux/projects/misc/binutils-gdb/ld/testsuite/ld-gc/gc.exp"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 source /home/dinux/projects/misc/binutils-gdb/ld/testsuite/ld-gc/gc.exp"
      invoked from within
  "catch "uplevel #0 source $test_file_name""

 ==============
2016-10-16  Dimitar Dimitrov <dimitar@dinux.eu>

	* ld/testsuite/lib/ld-lib.exp (run_dump_test): Sanitize output from
	ld.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
 ld/testsuite/lib/ld-lib.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 74dc998..92351fb 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -984,6 +984,7 @@ proc run_dump_test { name {extra_options {}} } {
 	}
 
 	regsub "\n$" $comp_output "" comp_output
+	regsub "^--" $comp_output "" comp_output
 	if { $cmdret != 0 || $comp_output != "" || $check_ld(source) != "" } then {
 	    set exitstat "succeeded"
 	    if { $cmdret != 0 } { set exitstat "failed" }
-- 
2.10.2


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