libuv/test
Alexis Campailla 6d3a051eb4 windows: relay TCP bind errors via ipc
This is the libuv side of the fix for Node's cluster module on Windows.
https://github.com/joyent/node/issues/7691

Windows and Unix return certain socket errors (i.e. EADDRINUSE) at
different times: bind on Windows, and listen on Unix.
In an effort to hide this difference, libuv on Windows stores such
errors in the bind_error field of uv_tcp_t, to defer raising it at
listen time.
This worked fine except for the case in which a socket is shared in
a Node cluster and a bind error occurs.

A previous attempt to fix this (
d1e6be1460
3da36fe00e
) was flawed becaused in an attempt to relay the error at the JS level
it caused the master to start accepting connections.

With this new approach, libuv itself is relaying the bind errors,
providing for a uniform behavior of uv_tcp_listen.
2014-07-31 17:24:40 +02:00
..
fixtures win, unix: add uv_dlerror() and uv_dlerror_free() 2012-03-02 16:39:21 +01:00
benchmark-async-pummel.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
benchmark-async.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
benchmark-fs-stat.c unix, windows: rename uv_run2 to uv_run 2013-01-16 23:35:29 +01:00
benchmark-getaddrinfo.c unix, windows: rename uv_run2 to uv_run 2013-01-16 23:35:29 +01:00
benchmark-list.h bench: add 'million async handles' benchmark 2012-12-24 12:19:10 +01:00
benchmark-loop-count.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
benchmark-million-async.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
benchmark-million-timers.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
benchmark-multi-accept.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
benchmark-ping-pongs.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
benchmark-pound.c test: wrap long lines at 80 columns 2013-09-11 17:29:43 +02:00
benchmark-pump.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
benchmark-sizes.c test: add uv_fs_poll_t to benchmark-sizes.c 2012-08-20 16:31:54 +02:00
benchmark-spawn.c include: uv_spawn takes const uv_process_options_t* 2013-09-01 08:25:00 +02:00
benchmark-tcp-write-batch.c include: merge uv_tcp_connect and uv_tcp_connect6 2013-09-04 03:16:36 +02:00
benchmark-thread.c Make the thread_create benchmark not time out 2012-03-09 17:53:48 +01:00
benchmark-udp-pummel.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
blackhole-server.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
dns-server.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
echo-server.c test: close stream immediately on error 2014-04-24 16:48:27 -07:00
run-benchmarks.c test: support flexibly setting custom task options 2014-02-01 00:50:40 +04:00
run-tests.c windows: relay TCP bind errors via ipc 2014-07-31 17:24:40 +02:00
runner-unix.c test: replace strcpy() with strncpy() 2013-08-05 02:45:40 +02:00
runner-unix.h Add copyright headers, license file. 2011-04-18 11:11:30 -07:00
runner-win.c test: wrap long lines at 80 columns 2013-09-11 17:29:43 +02:00
runner-win.h test: fix windows #include bug 2012-10-03 00:58:04 +02:00
runner.c test: support flexibly setting custom task options 2014-02-01 00:50:40 +04:00
runner.h test: support flexibly setting custom task options 2014-02-01 00:50:40 +04:00
task.h test: fix compiation warning 2014-03-03 21:49:34 +01:00
test-active.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-async-null-cb.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-async.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-barrier.c Revert "test: make barrier test more rigorous" 2014-07-02 00:16:50 +02:00
test-callback-order.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-callback-stack.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-close-fd.c linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT 2013-11-08 05:16:55 +01:00
test-close-order.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-condvar.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
test-connection-fail.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-cwd-and-chdir.c unix, windows: make uv_cwd be consistent with uv_exepath 2014-02-27 09:44:28 +01:00
test-delayed-accept.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-dlerror.c unix, win: rework uv_dlopen() API 2012-05-03 19:36:40 +02:00
test-embed.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-emfile.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
test-error.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
test-fail-always.c Benchmark runner 2011-04-19 04:47:21 +02:00
test-fs-event.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-fs-poll.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-fs.c unix, windows: add uv_fs_mkdtemp 2014-07-31 09:43:55 +02:00
test-get-currentexe.c test: wrap long lines at 80 columns 2013-09-11 17:29:43 +02:00
test-get-loadavg.c os: implement loadavg (not working on cygwin/win) 2011-10-04 18:15:14 +02:00
test-get-memory.c Tests: don't use %zu placeholder in printf statements 2012-04-11 22:54:02 +02:00
test-getaddrinfo.c test: fix compilation warnings with VC++ 2014-04-17 17:31:11 +02:00
test-getnameinfo.c include: const-ify arguments to uv_getnameinfo_cb 2014-06-26 22:46:39 +02:00
test-getsockname.c unix, win: add send_queue_size and send_queue_count to uv_udp_t 2014-07-04 18:28:18 +02:00
test-hrtime.c test: allow 80 ms intervals in hrtime test 2012-07-03 22:33:10 +02:00
test-idle.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-ip4-addr.c test: remove C++ style comment 2013-12-13 22:37:14 +04:00
test-ip6-addr.c unix, windows: fix parsing scoped IPv6 addresses 2014-05-25 23:30:46 +02:00
test-ipc-send-recv.c pipe: allow queueing pending handles 2014-03-04 00:34:29 +04:00
test-ipc.c windows: relay TCP bind errors via ipc 2014-07-31 17:24:40 +02:00
test-list.h windows: relay TCP bind errors via ipc 2014-07-31 17:24:40 +02:00
test-loop-alive.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-loop-close.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-loop-handles.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-loop-stop.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-loop-time.c unix, windows: always update loop time 2013-12-10 09:13:34 +01:00
test-multiple-listen.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
test-mutexes.c Wrap platform mutex and rwlock APIs. 2011-11-18 12:42:08 +01:00
test-osx-select.c include: uv_read{2}_cb now takes const uv_buf_t* 2013-09-01 08:01:34 +02:00
test-pass-always.c Benchmark runner 2011-04-19 04:47:21 +02:00
test-ping-pong.c test: fix compilation warnings with VC++ 2014-04-17 17:31:11 +02:00
test-pipe-bind-error.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
test-pipe-connect-error.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
test-pipe-getsockname.c test: fix compilation warning on non-linux systems 2014-02-24 21:46:19 +01:00
test-pipe-sendmsg.c pipe: allow queueing pending handles 2014-03-04 00:34:29 +04:00
test-pipe-server-close.c test: make test-pipe-server-close pass on linux 2013-12-21 02:34:44 -08:00
test-platform-output.c unix, windows: add uv_getrusage() function 2014-02-21 18:50:15 +01:00
test-poll-close.c code style: strip trailing whitespace 2013-12-20 19:38:37 -08:00
test-poll-closesocket.c windows: fix handling closed socket while poll handle is closing 2014-06-17 20:16:43 +02:00
test-poll.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-process-title.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
test-ref.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-run-nowait.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-run-once.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-semaphore.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
test-shutdown-close.c unix, windows: make uv_is_*() always return 0 or 1 2013-09-12 13:30:06 +02:00
test-shutdown-eof.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-shutdown-twice.c unix: correct error when calling uv_shutdown twice 2014-02-15 16:55:06 +01:00
test-signal-multiple-loops.c unix, windows: add uv_loop_init and uv_loop_close 2014-02-21 09:56:13 +01:00
test-signal.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-spawn.c test: fix EPIPE race in spawn_closed_process_io 2014-06-09 08:47:18 -07:00
test-stdio-over-pipes.c unix: sanity-check fds before closing 2013-10-01 03:55:54 +02:00
test-tcp-bind6-error.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
test-tcp-bind-error.c unix, windows: validate flags on uv_udp|tcp_bind 2014-04-22 22:57:01 +02:00
test-tcp-close-accept.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
test-tcp-close-while-connecting.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-tcp-close.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
test-tcp-connect6-error.c include: merge uv_tcp_connect and uv_tcp_connect6 2013-09-04 03:16:36 +02:00
test-tcp-connect-error-after-write.c include: merge uv_tcp_connect and uv_tcp_connect6 2013-09-04 03:16:36 +02:00
test-tcp-connect-error.c include: merge uv_tcp_connect and uv_tcp_connect6 2013-09-04 03:16:36 +02:00
test-tcp-connect-timeout.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-tcp-flags.c unix, windows: rename uv_run2 to uv_run 2013-01-16 23:35:29 +01:00
test-tcp-open.c include: merge uv_tcp_connect and uv_tcp_connect6 2013-09-04 03:16:36 +02:00
test-tcp-read-stop.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-tcp-shutdown-after-write.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-tcp-try-write.c test: simplify test-tcp-try-write 2014-07-05 11:06:39 +02:00
test-tcp-unexpected-read.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-tcp-write-queue-order.c unix: guarantee write queue cb execution order in streams 2014-07-18 13:16:10 +02:00
test-tcp-write-to-half-open-connection.c tcp: uv_tcp_dualstack() 2014-01-19 23:07:42 +00:00
test-tcp-writealot.c include: merge uv_tcp_connect and uv_tcp_connect6 2013-09-04 03:16:36 +02:00
test-thread.c unix, windows: add uv_loop_init and uv_loop_close 2014-02-21 09:56:13 +01:00
test-threadpool-cancel.c include: const-ify arguments to uv_getnameinfo_cb 2014-06-26 22:46:39 +02:00
test-threadpool.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
test-timer-again.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-timer-from-check.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-timer.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-tty.c test: relax TTY availability assumptions 2013-10-08 16:26:04 +02:00
test-udp-bind.c unix, windows: do not set SO_REUSEADDR by default on udp 2014-04-02 01:21:35 +02:00
test-udp-dgram-too-big.c include: merge uv_udp_send and uv_udp_send6 2013-09-04 03:17:29 +02:00
test-udp-ipv6.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-udp-multicast-interface6.c unix: add UV_HANDLE_IPV6 flag to tcp and udp handles 2014-04-02 01:24:39 +02:00
test-udp-multicast-interface.c unix, win: add send_queue_size and send_queue_count to uv_udp_t 2014-07-04 18:28:18 +02:00
test-udp-multicast-join6.c test: fix multicast join test on OSX when using IPv6 2014-03-20 23:07:12 +01:00
test-udp-multicast-join.c include: merge uv_udp_send and uv_udp_send6 2013-09-04 03:17:29 +02:00
test-udp-multicast-ttl.c include: merge uv_udp_send and uv_udp_send6 2013-09-04 03:17:29 +02:00
test-udp-open.c unix, win: add send_queue_size and send_queue_count to uv_udp_t 2014-07-04 18:28:18 +02:00
test-udp-options.c unix, windows: be consistent when binding implictly in UDP 2014-05-08 15:12:09 +02:00
test-udp-send-and-recv.c unix, win: add send_queue_size and send_queue_count to uv_udp_t 2014-07-04 18:28:18 +02:00
test-udp-send-immediate.c unix: remove incorrect assert 2014-07-11 22:53:59 +02:00
test-udp-try-send.c unix, win: add uv_udp_try_send 2014-07-04 18:30:33 +02:00
test-walk-handles.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
test-watcher-cross-stop.c test: fix watcher_cross_stop 2014-07-08 18:44:38 +02:00