From b69f8efee12880e0460a7a564b4e5f66e3babf9f Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 23 May 2012 21:17:17 +0200 Subject: [PATCH] test: remove stale socket in ipc_send_recv_pipe Fixes spurious test failures. --- test/test-ipc-send-recv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test-ipc-send-recv.c b/test/test-ipc-send-recv.c index 970bf1ef..faedc546 100644 --- a/test/test-ipc-send-recv.c +++ b/test/test-ipc-send-recv.c @@ -120,6 +120,11 @@ TEST_IMPL(ipc_send_recv_pipe) { r = uv_pipe_init(uv_default_loop(), &ctx.send.pipe, 1); ASSERT(r == 0); +#ifndef _WIN32 + /* Clean up stale socket from previous test run. */ + remove(TEST_PIPENAME); +#endif + r = uv_pipe_bind(&ctx.send.pipe, TEST_PIPENAME); ASSERT(r == 0);