summaryrefslogtreecommitdiff
path: root/test/parallel/test-trace-events-fs-sync.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-trace-events-fs-sync.js')
-rw-r--r--test/parallel/test-trace-events-fs-sync.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/parallel/test-trace-events-fs-sync.js b/test/parallel/test-trace-events-fs-sync.js
index 54222bcb33..d8e9ca30a8 100644
--- a/test/parallel/test-trace-events-fs-sync.js
+++ b/test/parallel/test-trace-events-fs-sync.js
@@ -3,13 +3,10 @@ const common = require('../common');
const assert = require('assert');
const cp = require('child_process');
const fs = require('fs');
+const path = require('path');
const util = require('util');
-if (!common.isMainThread)
- common.skip('process.chdir is not available in Workers');
-
const tests = new Array();
-const traceFile = 'node_trace.1.log';
let gid = 1;
let uid = 1;
@@ -119,14 +116,14 @@ if (common.canCreateSymLink()) {
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
-process.chdir(tmpdir.path);
+const traceFile = path.join(tmpdir.path, 'node_trace.1.log');
for (const tr in tests) {
const proc = cp.spawnSync(process.execPath,
[ '--trace-events-enabled',
'--trace-event-categories', 'node.fs.sync',
'-e', tests[tr] ],
- { encoding: 'utf8' });
+ { cwd: tmpdir.path, encoding: 'utf8' });
// Some AIX versions don't support futimes or utimes, so skip.
if (common.isAIX && proc.status !== 0 && tr === 'fs.sync.futimes') {
continue;