Commit c0bc79d9 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

zdtm: allow to execute tcp tests in network namespaces

Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a2780c61
......@@ -147,6 +147,10 @@ generate_test_list()
static/dumpable01
static/dumpable02
static/deleted_dev
static/socket-tcpbuf-local
static/socket-tcpbuf6-local
static/socket-tcp-local
static/socket-tcp6-local
"
#
......@@ -182,7 +186,6 @@ generate_test_list()
streaming/socket-tcp
streaming/socket-tcp6
static/socket-tcpbuf
static/socket-tcpbuf-local
static/socket-tcpbuf6
static/pty03
static/mountpoints
......
......@@ -61,8 +61,11 @@ TST_NOFILE = \
socket_queues02 \
socket-tcp \
socket-tcp6 \
socket-tcp-local \
socket-tcp6-local \
socket-tcpbuf \
socket-tcpbuf-local \
socket-tcpbuf6-local \
socket-tcpbuf6 \
socket-closed-tcp \
sock_opts00 \
......@@ -339,6 +342,9 @@ posix_timers: override LDLIBS += -lrt -pthread
socket-tcp6: override CFLAGS += -D ZDTM_IPV6
socket-tcpbuf6: override CFLAGS += -D ZDTM_IPV6
socket-tcpbuf-local: override CFLAGS += -D ZDTM_TCP_LOCAL
socket-tcpbuf6-local: override CFLAGS += -D ZDTM_TCP_LOCAL -D ZDTM_IPV6
socket-tcp6-local: override CFLAGS += -D ZDTM_TCP_LOCAL -D ZDTM_IPV6
socket-tcp-local: override CFLAGS += -D ZDTM_TCP_LOCAL
socket_listen6: override CFLAGS += -D ZDTM_IPV6
sigpending: override LDLIBS += -lrt
vdso01: override LDLIBS += -lrt
......
socket-tcp.c
\ No newline at end of file
{'flavor': 'h ns uns', 'opts': '--tcp-established'}
socket-tcp.opts
\ No newline at end of file
......@@ -61,6 +61,10 @@ int main(int argc, char **argv)
int val;
socklen_t optlen;
#ifdef ZDTM_TCP_LOCAL
test_init(argc, argv);
#endif
if (pipe(pfd)) {
pr_perror("pipe() failed");
return 1;
......@@ -71,7 +75,9 @@ int main(int argc, char **argv)
pr_perror("fork() failed");
return 1;
} else if (extpid == 0) {
#ifndef ZDTM_TCP_LOCAL
test_ext_init(argc, argv);
#endif
close(pfd[1]);
if (read(pfd[0], &port, sizeof(port)) != sizeof(port)) {
......@@ -115,7 +121,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) {
pr_err("initializing server failed\n");
......
socket-tcp.c
\ No newline at end of file
socket-tcp-local.desc
\ No newline at end of file
socket-tcp.opts
\ No newline at end of file
{'flavor': 'h', 'opts': '--tcp-established'}
{'flavor': 'h ns uns', 'opts': '--tcp-established'}
socket-tcpbuf.c
\ No newline at end of file
socket-tcpbuf-local.desc
\ No newline at end of file
socket-tcpbuf.opts
\ No newline at end of file
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