Skip to content

Commit 65308b6

Browse files
bekcpearmarco-ippolito
authored andcommitted
benchmark: fix api restriction for the permission category
give appropriate permissions to the following scripts: * permission-processhas-fs-read.js: 'ChildProcess' permission * permission-startup.js: 'FileSystemRead' permission > Paths delimited by comma (,) are no longer allowed. Refs: https://github.com/nodejs/node/blob/main/doc/api/cli.md#--allow-fs-read Signed-off-by: Ryan Qian <[email protected]> PR-URL: #51528 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent d74bda4 commit 65308b6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

benchmark/permission/permission-processhas-fs-read.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const options = {
1313
flags: [
1414
'--experimental-permission',
1515
`--allow-fs-read=${rootPath}`,
16+
'--allow-child-process',
1617
],
1718
};
1819

benchmark/permission/permission-startup.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ function spawnProcess(script, bench, state) {
4747

4848
function main({ count, script, nFiles, prefixPath }) {
4949
script = path.resolve(__dirname, '../../', `${script}.js`);
50-
const files = mockFiles(nFiles, prefixPath).join(',');
5150
const optionsWithScript = [
5251
'--experimental-permission',
53-
`--allow-fs-read=${files},${script}`,
52+
`--allow-fs-read=${script}`,
53+
...mockFiles(nFiles, prefixPath).map((file) => '--allow-fs-read=' + file),
5454
script,
5555
];
5656
const warmup = 3;

0 commit comments

Comments
 (0)