X Tutup
The Wayback Machine - https://web.archive.org/web/20220420043244/https://github.com/nodejs/node/commit/db9cf52dcf
Skip to content
Permalink
Browse files
test: check the different error code on IBM i
Fixes: #36925

PR-URL: #38159
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
  • Loading branch information
dmabupt committed Apr 12, 2021
1 parent 548cbf0 commit db9cf52dcfbb17650af64852cc9b62dad7cfe30b
Showing with 6 additions and 4 deletions.
  1. +0 −2 test/parallel/parallel.status
  2. +6 −2 test/parallel/test-fs-read-type.js
@@ -55,5 +55,3 @@ test-tls-env-extra-ca: SKIP
test-dgram-error-message-address: SKIP
# https://github.com/nodejs/node/issues/36929
test-crypto-secure-heap: SKIP
# https://github.com/nodejs/node/issues/36925
test-fs-read-type: SKIP
@@ -118,7 +118,10 @@ fs.read(fd,
2n ** 53n - 1n,
common.mustCall((err) => {
if (err) {
assert.strictEqual(err.code, 'EFBIG');
if (common.isIBMi)
assert.strictEqual(err.errno, -127);
else
assert.strictEqual(err.code, 'EFBIG');
}
}));

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

0 comments on commit db9cf52

Please sign in to comment.
X Tutup