[CRIU] [PATCH v2] zdtm/pty02: never close master before reading slave
Pavel Emelyanov
xemul at parallels.com
Mon Dec 8 04:40:07 PST 2014
On 12/05/2014 02:51 PM, Vladimir Davydov wrote:
> We may close the master before reading the slave if the child runs first
> when the parent wakes it up using task_waiter_complete. In this case the
> subsequent read from the slave will return 0 resulting in a false
> positive test failure:
>
> 13:23:42.194: 30914: ERR: pty02.c:89: read(slave) failed (errno = 11 (Resource temporarily unavailable))
>
> Fix this by waking the child, which closes the master, only after the
> read has been completed.
>
> Also note errno = EAGAIN in the failure report above, which looks really
> confusing. Let's print the actual number of bytes read/written along
> with the errno while reporting a read/write failure to make the error
> reporting clearer in this test.
>
> Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
> Cc: Cyrill Gorcunov <gorcunov at parallels.com>
Applied, thanks
More information about the CRIU
mailing list