Commit d02fe846 authored by Andrei Vagin's avatar Andrei Vagin Committed by Pavel Emelyanov

zdtm/socket_aio: add a synchonization between processes

The test has to do nothing during c/r.

======================= Run zdtm/static/socket_aio in ns =======================
Start test
./socket_aio --pidfile=socket_aio.pid --outfile=socket_aio.out
Run criu dump
Run criu restore
5: Old maps lost: set(["7f0a5188a000-7f0a5188f000 ['rw-p']"])
5: New maps appeared: set(["7f0a51884000-7f0a5188f000 ['rw-p']", "7f0a51883000-7f0a51884000 ['---p']"])
Send the 9 signal to  97
Wait for zdtm/static/socket_aio(97) to die for 0.100000

Reported-by: Mr Jenkins
travis-ci: success for zdtm/socket_aio: add a synchonization between processes
Signed-off-by: 's avatarAndrei Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d14beb1d
......@@ -32,9 +32,12 @@ int main(int argc, char **argv)
pid_t pid;
int ret, res;
const struct aiocb *aioary[1];
task_waiter_t child_waiter;
test_init(argc, argv);
task_waiter_init(&child_waiter);
if ((fd_s = tcp_init_server(AF_INET, &port)) < 0) {
pr_err("initializing server failed\n");
return 1;
......@@ -65,6 +68,8 @@ int main(int argc, char **argv)
return 1;
}
task_waiter_complete_current(&child_waiter);
/* Wait for request completion */
aioary[0] = &aiocb;
ret = aio_error(&aiocb);
......@@ -109,6 +114,8 @@ again:
goto error;
}
task_waiter_wait4(&child_waiter, pid);
test_daemon();
test_waitsig();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment