[CRIU] [PATCH] test: add variable delta for poll.c test
Cyrill Gorcunov
gorcunov at gmail.com
Mon Jan 9 01:01:44 PST 2017
On Mon, Jan 09, 2017 at 11:39:28AM +0300, Vitaly Ostrosablin wrote:
>
> diff --git a/test/zdtm/static/poll.c b/test/zdtm/static/poll.c
> index c0f75745..2368d079 100644
> --- a/test/zdtm/static/poll.c
> +++ b/test/zdtm/static/poll.c
> @@ -80,7 +80,9 @@ int main(int argc, char *argv[])
> show_timestamp("Start", time1.tv_sec, time1.tv_usec);
>
> task_waiter_complete(&t, 1);
> - delta = 5;
> + char *deltaenv = getenv("ZDTM_DELTA")
> + if (deltaenv) delta = atoi(deltaenv);
> + else delta = 5;
Fix the style please
deltaenv = getenv("ZDTM_DELTA");
if (deltaenv)
delta = atoi(deltaenv);
else
delta = 5;
Since you've missed semicolon as well I suspect you didn't
even compiled the test
> while (test_go()) {
> ret = poll(ufds, 2, delta * 1000);
> show_pollfd(ufds, 2);
> --
> 2.11.0
>
Cyrill
More information about the CRIU
mailing list