summaryrefslogtreecommitdiff
path: root/src/tests/eeze/eeze_test_net.c
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2016-03-11 17:10:54 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2016-03-11 17:59:46 +0100
commite916eae38a085cbbf218727cc545b117848bce57 (patch)
treecece53adc18e00c4afa0e2a3c6b6fd3d0f9c6523 /src/tests/eeze/eeze_test_net.c
parent969bd17ab781e93b8c5a50e47f34c5d159b1f091 (diff)
tests eeze: enable eeze_net IPv6 test again and skip if impossible
The test depends on the host system having IPv6 setup on the loopback device. This is not always the case even if we have a system that does have "struct ipv6_mreq", our HAVE_IPV6 test, and would support it. Skip here if we can't fetch an IPv6 address. The IPv4 test is still running regardless.
Diffstat (limited to '')
-rw-r--r--src/tests/eeze/eeze_test_net.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/tests/eeze/eeze_test_net.c b/src/tests/eeze/eeze_test_net.c
index 6d9f8589d6..7c03ce39c5 100644
--- a/src/tests/eeze/eeze_test_net.c
+++ b/src/tests/eeze/eeze_test_net.c
@@ -71,7 +71,7 @@ START_TEST(eeze_test_net_attr)
71} 71}
72END_TEST 72END_TEST
73 73
74/* 74
75#ifdef HAVE_IPV6 75#ifdef HAVE_IPV6
76START_TEST(eeze_test_net_attr_ipv6) 76START_TEST(eeze_test_net_attr_ipv6)
77{ 77{
@@ -85,8 +85,14 @@ START_TEST(eeze_test_net_attr_ipv6)
85 net = eeze_net_new("lo"); 85 net = eeze_net_new("lo");
86 fail_if(net == NULL); 86 fail_if(net == NULL);
87 87
88 eeze_net_scan(net);
89
88 tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_IP6); 90 tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_IP6);
89 fail_if(tmp == NULL); 91 if (tmp == NULL)
92 {
93 printf("Problems to use IPv6 setup on loopback device. Eeze_net IPv6 test skipped.\n");
94 goto cleanup;
95 }
90 tmp = NULL; 96 tmp = NULL;
91 97
92 tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_BROADCAST6); 98 tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_BROADCAST6);
@@ -96,6 +102,7 @@ START_TEST(eeze_test_net_attr_ipv6)
96 tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_NETMASK6); 102 tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_NETMASK6);
97 fail_if(tmp == NULL); 103 fail_if(tmp == NULL);
98 104
105cleanup:
99 eeze_net_free(net); 106 eeze_net_free(net);
100 107
101 ret = eeze_shutdown(); 108 ret = eeze_shutdown();
@@ -103,14 +110,13 @@ START_TEST(eeze_test_net_attr_ipv6)
103} 110}
104END_TEST 111END_TEST
105#endif 112#endif
106*/ 113
107 114
108void eeze_test_net(TCase *tc) 115void eeze_test_net(TCase *tc)
109{ 116{
110 tcase_add_test(tc, eeze_test_net_list); 117 tcase_add_test(tc, eeze_test_net_list);
111 tcase_add_test(tc, eeze_test_net_attr); 118 tcase_add_test(tc, eeze_test_net_attr);
112#ifdef HAVE_IPV6 119#ifdef HAVE_IPV6
113 //FIXME Figure out why we fail for the ipv6 tests here (code or test) 120 tcase_add_test(tc, eeze_test_net_attr_ipv6);
114 //tcase_add_test(tc, eeze_test_net_attr_ipv6);
115#endif 121#endif
116} 122}