Commit 0c5b606b authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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

Reported-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 43292877
......@@ -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
......
......@@ -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
......
socket-tcpbuf.c
\ No newline at end of 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");
......
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