From ab8ef1715488ccf49fd16d66fa7dc0c6778f17c3 Mon Sep 17 00:00:00 2001 From: Jordan Hendricks Date: Sat, 18 Nov 2017 01:40:09 +0000 Subject: [PATCH] joyent/mdb_v8#97 tst.postmortem_jsstack.js fails for node 6.11.2 Reviewed by: David Pacheco Approved by: David Pacheco --- test/standalone/tst.postmortem_jsstack.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/standalone/tst.postmortem_jsstack.js b/test/standalone/tst.postmortem_jsstack.js index 59de5c6..e9b5532 100644 --- a/test/standalone/tst.postmortem_jsstack.js +++ b/test/standalone/tst.postmortem_jsstack.js @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2015, Joyent, Inc. + * Copyright (c) 2017, Joyent, Inc. */ var common = require('./common'); @@ -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];