From 7658368322cc6e86f3f344f2c3cbbf62af58e8b3 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 16 Oct 2018 13:33:32 -0400 Subject: [PATCH] squash: add test-trace-events-api.js Currently crashes when run with workers. Real bug? --- test/parallel/test-trace-events-api.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-trace-events-api.js b/test/parallel/test-trace-events-api.js index f7d7ec35b022f6..317c9d4bc3d458 100644 --- a/test/parallel/test-trace-events-api.js +++ b/test/parallel/test-trace-events-api.js @@ -5,13 +5,11 @@ const common = require('../common'); if (!process.binding('config').hasTracing) common.skip('missing trace events'); -if (!common.isMainThread) - common.skip('process.chdir is not available in Workers'); const assert = require('assert'); const cp = require('child_process'); -const path = require('path'); const fs = require('fs'); +const path = require('path'); const tmpdir = require('../common/tmpdir'); const { createTracing, @@ -109,7 +107,6 @@ if (isChild) { } tmpdir.refresh(); - process.chdir(tmpdir.path); const expectedMarks = ['A', 'B']; const expectedBegins = [ @@ -123,7 +120,8 @@ if (isChild) { const proc = cp.fork(__filename, ['child'], - { execArgv: [ '--expose-gc', + { cwd: tmpdir.path, + execArgv: [ '--expose-gc', '--trace-event-categories', 'foo' ] });