[CRIU] [PATCH] zdtm: Fix race in zdtm/transition/epoll.c test
Andrei Vagin
avagin at virtuozzo.com
Wed Feb 28 22:32:43 MSK 2018
Applied, thanks
On Tue, Feb 20, 2018 at 12:28:52PM +0300, Kirill Tkhai wrote:
> Child may see close() result before it receives signal,
> while it shouldn't see it. Instead of games with later
> close(), just stop do it. sys_exit() after program finish
> will close them all.
>
> Reported-by: Andrey Vagin <avagin at virtuozzo.com>
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
> ---
> test/zdtm/transition/epoll.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/zdtm/transition/epoll.c b/test/zdtm/transition/epoll.c
> index f89d96d41..4eac5214c 100644
> --- a/test/zdtm/transition/epoll.c
> +++ b/test/zdtm/transition/epoll.c
> @@ -175,8 +175,8 @@ int main(int argc, char **argv)
>
> test_waitsig();
>
> - killall();
> for (i = 0; i < scale; i++) {
> + kill(pids[i], SIGUSR2);
> if (waitpid(pids[i], &rv, 0) < 0) {
> fail("waitpid error: %m\n");
> counter++;
>
More information about the CRIU
mailing list