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:
parent
281e5a3cee
commit
55623b5ba0
14
test/parallel/test-tracing-no-crash.js
Normal file
14
test/parallel/test-tracing-no-crash.js
Normal 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));
|
Loading…
x
Reference in New Issue
Block a user