ld/testing: Fix error and warning checks in run_dump_test
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 30 Mar 2016 13:34:34 +0000 (14:34 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 30 Mar 2016 16:58:05 +0000 (17:58 +0100)
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
ld/testsuite/ld-elf/orphan-5.l
ld/testsuite/ld-elf/orphan-6.l
ld/testsuite/lib/ld-lib.exp

index 17c0f6f8ad74a8a80c556751cd8e0b864c2f758a..711817cec841821dd9e8cc9ef33c472bb8c37b02 100644 (file)
@@ -1,3 +1,10 @@
+2016-03-30  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * 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.
+
 2016-03-30  Alan Modra  <amodra@gmail.com>
 
        PR 18452
index 20a9fe7c762a62b26e2fe820aee3e3a94cdc67ef..765c8ff37b76543b525d6460377035422ad38d66 100644 (file)
@@ -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'\.
 #...
index 5ac7895c1c61622026faf7c47a023874c9a5181c..9936140e36e0d8f35e84e48e8db3cf2e24026333 100644 (file)
@@ -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'\.
 #...
index f4283a5c6d66fed8ff642296e065ba2b0d5f8a8c..320ed827434a174c4c1b920188431c8ec36286fd 100644 (file)
@@ -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
This page took 0.064804 seconds and 4 git commands to generate.