From 612e4577ef5b67f017e1d1c233d21767946f22c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 21 Aug 2024 17:44:39 +0200 Subject: [PATCH] test: prevent V8 from writing into the system's tmpdir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/build/issues/3864 PR-URL: https://github.com/nodejs/node/pull/54395 Reviewed-By: Richard Lau Reviewed-By: Juan José Arboleda Reviewed-By: Jake Yuesong Li Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli --- test/parallel/test-cli-node-options.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 8d614e60717..e898a81af09 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -93,7 +93,12 @@ function expectNoWorker(opt, want, command, wantsError) { function expect( opt, want, command = 'console.log("B")', wantsError = false, testWorker = true ) { - const argv = ['-e', command]; + const argv = [ + // --perf-basic-prof and --perf-basic-prof-only-functions write to /tmp by default. + `--perf-basic-prof-path=${tmpdir.path}`, + '-e', + command, + ]; const opts = { cwd: tmpdir.path, env: Object.assign({}, process.env, { NODE_OPTIONS: opt }),