mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
test: check the different error code on IBM i
Fixes: https://github.com/nodejs/node/issues/36925 PR-URL: https://github.com/nodejs/node/pull/38159 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
1 parent
548cbf0625
commit
db9cf52dcf
2 files changed
+6
-4
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user