Update libuv

This commit is contained in:
KimLS
2017-02-25 14:30:35 -08:00
parent d402b25d69
commit 6033f48b47
115 changed files with 4304 additions and 893 deletions
@@ -29,6 +29,7 @@ static uv_tcp_t tcp_handle;
static int connect_cb_called;
static int timer1_cb_called;
static int close_cb_called;
static int netunreach_errors;
static void close_cb(uv_handle_t* handle) {
@@ -37,9 +38,15 @@ static void close_cb(uv_handle_t* handle) {
static void connect_cb(uv_connect_t* req, int status) {
ASSERT(status == UV_ECANCELED);
/* The expected error is UV_ECANCELED but the test tries to connect to what
* is basically an arbitrary address in the expectation that no network path
* exists, so UV_ENETUNREACH is an equally plausible outcome.
*/
ASSERT(status == UV_ECANCELED || status == UV_ENETUNREACH);
uv_timer_stop(&timer2_handle);
connect_cb_called++;
if (status == UV_ENETUNREACH)
netunreach_errors++;
}
@@ -82,5 +89,9 @@ TEST_IMPL(tcp_close_while_connecting) {
ASSERT(close_cb_called == 2);
MAKE_VALGRIND_HAPPY();
if (netunreach_errors > 0)
RETURN_SKIP("Network unreachable.");
return 0;
}