summaryrefslogtreecommitdiff
path: root/test/parallel/test-warn-sigprof.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2017-04-27 18:26:17 -0400
committercjihrig <cjihrig@gmail.com>2017-05-11 15:33:05 -0400
commitb6001a2da5349de5eeddcc9e4cbcb930bfe6c29c (patch)
tree050f6e99b8e8c7bb6126b7b61273ccae38b17512 /test/parallel/test-warn-sigprof.js
parent9ce2271e813016685d1c8f9ab3e7ce6c85eee069 (diff)
downloadandroid-node-v8-b6001a2da5349de5eeddcc9e4cbcb930bfe6c29c.tar.gz
android-node-v8-b6001a2da5349de5eeddcc9e4cbcb930bfe6c29c.tar.bz2
android-node-v8-b6001a2da5349de5eeddcc9e4cbcb930bfe6c29c.zip
src: make SIGPROF message a real warning
This commit replaces a fprintf() with a call to ProcessEmitWarning(). Refs: https://github.com/nodejs/node/issues/12706 PR-URL: https://github.com/nodejs/node/pull/12709 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-warn-sigprof.js')
-rw-r--r--test/parallel/test-warn-sigprof.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/parallel/test-warn-sigprof.js b/test/parallel/test-warn-sigprof.js
new file mode 100644
index 0000000000..eedbe33d84
--- /dev/null
+++ b/test/parallel/test-warn-sigprof.js
@@ -0,0 +1,17 @@
+'use strict';
+const common = require('../common');
+
+// The inspector attempts to start when Node starts. Once started, the inspector
+// warns on the use of a SIGPROF listener.
+
+common.skipIfInspectorDisabled();
+
+if (common.isWindows) {
+ common.skip('test does not apply to Windows');
+ return;
+}
+
+common.expectWarning('Warning',
+ 'process.on(SIGPROF) is reserved while debugging');
+
+process.on('SIGPROF', () => {});