aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/lib/ld-lib.exp
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-06-10 13:08:15 +0930
committerAlan Modra <amodra@gmail.com>2020-06-10 22:19:07 +0930
commit84df1f9dcb8ef24cc38db4cc0939e99752c4e42b (patch)
treee86e56f70a0991e1b6a5313c88787109615b7974 /ld/testsuite/lib/ld-lib.exp
parent7ab967941150b2f79fc089893bf51e6bb53d245b (diff)
downloadgdb-84df1f9dcb8ef24cc38db4cc0939e99752c4e42b.zip
gdb-84df1f9dcb8ef24cc38db4cc0939e99752c4e42b.tar.gz
gdb-84df1f9dcb8ef24cc38db4cc0939e99752c4e42b.tar.bz2
Fix x86 ld testsuite fails with glibc < 2.28
* testsuite/ld-elf/linux-x86.exp: Build tests when non-native. (check_pr25749b): Add optional args. Set expected pass file from args. Run -1b and -2a tests with passall.out. * testsuite/ld-elf/passall.out: New file. * testsuite/ld-elf/pr25749-1.c: Adjust to pass with older glibc. * testsuite/ld-elf/pr25749-2.c: Likewise. * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use regexp_diff to compare expected output from running binary.
Diffstat (limited to 'ld/testsuite/lib/ld-lib.exp')
-rw-r--r--ld/testsuite/lib/ld-lib.exp11
1 files changed, 3 insertions, 8 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 6535881..a949437 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -773,14 +773,9 @@ proc run_ld_link_exec_tests { ldtests args } {
verbose "$exec_output" 1
set failed 1
} else {
- send_log "diff $binfile.out $srcdir/$subdir/$expfile\n"
- verbose "diff $binfile.out $srcdir/$subdir/$expfile"
- catch "exec diff $binfile.out $srcdir/$subdir/$expfile" exec_output
- set exec_output [prune_warnings $exec_output]
-
- if ![string match "" $exec_output] then {
- send_log "$exec_output\n"
- verbose "$exec_output" 1
+ send_log [file_contents $binfile.out]
+ verbose [file_contents $binfile.out] 2
+ if [regexp_diff "$binfile.out" "$srcdir/$subdir/$expfile"] {
set failed 1
}
}