[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: tests where exit is success
On Fri Aug 06 2010 at 12:24:03 +0100, Julio Merino wrote:
> On Wed, Aug 4, 2010 at 12:20 PM, Antti Kantee <pooka%cs.hut.fi@localhost>
> > Hi,
> > Is it possible to write a test case where success is determined by the
> > test program exiting? It is possible to define an expected failure
> > where the test exits, but what about expected success?
> A test program is assumed to pass when it exits. Are you having
> trouble with this?
If it exits without returning from ATF_BODY you get the "test program
exited succesfully but failed to write results" error.
> > The simplest example is testing that exit(3) exits.
> You'd fork+wait to validate exit call.
> > However, I am
> > working on something a little more complicated: a watchdog library.
> Hmm, can you elaborate? I'm afraid you'll have to go through some
> fork/wait dance as mentioned above depending on what you are trying to
Ah, ok. The fork+wait dance will work. I guess this is in demand little
enough to make sense to add it to the atf api.
Is the trick documented somewhere (apart from being documented in the
list archives now ;) ?
Main Index |
Thread Index |