Just wanted to mention that I noticed an odd thing on fc6 when using the TestRunner inside a frysk CVS checkout. If TestRunner is used on anything that uses ptrace it seems the process gets forked and executed twice. So: $ ./TestRunner frysk.sys.proc.TestStatus Goes fine and gets run nicely as is. But if any test is included that uses ptrace then you will see a second (and maybe more!) run a little later after the original TestRunner is finished like: $ ./TestRunner frysk.sys.TestCallPtrace Running testChildContinue(frysk.sys.TestCallPtrace) ...PASS Running testAttach(frysk.sys.TestCallPtrace) ...PASS Time: 0.003 OK (2 tests) [[ ... insert 5 second delay ...]]] $ DETACHED PROCESS: EXITING FAIL junit.framework.AssertionFailedError Time: 5.006 There was 1 failure: 1) testAttach(frysk.sys.TestCallPtrace)junit.framework.AssertionFailedError at frysk.sys.TestCallPtrace.testAttach(TestRunner) at frysk.junit.Runner.<init>(TestRunner) at TestRunner.main(TestRunner) FAILURES!!! Tests run: 2, Failures: 1, Errors: 0 Note that in a make check this second run isn't noticed to fail by make. So you might see some random messages indicating failures and then having make check succeed anyway. This might explain some of the different reports we were seeing where people claimed things did or did not fail. I haven't figured out yet what exactly seems to cause these ghost TestRunner forks to happen. But it is either related to ptrace or maybe when using a test that spawns a helper binary. I am not really investigating atm, but if someone wants I can take a closer look. $ cat /etc/redhat-release Fedora Core release 5.91 (FC6 Test2) $ uname -a Linux hermans.wildebeest.org 2.6.17-1.2583.fc6 #1 SMP Tue Aug 22 00:29:50 EDT 2006 i686 i686 i386 GNU/Linux $ cat frysk/common/version.in 0.0.1.2006.08.23
*** Bug 3126 has been marked as a duplicate of this bug. ***
Solved by: 2006-08-22 Andrew Cagney <cagney@redhat.com> * TestLib.java (tearDown): For terminated threads, re-reap their pid. * TestBreakpoints.java (tearDown): Delete code using the event loop to reap children. (setUp): Do not add to Manager .host .observableProcRemovedXXX .addObserver. 2006-08-22 Mark Wielaard <mark@klomp.org> * TestBreakpoints.java (tearDown): Add more comments about child process creation and dead. 2006-08-21 Mark Wielaard <mark@klomp.org> * TestBreakpoints.java: Implements Observer. (procTerminated): New boolean field. (setup): Add observableProcRemoved to manager.host. (tearDown): Make sure proc is really gone. (update): New method.