Skip to content

Commit 1004e91

Browse files
avaginxemul
authored andcommitted
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: Andrei Vagin <[email protected]> Signed-off-by: Pavel Emelyanov <[email protected]>
1 parent 0dea86c commit 1004e91

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/zdtm/static/socket_aio.c

+7
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ int main(int argc, char **argv)
3232
pid_t pid;
3333
int ret, res;
3434
const struct aiocb *aioary[1];
35+
task_waiter_t child_waiter;
3536

3637
test_init(argc, argv);
3738

39+
task_waiter_init(&child_waiter);
40+
3841
if ((fd_s = tcp_init_server(AF_INET, &port)) < 0) {
3942
pr_err("initializing server failed\n");
4043
return 1;
@@ -65,6 +68,8 @@ int main(int argc, char **argv)
6568
return 1;
6669
}
6770

71+
task_waiter_complete_current(&child_waiter);
72+
6873
/* Wait for request completion */
6974
aioary[0] = &aiocb;
7075
ret = aio_error(&aiocb);
@@ -109,6 +114,8 @@ int main(int argc, char **argv)
109114
goto error;
110115
}
111116

117+
task_waiter_wait4(&child_waiter, pid);
118+
112119
test_daemon();
113120
test_waitsig();
114121

0 commit comments

Comments
 (0)