Skip to content

Commit db9cf52

Browse files
committed
test: check the different error code on IBM i
Fixes: #36925 PR-URL: #38159 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 548cbf0 commit db9cf52

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎test/parallel/parallel.status‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,3 @@ test-tls-env-extra-ca: SKIP
5555
test-dgram-error-message-address: SKIP
5656
# https://github.com/nodejs/node/issues/36929
5757
test-crypto-secure-heap: SKIP
58-
# https://github.com/nodejs/node/issues/36925
59-
test-fs-read-type: SKIP

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ fs.read(fd,
118118
2n**53n-1n,
119119
common.mustCall((err)=>{
120120
if(err){
121-
assert.strictEqual(err.code,'EFBIG');
121+
if(common.isIBMi)
122+
assert.strictEqual(err.errno,-127);
123+
else
124+
assert.strictEqual(err.code,'EFBIG');
122125
}
123126
}));
124127

@@ -239,5 +242,6 @@ try{
239242
// On systems where max file size is below 2^53-1, we'd expect a EFBIG error.
240243
// This is not using `assert.throws` because the above call should not raise
241244
// any error on systems that allows file of that size.
242-
if(err.code!=='EFBIG')throwerr;
245+
if(err.code!=='EFBIG'&&!(common.isIBMi&&err.errno===-127))
246+
throwerr;
243247
}

0 commit comments

Comments
(0)