test: add known issue for fs.open() keeping event loop open
PR-URL: https://github.com/nodejs/node/pull/34228 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Robert Nagy <ronagy@icloud.com>
This commit is contained in:
parent
c08920b0c4
commit
6ae1b9c457
@ -27,3 +27,5 @@ test-vm-timeout-escape-queuemicrotask: SKIP
|
||||
# The Raspberry Pis are too slow to run this test.
|
||||
# See https://github.com/nodejs/build/issues/2227#issuecomment-608334574
|
||||
test-crypto-authenticated-stream: SKIP
|
||||
# The bug being checked is that the test never exits.
|
||||
test-fs-open-no-close: TIMEOUT
|
||||
|
30
test/known_issues/test-fs-open-no-close.js
Normal file
30
test/known_issues/test-fs-open-no-close.js
Normal file
@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
// Failing to close a file should not keep the event loop open.
|
||||
|
||||
const common = require('../common');
|
||||
|
||||
// This issue only shows up on Raspberry Pi devices in our CI. When this test is
|
||||
// moved out of known_issues, this check can be removed, as the test should pass
|
||||
// on all platforms at that point.
|
||||
const assert = require('assert');
|
||||
if (process.arch !== 'arm' || process.config.variables.arm_version > 7) {
|
||||
assert.fail('This test is for Raspberry Pi devices in CI');
|
||||
}
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
const debuglog = (arg) => {
|
||||
console.log(new Date().toLocaleString(), arg);
|
||||
};
|
||||
|
||||
const tmpdir = require('../common/tmpdir');
|
||||
tmpdir.refresh();
|
||||
|
||||
{
|
||||
fs.open(`${tmpdir.path}/dummy`, 'wx+', common.mustCall((err, fd) => {
|
||||
debuglog('fs open() callback');
|
||||
assert.ifError(err);
|
||||
}));
|
||||
debuglog('waiting for callback');
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user