summaryrefslogtreecommitdiff
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:10:54 +0100
commitce89a9837ccd0f7f8cbbf53f46a1ec2f900076d8 (patch)
tree6e0b70dd5753c32969b841af06c215a8946342e1
parentdff0edade7b4d522564f9fc8e104c3e385e7d761 (diff)
tests eeze: enable eeze_net IPv6 test again and skip if impossibledevs/stefan/testsuite-new-tests
These 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.
-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}