summaryrefslogtreecommitdiffstats
path: root/tests/torture.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-12-10 11:38:08 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-12-10 14:23:27 +0100
commitfe78b28f689201617bc8312378f3c7f59239eb1b (patch)
tree36e1e88a9f2cccf24d0d6f5bfba30585902e3552 /tests/torture.c
parent88aeb652d94f7f951ca9cd41322202f7f02e8acb (diff)
downloadsocket_wrapper-fe78b28f689201617bc8312378f3c7f59239eb1b.tar.gz
socket_wrapper-fe78b28f689201617bc8312378f3c7f59239eb1b.tar.xz
socket_wrapper-fe78b28f689201617bc8312378f3c7f59239eb1b.zip
torture: Add torture_setup_echo_srv_udp_ipv6().
Diffstat (limited to 'tests/torture.c')
-rw-r--r--tests/torture.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/torture.c b/tests/torture.c
index de09ab8..e2bab8c 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -78,7 +78,7 @@ void torture_setup_socket_dir(void **state)
*state = s;
}
-void torture_setup_echo_srv_udp_ipv4(void **state)
+static void torture_setup_echo_srv_udp_ip(void **state, const char *ip)
{
struct torture_state *s;
char start_echo_srv[1024] = {0};
@@ -90,7 +90,7 @@ void torture_setup_echo_srv_udp_ipv4(void **state)
snprintf(start_echo_srv, sizeof(start_echo_srv),
"%s/tests/echo_srv -b %s -D -u --pid %s",
- BINARYDIR, TORTURE_ECHO_SRV_IPV4, s->srv_pidfile);
+ BINARYDIR, ip, s->srv_pidfile);
rc = system(start_echo_srv);
assert_int_equal(rc, 0);
@@ -98,6 +98,16 @@ void torture_setup_echo_srv_udp_ipv4(void **state)
sleep(1);
}
+void torture_setup_echo_srv_udp_ipv4(void **state)
+{
+ torture_setup_echo_srv_udp_ip(state, TORTURE_ECHO_SRV_IPV4);
+}
+
+void torture_setup_echo_srv_udp_ipv6(void **state)
+{
+ torture_setup_echo_srv_udp_ip(state, TORTURE_ECHO_SRV_IPV6);
+}
+
void torture_teardown_socket_dir(void **state)
{
struct torture_state *s = *state;