This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Re: Make TestBreakpoints deterministic
If we startup the eventloop again "too soon" what happens is that we see
the proc/task again when we do a Manager.host.requestRefreshXXX(). This
adds the proc as detached to the core. But the kernel still has a
terminate event pending for us from when we were actually attached to it
(which seems to be the reason the proc is still around). So we must
really make sure that we have received all events from the kernel,
including the terminated event, even after we have detached already.
That's the bug then - the original tearDown didn't detach frysk from
those processes, presumably because it didn't know that it needed to?
The TestLib.tearDown code iterates over a list of registered processes
brute force detaching and killing each in turn. Provided the relevant
processes are registered then all should be good. The eventLoop should
certainly not be running at the time tearDown is reached - a bug in the
test case; and needing to add sleep just tells us that the test is
non-deterministic :-(
Andrew