2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

zdtm: add a new test, where both sides of a tcp connection is dumped

Reported-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2013-08-20 14:58:14 +04:00
committed by Pavel Emelyanov
parent 4329287717
commit 0c5b606b48
4 changed files with 12 additions and 0 deletions

View File

@@ -104,6 +104,7 @@ static/socket-tcp6
streaming/socket-tcp
streaming/socket-tcp6
static/socket-tcpbuf
static/socket-tcpbuf-local
static/socket-tcpbuf6
static/pty03
static/mountpoints

View File

@@ -54,6 +54,7 @@ TST_NOFILE = \
socket-tcp \
socket-tcp6 \
socket-tcpbuf \
socket-tcpbuf-local \
socket-tcpbuf6 \
sock_opts00 \
sock_opts01 \
@@ -238,6 +239,7 @@ sem: override CFLAGS += -DNEW_IPC_NS
posix_timers: override LDLIBS += -lrt
socket-tcp6: override CFLAGS += -D ZDTM_IPV6
socket-tcpbuf6: override CFLAGS += -D ZDTM_IPV6
socket-tcpbuf-local: override CFLAGS += -D ZDTM_TCP_LOCAL
socket_listen6: override CFLAGS += -D ZDTM_IPV6
sigpending: override LDLIBS += -lrt

View File

@@ -0,0 +1 @@
socket-tcpbuf.c

View File

@@ -96,6 +96,10 @@ int main(int argc, char **argv)
int sk_bsize;
int ret, snd_size, rcv_size;
#ifdef ZDTM_TCP_LOCAL
test_init(argc, argv);
#endif
if (pipe(pfd)) {
err("pipe() failed");
return 1;
@@ -109,7 +113,9 @@ int main(int argc, char **argv)
int size;
char c;
#ifndef ZDTM_TCP_LOCAL
test_ext_init(argc, argv);
#endif
close(pfd[1]);
if (read(pfd[0], &port, sizeof(port)) != sizeof(port)) {
@@ -154,7 +160,9 @@ int main(int argc, char **argv)
return 0;
}
#ifndef ZDTM_TCP_LOCAL
test_init(argc, argv);
#endif
if ((fd_s = tcp_init_server(ZDTM_FAMILY, &port)) < 0) {
err("initializing server failed");