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:11 -0400, Andrew Cagney wrote:
Mark Wielaard wrote:
and, unless I'm mistaken, that can only work if the event loop is still
running in its own thread (you seem to think otherwise?)
No, at that time the eventloop is running. Otherwise it wouldn't work as
you said.
Now I am confused, you previously wrote:
The eventloop isn't running during teardown.
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.
It should be possible to make a simple change to testLib.tearDown that
both makes it even more robust and allows you to remove the broken code
in your local tearDown method.
Andrew