* lib/dg.exp (dg-test): There is no need to call unresolved to
authorBen Elliston <bje@gnu.org>
Sun, 20 Mar 2016 06:05:32 +0000 (17:05 +1100)
committerBen Elliston <bje@gnu.org>
Sun, 20 Mar 2016 06:05:32 +0000 (17:05 +1100)
clear errcnt. Instead, pass 0 as argument 2 to perror.
* runtest.exp (runtest): Likewise.

ChangeLog
lib/dg.exp
runtest.exp

index 125f3d4..7d53138 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-20  Ben Elliston  <bje@gnu.org>
+
+       * lib/dg.exp (dg-test): There is no need to call unresolved to
+       clear errcnt. Instead, pass 0 as argument 2 to perror.
+       * runtest.exp (runtest): Likewise.
+
 2016-03-16  Ben Elliston  <bje@gnu.org>
 
        Revert this change (the GCC testsuite uses diff):
index 0114c76..85c5d3f 100644 (file)
@@ -686,9 +686,7 @@ proc dg-test { args } {
            } else {
                perror "$name: $errmsg for \"$op\"\n"
            }
-           # ??? The call to unresolved here is necessary to clear `errcnt'.
-           # What we really need is a proc like perror that doesn't set errcnt.
-           unresolved "$name: $errmsg for \"$op\""
+           perror "$name: $errmsg for \"$op\"" 0
            return
        }
     }
@@ -875,10 +873,7 @@ proc dg-test { args } {
        verbose "Running dg-final tests." 3
        verbose "dg-final-proc:\n[info body dg-final-proc]" 4
        if {[catch "dg-final-proc $prog" errmsg]} {
-           perror "$name: error executing dg-final: $errmsg"
-           # ??? The call to unresolved here is necessary to clear `errcnt'.
-           # What we really need is a proc like perror that doesn't set errcnt.
-           unresolved "$name: error executing dg-final: $errmsg"
+           perror "$name: error executing dg-final: $errmsg" 0
        }
     }
 
index d7facf8..2252bec 100644 (file)
@@ -1499,13 +1499,7 @@ proc runtest { test_file_name } {
     } else {
        # This should never happen, but maybe if the file got removed
        # between the `find' above and here.
-       perror "$test_file_name does not exist."
-       # ??? This is a hack.  We want to send a message to stderr and
-       # to the summary file (just like perror does), but we don't
-       # want the next testcase to get a spurious "unresolved" because
-       # errcnt != 0.  Calling `clone_output' is also supposed to be a
-       # no-no (see the comments for clone_output).
-       set errcnt 0
+       perror "$test_file_name does not exist." 0
     }
 }