benchmark: fix broken fs.cpSync benchmark · nodejs/node@8bc0452

Original file line numberDiff line numberDiff line change

@@ -8,7 +8,10 @@ const tmpdir = require('../../test/common/tmpdir');

88

const bench = common.createBenchmark(main, {

99

n: [1, 100, 10_000],

1010

dereference: ['true', 'false'],

11-

force: ['true', 'false'],

11+

// When `force` is `true` the `cpSync` function is called twice the second

12+

// time however an `ERR_FS_CP_EINVAL` is thrown, so skip `true` for the time being

13+

// TODO: allow `force` to also be `true` once https://github.com/nodejs/node/issues/58468 is addressed

14+

force: ['false'],

1215

});

1316
1417

function prepareTestDirectory() {