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 <info@bnoordhuis.nl>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
dmabupt authored and mhdawson committed Mar 20, 2020
1 parent fbecc07 commit b891e93
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 b891e93

Please sign in to comment.