test: add test-child-process-emfile fail message
When the test fails (as it does frequently on FreeBSD unfortunately) provide a non-cryptic error message that also provides a line number. PR-URL: https://github.com/nodejs/node/pull/3335 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
2d3560767e
commit
e3d9d25083
@ -27,8 +27,10 @@ proc.on('error', common.mustCall(function(err) {
|
||||
assert(err.code === 'EMFILE' || err.code === 'ENFILE');
|
||||
}));
|
||||
|
||||
// 'exit' should not be emitted, the process was never spawned.
|
||||
proc.on('exit', assert.fail);
|
||||
proc.on('exit', function() {
|
||||
const msg = '"exit" should not be emitted (the process never spawned!)';
|
||||
assert.fail(null, null, msg);
|
||||
});
|
||||
|
||||
// close one fd for LSan
|
||||
if (openFds.length >= 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user