Skip to content

Commit 007e285

Browse files
RaisinTentargos
authored andcommitted
test: use error code mapping in place of raw errno
Refs: #38159 (comment) PR-URL: #38675 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent e25dc8e commit 007e285

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-fs-read-type.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fs.read(fd,
117117
common.mustCall((err) => {
118118
if (err) {
119119
if (common.isIBMi)
120-
assert.strictEqual(err.errno, -127);
120+
assert.strictEqual(err.code, 'EOVERFLOW');
121121
else
122122
assert.strictEqual(err.code, 'EFBIG');
123123
}
@@ -238,6 +238,6 @@ try {
238238
// On systems where max file size is below 2^53-1, we'd expect a EFBIG error.
239239
// This is not using `assert.throws` because the above call should not raise
240240
// any error on systems that allows file of that size.
241-
if (err.code !== 'EFBIG' && !(common.isIBMi && err.errno === -127))
241+
if (err.code !== 'EFBIG' && !(common.isIBMi && err.code === 'EOVERFLOW'))
242242
throw err;
243243
}

0 commit comments

Comments
 (0)