benchmark: fix broken fs.cpSync benchmark

PR-URL: https://github.com/nodejs/node/pull/58472
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Dario Piotrowicz 2025-05-27 17:53:04 +01:00 committed by Antoine du Hamel
parent 54288bdb42
commit 9e0746a4ff
No known key found for this signature in database
GPG Key ID: 21D900FFDB233756

View File

@ -8,7 +8,10 @@ const tmpdir = require('../../test/common/tmpdir');
const bench = common.createBenchmark(main, {
n: [1, 100, 10_000],
dereference: ['true', 'false'],
force: ['true', 'false'],
// When `force` is `true` the `cpSync` function is called twice the second
// time however an `ERR_FS_CP_EINVAL` is thrown, so skip `true` for the time being
// TODO: allow `force` to also be `true` once https://github.com/nodejs/node/issues/58468 is addressed
force: ['false'],
});
function prepareTestDirectory() {