aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitar Dimitrov <dimitar@dinux.eu>2016-12-30 12:39:59 +0200
committerAlan Modra <amodra@gmail.com>2016-12-31 12:00:42 +1030
commit517c4166988047036a57f4bb36e00458b51ade62 (patch)
tree341ad312f9b9d54071e70f31bc9c2b285f57f295
parent3f66c01be30edcfaedd11d475078f78e464ca4a0 (diff)
downloadfsf-binutils-gdb-517c4166988047036a57f4bb36e00458b51ade62.zip
fsf-binutils-gdb-517c4166988047036a57f4bb36e00458b51ade62.tar.gz
fsf-binutils-gdb-517c4166988047036a57f4bb36e00458b51ade62.tar.bz2
ld testsuite: Sanitize output from ld
Leading dashes from an LD error message confuse send_log, because the string is taken to be an option. 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 .../ld/testsuite/ld-gc/gc.exp. ERROR: usage: send [args] string while executing "send_log "$comp_output\n"" (procedure "run_dump_test" line 376) * testsuite/lib/ld-lib.exp (run_dump_test): Pass -- to send_log. Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/testsuite/lib/ld-lib.exp6
2 files changed, 7 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index be179ed..144672e 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2016-12-31 Dimitar Dimitrov <dimitar@dinux.eu>
+
+ * testsuite/lib/ld-lib.exp (run_dump_test): Pass -- to send_log.
+
2016-12-28 Alan Modra <amodra@gmail.com>
PR ld/20995
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index a2be49b..de0848a 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -857,7 +857,7 @@ proc run_dump_test { name {extra_options {}} } {
remote_file build delete "ld.tmp"
if { [lindex $cmdret 0] != 0 || ![string match "" $comp_output] } then {
- send_log "$comp_output\n"
+ send_log -- "$comp_output\n"
verbose "$comp_output" 3
set exitstat "succeeded"
@@ -880,7 +880,7 @@ proc run_dump_test { name {extra_options {}} } {
if { [lindex $cmdret 0] != 0 \
|| ![string match "" $comp_output] } {
- send_log "$comp_output\n"
+ send_log -- "$comp_output\n"
verbose "$comp_output" 3
set exitstat "succeeded"
@@ -996,7 +996,7 @@ proc run_dump_test { name {extra_options {}} } {
} else {
verbose -log "$exitstat with: <$comp_output>, no expected output"
}
- send_log "$comp_output\n"
+ send_log -- "$comp_output\n"
verbose "$comp_output" 3
if { (($check_ld(source) == "") == ($comp_output == "")) \