Commit 5baf5a6d9f7 for nodejs
commit 5baf5a6d9f7bffba4ebaaf92733dc84d1a53c8c3
Author: Livia Medeiros <livia@cirno.name>
Date: Wed Nov 25 09:21:15 2026 +0800
test: fix `vfs-addon-sequence` failing when TMPDIR mounted with noexec
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67566
Reviewed-By: James M Snell <jasnell@gmail.com>
diff --git a/test/parallel/test-vfs-addon-sequence.js b/test/parallel/test-vfs-addon-sequence.js
index cede831c880..72ac4ef27a7 100644
--- a/test/parallel/test-vfs-addon-sequence.js
+++ b/test/parallel/test-vfs-addon-sequence.js
@@ -1,12 +1,15 @@
// Flags: --disable-warning=ExperimentalWarning
'use strict';
const common = require('../common');
+const tmpdir = require('../common/tmpdir');
const assert = require('node:assert');
const { spawnSync } = require('node:child_process');
const fs = require('node:fs');
const path = require('node:path');
const vfs = require('node:vfs');
+tmpdir.refresh();
+
const addonPath = (name) => path.join(
__dirname, '..', 'addons', name, 'build', common.buildType, 'binding.node');
const helloPath = addonPath('hello-world');
@@ -55,6 +58,6 @@ if (common.isLinux) {
const { status, stderr } = spawnSync('/bin/sh', [
'-c', `ulimit -n ${limit} && exec "$0" "$@"`,
process.execPath, '--disable-warning=ExperimentalWarning', '-e', child,
- ], { encoding: 'utf8' });
+ ], { encoding: 'utf8', env: { ...process.env, TMPDIR: tmpdir.path } });
assert.strictEqual(status, 0, stderr);
}