mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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 <i@bitbili.net> PR-URL: https://github.com/nodejs/node/pull/51528 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
7380252ae5
commit
8216cc964e
@ -13,6 +13,7 @@ const options = {
|
||||
flags: [
|
||||
'--experimental-permission',
|
||||
`--allow-fs-read=${rootPath}`,
|
||||
'--allow-child-process',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -47,10 +47,10 @@ function spawnProcess(script, bench, state) {
|
||||
|
||||
function main({ count, script, nFiles, prefixPath }) {
|
||||
script = path.resolve(__dirname, '../../', `${script}.js`);
|
||||
const files = mockFiles(nFiles, prefixPath).join(',');
|
||||
const optionsWithScript = [
|
||||
'--experimental-permission',
|
||||
`--allow-fs-read=${files},${script}`,
|
||||
`--allow-fs-read=${script}`,
|
||||
...mockFiles(nFiles, prefixPath).map((file) => '--allow-fs-read=' + file),
|
||||
script,
|
||||
];
|
||||
const warmup = 3;
|
||||
|
Loading…
Reference in New Issue
Block a user