[CRIU] Re: [PATCH 2/3] zdtm: Add pipe02 test

Cyrill Gorcunov gorcunov at openvz.org
Sun Jul 1 08:49:51 EDT 2012


On Sun, Jul 01, 2012 at 04:39:16PM +0400, Andrey Wagin wrote:
> What is the idea of this test? I found, that pipe01 checks that all
> data are restored.
> A few comments inline.

pipe01 didn't use SCM for fds pipe restore if i recal correctly
that is why you never got a problem with missing pipe->create
initialization which were addressed in another patch.

> > +       ret = write(pipes[1], TEST_STRING, sizeof(TEST_STRING));
> > +       if (ret != sizeof(TEST_STRING)) {
> > +               err("write failed: %d", ret);
> 
> don't forget to kill a child

ok

> 
> > +               exit(1);
> > +       }
> > +
> > +       test_daemon();
> > +       test_waitsig();
> > +
> > +       task_waiter_complete_current(&t);
> > +
> > +       waitpid(pid, &status, P_ALL);
> > +       errno = (status >> 8) & 0x7f;
> use macroses WEXITSTATUS and WIFEXITED

ok

	Cyrill


More information about the CRIU mailing list