You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "wangchen61698 (via GitHub)" <gi...@apache.org> on 2023/08/03 07:21:39 UTC
[GitHub] [nuttx] wangchen61698 opened a new pull request, #10038: net:Add check for address binding
wangchen61698 opened a new pull request, #10038:
URL: https://github.com/apache/nuttx/pull/10038
## Summary
libuvtestcase1:
TEST_IMPL(tcp_bind_error_addrnotavail_2) {
struct sockaddr_in addr;
uv_tcp_t server;
int r;
init_called_count();
ASSERT(0 == uv_ip4_addr("[4.4.4.4](http://4.4.4.4/)", TEST_PORT, &addr));
r = uv_tcp_init(uv_default_loop(), &server);
ASSERT(r == 0);
r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
ASSERT(r == UV_EADDRNOTAVAIL);
uv_close((uv_handle_t*)&server, close_cb);
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
MAKE_VALGRIND_HAPPY();
return 0;
}
libuvtestcase2:
TEST_IMPL(tcp_bind6_error_addrnotavail) {
struct sockaddr_in6 addr;
uv_tcp_t server;
int r;
close_cb_called = 0;
if (!can_ipv6())
RETURN_SKIP("IPv6 not supported");
ASSERT(0 == uv_ip6_addr("4:4:4:4:4:4:4:4", TEST_PORT, &addr));
r = uv_tcp_init(uv_default_loop(), &server);
ASSERT(r == 0);
r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0);
ASSERT(r == UV_EADDRNOTAVAIL);
uv_close((uv_handle_t*)&server, close_cb);
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
ASSERT(close_cb_called == 1);
MAKE_VALGRIND_HAPPY();
return 0;
}
## Impact
## Testing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 merged pull request #10038: net:Add check for address binding
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #10038:
URL: https://github.com/apache/nuttx/pull/10038
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org