Fix duplicate FAILs from ld testsuite
authorAlan Modra <amodra@gmail.com>
Tue, 23 Aug 2016 02:52:25 +0000 (12:22 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 23 Aug 2016 02:53:05 +0000 (12:23 +0930)
* testsuite/lib/ld-lib.exp (run_cc_link_tests): Don't fail tests
twice.

ld/ChangeLog
ld/testsuite/lib/ld-lib.exp

index 34cdf776ad5694726d22913ae55d2ecdc5c72ff7..02375edc18d44a4a4627f9163427e7f44475682a 100644 (file)
@@ -1,3 +1,8 @@
+2016-08-23  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/lib/ld-lib.exp (run_cc_link_tests): Don't fail tests
+       twice.
+
 2016-08-19  Nick Clifton  <nickc@redhat.com>
 
        * emultempl/aarch64elf.em (before_parse): Initialise the relro
index 7b190bee2a6e787819afe719a7a90bdd3d261bdc..616ac51c88515d555709b3238884e4b23c8b91f9 100644 (file)
@@ -1588,7 +1588,6 @@ proc run_cc_link_tests { ldtests } {
            # compile only
        } elseif { [regexp ".*\\.a$" $binfile] } {
            if { ![ar_simple_create $ar $ldflags $binfile "$objfiles"] } {
-               fail $testname
                set failed 1
            }
        } else {
@@ -1605,10 +1604,6 @@ proc run_cc_link_tests { ldtests } {
                    set failed 1
                }
            }
-
-           if { $failed == 1 } {
-               fail $testname
-           }
        }
 
        if { $failed == 0 } {
@@ -1669,13 +1664,12 @@ proc run_cc_link_tests { ldtests } {
            }
        }
 
-       if { $failed != 0 } {
+       if { $failed } {
            fail $testname
-       } elseif { $is_unresolved == 0 } {
-           pass $testname
-       } else {
+       } elseif { $is_unresolved } {
            unresolved $testname
-           continue
+       } else {
+           pass $testname
        }
     }
 }