Skip to content

Commit

Permalink
test: add tracing crash regression test
Browse files Browse the repository at this point in the history
PR-URL: #21867
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
  • Loading branch information
eugeneo authored and targos committed Aug 1, 2018
1 parent 00c33a5 commit c2372ea
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/parallel/test-tracing-no-crash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const { spawn } = require('child_process');

function CheckNoSignalAndErrorCodeOne(code, signal) {
assert.strictEqual(null, signal);
assert.strictEqual(1, code);
}

const child = spawn(process.execPath,
['--trace-event-categories', 'madeup', '-e',
'throw new Error()'], { stdio: 'inherit' });
child.on('exit', common.mustCall(CheckNoSignalAndErrorCodeOne));

0 comments on commit c2372ea

Please sign in to comment.