[patch] perror should not errcnt across test files

Jan Kratochvil <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.bugs
Message-ID <[email protected]>
Hi,

$ echo 'perror foo' >a.exp; echo 'pass bar' >b.exp; runtest a.exp b.exp; cat testrun.sum
...
Running target unix
Running ./a.exp ...
ERROR: foo
Running ./b.exp ...
UNRESOLVED: bar

		===  Summary ===
...

With the attached patch it shows:

$ echo 'perror foo' >a.exp; echo 'pass bar' >b.exp; runtest a.exp b.exp; cat testrun.sum
...
Running target unix
Running ./a.exp ...
ERROR: foo
Running ./b.exp ...
PASS: bar

		===  Summary ===
...

perror was not intended to affect test results from other files, was it?

The patch resets errcnt and warncnt.  It is causing me spurious UNRESOLVED
results for testcases unrelated to the original perror (in the GDB testsuite).


Thanks,
Jan

_______________________________________________
Bug-dejagnu mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-dejagnu
dejagnu-perror-across-files.patch (text/plain, 369 B)
--- dejagnu-orig/runtest.exp	2008-08-23 20:20:24.000000000 +0200
+++ dejagnu/runtest.exp	2008-08-23 20:25:44.000000000 +0200
@@ -1443,8 +1443,7 @@ proc runtest { test_file_name } {
     global tool
 
     clone_output "Running $test_file_name ..."
-    set prms_id	0
-    set bug_id	0
+    reset_vars
     set test_result ""
 
     if {[file exists $test_file_name]} {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.