Hi Rob perror takes a second argument which can set the errcnt (added in 1995). However, code written after that time doesn't make use of it. Is there any reason why the following isn't fine?
Cheers, Ben diff --git a/lib/dg.exp b/lib/dg.exp index 0114c76..a2503fb 100644 --- a/lib/dg.exp +++ b/lib/dg.exp @@ -686,9 +689,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 +876,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 } } diff --git a/runtest.exp b/runtest.exp index d7facf8..478ae33 100644 --- a/runtest.exp +++ b/runtest.exp @@ -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 } }
signature.asc
Description: Digital signature
_______________________________________________ DejaGnu mailing list DejaGnu@gnu.org https://lists.gnu.org/mailman/listinfo/dejagnu