diff --git a/benchmark/fs/bench-linkSync.js b/benchmark/fs/bench-linkSync.js index 9fcf910cdaf301..9658363cbbebd6 100644 --- a/benchmark/fs/bench-linkSync.js +++ b/benchmark/fs/bench-linkSync.js @@ -6,12 +6,21 @@ const tmpdir = require('../../test/common/tmpdir'); tmpdir.refresh(); const tmpfile = tmpdir.resolve('.bench-file-data'); -fs.writeFileSync(tmpfile, 'bench-file', 'utf-8'); -fs.chmodSync(tmpfile, fs.constants.S_IRUSR); + +// Calling `chmodSync` causes Windows build to fail. +// Reference: https://github.com/libuv/libuv/issues/3267 +if (process.platform !== 'win32') { + fs.writeFileSync(tmpfile, 'bench-file', 'utf-8'); + fs.chmodSync(tmpfile, fs.constants.S_IRUSR); +} const bench = common.createBenchmark(main, { type: ['valid', 'invalid'], n: [1e3], +}, { + combinationFilter() { + return process.platform !== 'win32'; + }, }); function main({ n, type }) {