This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Re: Make TestBreakpoints deterministic
Mark Wielaard wrote:
Hi Andrew,
On Tue, 2006-08-22 at 11:47 -0400, Andrew Cagney wrote:
We are talking about different tearDowns it seems.
The testcase has its own teardown in which will make sure the eventloop
is stopped (and before that it will now make sure the process is gone,
that is what the patch added).
And there is the TestLib.tearDown() which is called from the testcase
teardown, after the eventloop is properly stopped, and which mobs up any
other processes that might have been spawned.
We're not.
That code assumes that tearDown is a fair-weather method which it is
not. tearDown must work regardless of the state of the rest of the
test. In particular and especially when the test has crashed for some
totally unexplained reason. Relying on a still running event loop
violates that.
I don't see why. We setup the the process and the eventloop in setup, so
we close it down in teardown. Sure if things go completely bonkers thing
fail. But that is what you want from the testsuite to point out things
that break.
Ah, that's how JUnit describes things - JUnit thinks that failures are
clean and predictable. With frysk, that is every thing but true,
Murphy's Law to the Nth. The event loop will crash, the process will
hang. The tearDown needs to be code such that it survives such foul
conditions.
I'll make the necessary changes.
Andrew