[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dejagnu-bug
Subject:    [Bug-dejagnu] [patch] perror should not errcnt across test files
From:       Jan Kratochvil <jan.kratochvil () redhat ! com>
Date:       2008-08-23 18:34:09
Message-ID: 20080823183409.GA6682 () host0 ! dyn ! jankratochvil ! net
[Download RAW message or body]

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

["dejagnu-perror-across-files.patch" (text/plain)]

--- 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]} {


_______________________________________________
Bug-dejagnu mailing list
Bug-dejagnu@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-dejagnu


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic