Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/parallel/test-child-process-fork-exec-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
const common = require('../common');
const assert = require('assert');
const fs = require('fs');
const { COPYFILE_FICLONE } = fs.constants;
const path = require('path');
const tmpdir = require('../common/tmpdir');
const msg = { test: 'this' };
Expand All @@ -44,7 +45,7 @@ if (process.env.FORK) {
} catch (e) {
if (e.code !== 'ENOENT') throw e;
}
fs.writeFileSync(copyPath, fs.readFileSync(nodePath));
fs.copyFileSync(nodePath, copyPath, COPYFILE_FICLONE);
fs.chmodSync(copyPath, '0755');

// slow but simple
Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-module-loading-globalpaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const fixtures = require('../common/fixtures');
const assert = require('assert');
const path = require('path');
const fs = require('fs');
const { COPYFILE_FICLONE } = fs.constants;
const child_process = require('child_process');
const pkgName = 'foo';
const { addLibraryPath } = require('../common/shared-lib-util');
Expand All @@ -28,7 +29,7 @@ if (process.argv[2] === 'child') {
testExecPath = path.join(prefixBinPath, path.basename(process.execPath));
}
const mode = fs.statSync(process.execPath).mode;
fs.writeFileSync(testExecPath, fs.readFileSync(process.execPath));
fs.copyFileSync(process.execPath, testExecPath, COPYFILE_FICLONE);
fs.chmodSync(testExecPath, mode);

const runTest = (expectedString, env) => {
Expand Down