From d6dadc0739760fbe40ca56c96525ca301ae34be7 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sun, 25 Feb 2018 19:04:24 +0100 Subject: [PATCH] test: fix tcp_oob test flakiness `EAGAIN` is an acceptable return value for `read()` and the test was not taking it into account. Fixes: https://github.com/libuv/libuv/issues/1602 PR-URL: https://github.com/libuv/libuv/pull/1759 Reviewed-By: Colin Ihrig --- test/test-tcp-oob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-tcp-oob.c b/test/test-tcp-oob.c index 4f1397a8..ca2361f9 100644 --- a/test/test-tcp-oob.c +++ b/test/test-tcp-oob.c @@ -61,7 +61,7 @@ static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { #endif uv_os_fd_t fd; - ASSERT(nread > 0); + ASSERT(nread >= 0); ASSERT(0 == uv_fileno((uv_handle_t*)handle, &fd)); ASSERT(0 == uv_idle_start(&idle, idle_cb));