Skip to content

Commit

Permalink
#97 tst.postmortem_jsstack.js fails for node 6.11.2
Browse files Browse the repository at this point in the history
Reviewed by: David Pacheco <dap@joyent.com>
Approved by: David Pacheco <dap@joyent.com>
  • Loading branch information
Jordan Hendricks authored and jordanhendricks committed Nov 18, 2017
1 parent d31211b commit ab8ef17
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/standalone/tst.postmortem_jsstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/*
* Copyright (c) 2015, Joyent, Inc.
* Copyright (c) 2017, Joyent, Inc.
*/

var common = require('./common');
Expand Down Expand Up @@ -114,6 +114,16 @@ dtrace.on('exit', function (code) {
for (var i = 0; i < lines.length; i++) {
var line = lines[i];

/*
* Some later versions of node, beginning with v6, have
* an additional JS stack frame for os.loadavg().
* Ignore this frame.
*/
if ((line.indexOf(sentinel) !== -1) &&
(line.indexOf('loadavg') !== -1)) {
continue;
}

if (matched == 1 && line.indexOf(arg1) === 0) {
straddr =
line.substr(arg1.length).split(' ')[0];
Expand Down

0 comments on commit ab8ef17

Please sign in to comment.