From 530cf198ea3013f304cb18e50ecba9e97d5aa998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 15 Aug 2024 17:11:07 +0200 Subject: [PATCH] test: prevent V8 from writing into the system's tmpdir Refs: https://github.com/nodejs/build/issues/3864 --- 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 8d614e607177cd..e898a81af09ca6 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 }),