Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/tests/syscall



On 5/22/11 12:48 AM, Christos Zoulas wrote:
On May 22, 12:28am, jmmv%julipedia.org@localhost (Julio Merino) wrote:
-- Subject: Re: CVS commit: src/tests/syscall
| That's what was done.  But in order to enforce the timeouts et. al. this
| library had to fork() on every test case.  This was really, really ugly
| (and slow) in shell.  It was also hard to keep the 3 implementations (c,
| c++, shell) in sync.

You should not have to fork if you don't set a timeout. Or you can fork
just one killer and have it timeout in 2x the last registered timeout and exit.
It listens to a socket for pid's and timeouts; if the socket is still
useable after the timeout it kills.

One of the original design goals of atf was to explicitly run every test case in a subprocess. The idea was to prevent broken test cases from corrupting the results of other tests. So yes, you have to fork (if only because it's in the requirements of the design) ;-)

I had actually thought about the alternative you mention not too long ago, but if you do that, then a misbehaving test case will result in the termination of the whole test program (you need to kill a particular process after all). Maybe it's not a big deal since that's what other very-popular frameworks do, but it's a complete shift in how atf currently works.

Anyway. We are getting side-tracked here; I was just trying to see if we had a bug in atf. If you want to discuss this further, the topic needs to be moved to atf-devel.

Home | Main Index | Thread Index | Old Index