From 393b6f9eaf6178f62ca4f43927d00a13de38797c Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 8 Mar 2023 08:39:47 +0100 Subject: [PATCH] CI: do not skip net_udp test but not fail on mcast Do not skip the whole net_udp test suite but rather only suppress the multicast initialize fail in macOS runner. --- test/run_tests.c | 3 --- test/test_net_udp.c | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/run_tests.c b/test/run_tests.c index aa9531000..042dbfc82 100644 --- a/test/run_tests.c +++ b/test/run_tests.c @@ -155,9 +155,6 @@ static bool run_tests(const char *test) } bool ret = true; for (unsigned i = 0; i < sizeof tests / sizeof tests[0]; ++i) { - if (getenv("GITHUB_REPOSITORY") != NULL && strcmp(tests[i].name, "test_net_udp") == 0) { - continue; // skip this test in CI - } ret = test_helper(tests[i].name, tests[i].test, tests[i].quiet) && ret; } return ret; diff --git a/test/test_net_udp.c b/test/test_net_udp.c index e11492044..c2c8e06cb 100644 --- a/test/test_net_udp.c +++ b/test/test_net_udp.c @@ -367,7 +367,7 @@ int test_net_udp(void) if (s1 == NULL) { printf("FAIL\n"); printf(" Cannot initialize socket\n"); - return -1; + goto abort_multicast_ipv6; } randomize(buf1, BUFSIZE); randomize(buf2, BUFSIZE); @@ -409,7 +409,9 @@ int test_net_udp(void) hname = udp_host_addr(s1); /* we need this for the unicast test... */ printf("Ok\n"); abort_multicast_ipv6: - udp_exit(s1); + if (s1 != NULL) { + udp_exit(s1); + } #else printf ("Testing UDP/IP networking (IPv6 loopback) ................................ --\n");