8000 test: optional IPv6 for tcp/udp tos test by alfredh · Pull Request #1252 · baresip/re · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

test: optional IPv6 for tcp/udp tos test #1252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static bool ipv6_handler(const char *ifname, const struct sa *sa, void *arg)
}


static bool ipv6_supported(void)
bool test_ipv6_supported(void)
{
bool supp = false;

Expand All @@ -51,7 +51,7 @@ int test_net_dst_source_addr_get(void)

TEST_ASSERT(sa_is_loopback(&ip));

if (ipv6_supported()) {
if (test_ipv6_supported()) {

sa_init(&dst, AF_INET6);
sa_init(&ip, AF_UNSPEC);
Expand Down
6 changes: 4 additions & 2 deletions test/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@ int test_tcp_tos(void)
err = tcp_tos("127.0.0.1");
TEST_ERR(err);

err = tcp_tos("::1");
TEST_ERR(err);
if (test_ipv6_supported()) {
err = tcp_tos("::1");
TEST_ERR(err);
}

out:
return err;
Expand Down
1 change: 1 addition & 0 deletions test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ int test_load_file(struct mbuf *mb, const char *filename);
int test_write_file(struct mbuf *mb, const char *filename);
void test_set_datapath(const char *path);
const char *test_datapath(void);
bool test_ipv6_supported(void);


/*
Expand Down
6 changes: 4 additions & 2 deletions test/udp.c
4C77
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ int test_udp_tos(void)
err = udp_tos("127.0.0.1");
TEST_ERR(err);

err = udp_tos("::1");
TEST_ERR(err);
if (test_ipv6_supported()) {
err = udp_tos("::1");
TEST_ERR(err);
}

out:
return err;
Expand Down
Loading
0