Switch from old-style ASSERT macro to new-style ASSERT_EQ,... macros.
Using new-style macros makes it easier to debug test failures
Fixes: https://github.com/libuv/libuv/issues/2974
Pass the loop to MAKE_VALGRIND_HAPPY() so it's explicit on which loop
needs to be cleaned up. Since it asserts on uv_loop_close(), need to
remove a couple of those that were being done before the call.
Cleanup where loop was assigned, so the entire test either uses loop or
uv_default_loop(). Not both.
Also take care of any reqs that may have been left uncleaned.
Make unices and windows consistent when closing a pipe while it's
connecting so they all return `UV_ECANCELED`.
Avoid race condition between `pipe_connect_thread_proc()` and `uv_close()` when
accessing `handle->name`.
Fixes: https://github.com/libuv/libuv/issues/3578
So `WaitNamedPipe()` doesn't fail. Increase the number of clients in
`pipe_connect_multiple` so `CreateFile()` returns `ERROR_PIPE_BUSY` and
the codepath leading to `WaitNamedPipe()` is exercised.
The cygwin runtime library fails to connect a socket client to a
listening server within the same thread. Test cases that use
this approach hang while waiting for the connection to complete.
This can be reproduced independent of libuv in a simple example
using both socket/bind/listen and socket/connect in a single
thread.
Avoid this problem in our test suite by skipping such tests on cygwin.
PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
On Windows we create multiple pipe handles (system handles) which are
attached to pending accept requests. Each of these will take turns in
replacing the reference in handle->handle, so make sure we allow for
that **only** for pipe servers.
PR-URL: https://github.com/libuv/libuv/pull/488
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>