From 9e0746a4ff8d6fb13bd00cbe72aae6d47d4c2664 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Tue, 27 May 2025 17:53:04 +0100 Subject: [PATCH] benchmark: fix broken fs.cpSync benchmark PR-URL: https://github.com/nodejs/node/pull/58472 Reviewed-By: Rafael Gonzaga Reviewed-By: Yagiz Nizipli Reviewed-By: James M Snell --- benchmark/fs/bench-cpSync.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benchmark/fs/bench-cpSync.js b/benchmark/fs/bench-cpSync.js index fa6350384c6..822036726d1 100644 --- a/benchmark/fs/bench-cpSync.js +++ b/benchmark/fs/bench-cpSync.js @@ -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() {