Skip to content

Commit

Permalink
test: uv_tty_init returns EBADF on IBM i
Browse files Browse the repository at this point in the history
When TTY initialization failed, uv_tty_init returned EBADF on IBM i
PASE, rather than EINVAL

PR-URL: #32338
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
dmabupt authored and MylesBorins committed Mar 24, 2020
1 parent 79fdc6b commit 4d173ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/parallel/test-ttywrap-invalid-fd.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ assert.throws(

{
const info = {
code: common.isWindows ? 'EBADF' : 'EINVAL',
message: common.isWindows ? 'bad file descriptor' : 'invalid argument',
errno: common.isWindows ? UV_EBADF : UV_EINVAL,
code: common.isWindows || common.isIBMi ? 'EBADF' : 'EINVAL',
message: common.isWindows ||
common.isIBMi ? 'bad file descriptor' : 'invalid argument',
errno: common.isWindows || common.isIBMi ? UV_EBADF : UV_EINVAL,
syscall: 'uv_tty_init'
};

const suffix = common.isWindows ?
const suffix = common.isWindows || common.isIBMi ?
'EBADF (bad file descriptor)' : 'EINVAL (invalid argument)';
const message = `TTY initialization failed: uv_tty_init returned ${suffix}`;

Expand Down

0 comments on commit 4d173ea

Please sign in to comment.