aboutsummaryrefslogtreecommitdiffstats
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
parenteeze: remove trailing whitespace (diff)
downloadefl-devs/stefan/testsuite-new-tests.tar.gz
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)
}
END_TEST
-/*
+
#ifdef HAVE_IPV6
START_TEST(eeze_test_net_attr_ipv6)
{
@@ -85,8 +85,14 @@ START_TEST(eeze_test_net_attr_ipv6)
net = eeze_net_new("lo");
fail_if(net == NULL);
+ eeze_net_scan(net);
+
tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_IP6);
- fail_if(tmp == NULL);
+ if (tmp == NULL)
+ {
+ printf("Problems to use IPv6 setup on loopback device. Eeze_net IPv6 test skipped.\n");
+ goto cleanup;
+ }
tmp = NULL;
tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_BROADCAST6);
@@ -96,6 +102,7 @@ START_TEST(eeze_test_net_attr_ipv6)
tmp = eeze_net_addr_get(net, EEZE_NET_ADDR_TYPE_NETMASK6);
fail_if(tmp == NULL);
+cleanup:
eeze_net_free(net);
ret = eeze_shutdown();
@@ -103,14 +110,13 @@ START_TEST(eeze_test_net_attr_ipv6)
}
END_TEST
#endif
-*/
+
void eeze_test_net(TCase *tc)
{
tcase_add_test(tc, eeze_test_net_list);
tcase_add_test(tc, eeze_test_net_attr);
#ifdef HAVE_IPV6
- //FIXME Figure out why we fail for the ipv6 tests here (code or test)
- //tcase_add_test(tc, eeze_test_net_attr_ipv6);
+ tcase_add_test(tc, eeze_test_net_attr_ipv6);
#endif
}