Hi!
> > I've overlooked the second case, however checkpoint works for this one
> > as well. You need to build a helper binary setpgid03_child.c that would
> > call the signal function and then do the wait.
> >
> > The checkpoint interface is build on the top of unix sockets so it does
> > not matter whether the process was forked, execed or started from
> > termial. All that is needed is correct CWD (which is inherited both on
> > fork and exec) so that the socked special file is found.
> >
> There is one issue.
> 
> Look at lib/tests/tst_checkpoint_parent.c.
> 
> If the child exits before calling TST_CHECKPOINT_CHILD_WAIT(&checkpoint) 
> (for example, if it gets a signal), the parent
> will wait at TST_CHECKPOINT_SIGNAL_CHILD(NULL, &checkpoint) (blocking at 
> open(O_WRONLY)) until we kill it manually.

Yes, it will hang. Feel free to send a patch with a timeout.

> I don't think that such situation can occur in this particular test case 
> but if we had more activity (like function calls and some logic) before
> execution of TST_CHECKPOINT_CHILD_WAIT in the child, we would have troubles.

It's unlikely situation but it may happen. Generally any of the tests
may hang (due to bug in libc or kernel for example) and ideally the test
driver (ltp-pan currently) should watch for timeouts and kill such
tests, which is not implemented currently.

I'm working on replacement testdriver when my time allows, I have most
of the major parts working and hope to have working prototype soon
(hopefully till the end of the year).

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to