[CRIU] [PATCH] zdtm: test -- Add trivial poll() timeout test
Cyrill Gorcunov
gorcunov at gmail.com
Tue Mar 17 07:05:21 PDT 2015
On Tue, Mar 17, 2015 at 04:37:03PM +0300, Andrew Vagin wrote:
> > +
> > + show_timestamp("Init", time_init.tv_sec, time_init.tv_usec);
> > +
> > + delta = 1;
> > + ret = poll(ufds, 2, delta * 1000);
>
> Why do you call poll() here?
To make sure it's workable on its own.
> > +
> > + show_timestamp("From", time1.tv_sec, time1.tv_usec);
> > +
> > + task_waiter_complete(&t, 1);
> > + delta = 5;
> > + ret = poll(ufds, 2, delta * 1000);
>
> Can we call poll() in a loop to be sure that the timeout isn't expired
> during the test?
You mean to spin until some external sync event from main thread comes?
> > + show_pollfd(ufds, 2);
> > +
> > + if (ret && errno != EINTR) {
>
> When can we get EINTR here?
Yes we can i think. Why can't we?
Cyrill
More information about the CRIU
mailing list