diff --git a/test/known_issues/known_issues.status b/test/known_issues/known_issues.status index 86d95e41d199dd..01a82246c93fcb 100644 --- a/test/known_issues/known_issues.status +++ b/test/known_issues/known_issues.status @@ -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 diff --git a/test/known_issues/test-fs-open-no-close.js b/test/known_issues/test-fs-open-no-close.js new file mode 100644 index 00000000000000..648ab00f69e63f --- /dev/null +++ b/test/known_issues/test-fs-open-no-close.js @@ -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'); +}