andrewlow/node — pull request #5 by tunniclm (2013-09-17 13:32:39+00:00)
Title: Allow ENOTSOCK errno in test-net-listen-fd0.js

On UNIX, if fd 0 (stdin) is an unnamed or named pipe (for example,
if the test is run with "echo | node test/simple/test-net-listen-fd0.js",
or from Jenkins) then node will not distinguish it from a UNIX
domain socket and will attempt to listen() on the fd even though
it will always fail with ENOTSOCK.

Also note that an EINVAL errno here is likely injected by node rather
than a real errno returned from calling listen().

This test appears to be concerned with testing for a particular
corner case where fd = 0 and ensuring it doesn't throw an exception,
so in this case we can just accept ENOTSOCK as well as EINVAL and
be happy the intended corner case is still tested.