test: add tracing crash regression test

PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
This commit is contained in:
Eugene Ostroukhov authored and Anna Henningsen committed 2018-08-01 17:17:09 +02:00
1 parent 281e5a3cee
commit 55623b5ba0
1 file changed
+14
+14
View File
@@ -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));