[LTP] [PATCH 2/2] pause01: rewrite testcase
Cyril Hrubis
chrubis@suse.cz
Thu May 12 11:14:57 CEST 2016
Hi!
> > > -static void go(int sig)
> > > -{
> > > - (void)sig;
> > > + /*
> > > + * TST_CHECKPOINT_WAIT has built-in timeout, if pause() doesn't return,
> > > + * this checkpoint call will reliably end the test.
> > > + */
> > > + TST_CHECKPOINT_WAIT(0);
> > > + SAFE_WAIT(&status);
> >
> > Hmm, maybe it would be better if we add timeout logic to the new test
> > library instead of adding it to selected few testcases.
>
> I pushed it with all your suggestions, except for the timeout logic.
>
> Did you have something specific in mind how to implement this?
> My first thought was a new field to tst_test struct, and forking
> a watchdog process.
I was thinking of forking watchdog process for every test since you
cannot really tell which testcases will block. Then have defined default
timeout in the test library with possible override in the tst_test
structure. But perhaps this is too heavy approach, I will have to
measure how much will this slow down the test execution.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list