Commit Graph

6 Commits

Author SHA1 Message Date
Michael Dawson
5dd5ce75d7 test: Env variable to specify directory for pipes
At the uv layer pipes are connected with uv_pipe_connect.
The current spec for this method indicates that the maximum
length is limited to the size of length of
sizeof(sockaddr_un.sun_path), typically between 92 and
108 bytes. Anything longer than that just gets truncated.

The simple testsuite currently creates pipes in directories
under the directory where node was built.  In our jenkins
jobs this sometimes ends up being a deep enough path that
the path for the pipes is getting truncated.  The result
is that tests using pipes fail with errors that don't
make it obvious what the problem is.

Even if the errors were helpful, we still need a way
to avoid the truncation.

This patch adds the environment variable NODE_PIPE_DIR.
If set the tests create pipes in this directory instead of
the current defaults.  In addition the test harness is
updated to remove/delete this directory before/after
each test is run.

	modified:   test/common.js
	modified:   test/simple/test-net-pipe-connect-errors.js
	modified:   test/testpy/__init__.py
	modified:   test/simple/test-cluster-eaccess.js

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9381
2015-03-26 11:31:17 -07:00
isaacs
d0c010e39b test: root can connect to chmod'd pipes 2012-05-20 09:24:47 -03:00
Igor Zinkovsky
67b10f816c fix test-net-pipe-connect-errors for windows 2012-03-01 14:09:10 -08:00
Andreas Madsen
4865063924 Tests: fix jslint issues 2012-01-17 19:45:09 +01:00
Ben Noordhuis
8974ba31a3 test: fix simple/net-pipe-connect-errors
When trying to connect to something that is not a UNIX socket, Linux returns
ECONNREFUSED, not ENOTSOCK.

We cannot atomically determine if the other end is a) a stale socket, or b) not
a socket at all, so let's accept both error codes.
2011-11-04 05:30:00 +01:00
Maciej Małecki
481c17504d test error codes related to pipes
This tests passes on node v0.4, but fails on node v0.5. v0.5 seems to
generally lack error codes for various error events related to UNIX
pipes.

Fixes #2001
2011-11-03 10:54:00 -07:00