----- Original Message -----
> From: [email protected]
> To: "Jan Stancek" <[email protected]>
> Cc: [email protected]
> Sent: Monday, 20 May, 2013 4:48:27 PM
> Subject: Re: [LTP] [PATCH 2/2] waitid02: split code into separate testcases
>
> Hi!
> > +static void waiting_child(struct testcase_t *t)
> > +{
> > + int dummy;
> > + read(t->pipefd[0], &dummy, 1);
> > +}
> > +
> > +static void stopped_child(struct testcase_t *t)
> > +{
> > + int dummy;
> > + kill(getpid(), SIGSTOP);
> > + read(t->pipefd[0], &dummy, 1);
> > +}
> > +
> > +static void setup2(struct testcase_t *t)
> > +{
> > + if (pipe(t->pipefd) == -1)
> > + tst_brkm(TBROK|TERRNO, cleanup, "pipe");
> > + makechild(t, waiting_child);
>
> I wonder if it would be better to use the TST_CHECKPOINT() interface
> that I have written to address synchronization issues.
I recall that we talked about limitation of single checkpoint per test and
since there were 3 children it somehow got stuck in my head that I need pipes.
But as I split it into separate testcases that should no longer apply.
I'll look into converting it to use TST_CHECKPOINT().
Regards,
Jan
>
> Have you used pipes because you wanted to avoid tst_tmpdir() and the
> FIFO that the code uses? Unfortunately the checkpoint interface must use
> fifo instead of pipes to be usable for cases where the file descriptors
> cannot be propagated to child because it does exec() right after
> fork()... If that is the issue, I can rewrite the checkpoint interface
> in a way that would allow either pipe or fifo depending on
> initialization parameters.
>
> --
> Cyril Hrubis
> [email protected]
>
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list