* [PATCH] ld/testing: Fix error and warning checks in run_dump_test
@ 2016-03-30 14:07 Andrew Burgess
2016-03-30 14:49 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Burgess @ 2016-03-30 14:07 UTC (permalink / raw)
To: binutils; +Cc: Andrew Burgess
The options warning_output and error_output to the run_dump_test
function were incorrectly checking the return value from the regexp_diff
function, and so, as a result failing tests were showing as a pass.
Fixed in this commit.
ld/ChangeLog:
* testsuite/lib/ld-lib.exp (run_dump_test): Fix check of return
value from regexp_diff.
* testsuite/ld-elf/orphan-5.l: Fix expected output.
* testsuite/ld-elf/orphan-6.l: Likewise.
---
ld/ChangeLog | 7 +++++++
ld/testsuite/ld-elf/orphan-5.l | 4 ++--
ld/testsuite/ld-elf/orphan-6.l | 4 ++--
ld/testsuite/lib/ld-lib.exp | 2 +-
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/ld/testsuite/ld-elf/orphan-5.l b/ld/testsuite/ld-elf/orphan-5.l
index 20a9fe7..765c8ff 100644
--- a/ld/testsuite/ld-elf/orphan-5.l
+++ b/ld/testsuite/ld-elf/orphan-5.l
@@ -1,5 +1,5 @@
#...
-.*warning: orphan section `\.notbad' from `tmpdir/orphan\.o' being placed in section `\.notbad'\.
+.*warning: orphan section `\.notbad' from `tmpdir/.*\.o' being placed in section `\.notbad'\.
#...
-.*warning: orphan section `\.note\.bar' from `tmpdir/orphan\.o' being placed in section `\.note\.bar'\.
+.*warning: orphan section `\.note\.bar' from `tmpdir/.*\.o' being placed in section `\.note\.bar'\.
#...
diff --git a/ld/testsuite/ld-elf/orphan-6.l b/ld/testsuite/ld-elf/orphan-6.l
index 5ac7895..9936140 100644
--- a/ld/testsuite/ld-elf/orphan-6.l
+++ b/ld/testsuite/ld-elf/orphan-6.l
@@ -1,5 +1,5 @@
#...
-.*error: unplaced orphan section `\.notbad' from `tmpdir/orphan\.o'\.
+.*error: unplaced orphan section `\.notbad' from `tmpdir/.*\.o'\.
#...
-.*error: unplaced orphan section `\.note\.bar' from `tmpdir/orphan\.o'\.
+.*error: unplaced orphan section `\.note\.bar' from `tmpdir/.*\.o'\.
#...
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index f4283a5..320ed82 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -975,7 +975,7 @@ proc run_dump_test { name {extra_options {}} } {
&& ($check_ld(regex) == "") == ($comp_output == "") \
&& [regexp $check_ld(regex) $comp_output]) \
|| (($check_ld(source) == "file") \
- && ([regexp_diff "tmpdir/ld.messages" "$srcdir/$subdir/$check_ld(file)"]))) } {
+ && (![regexp_diff "tmpdir/ld.messages" "$srcdir/$subdir/$check_ld(file)"]))) } {
# We have the expected output from ld.
if { $check_ld(terminal) || $program == "" } {
pass $testname
--
2.6.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ld/testing: Fix error and warning checks in run_dump_test
2016-03-30 14:07 [PATCH] ld/testing: Fix error and warning checks in run_dump_test Andrew Burgess
@ 2016-03-30 14:49 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2016-03-30 14:49 UTC (permalink / raw)
To: Andrew Burgess, binutils
Hi Andrew,
> ld/ChangeLog:
>
> * testsuite/lib/ld-lib.exp (run_dump_test): Fix check of return
> value from regexp_diff.
> * testsuite/ld-elf/orphan-5.l: Fix expected output.
> * testsuite/ld-elf/orphan-6.l: Likewise.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-30 14:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-30 14:07 [PATCH] ld/testing: Fix error and warning checks in run_dump_test Andrew Burgess
2016-03-30 14:49 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).