Closed ghatwala closed 9 years ago
Watchdog profiling is not currently supported on ppc64.
npm install watchdog
That's a different module and not maintained by us. strong-agent's watchdog mode is integrated into the agent, no other modules required.
hi @bnoordhuis , Thanks for your quick reply !!! As the default watchdog mode present in strong-agent is not supported on ppc64 , could you please let me know how to exclude "watchdog profiling" from test cases build step ? I want to verify if other test cases are passing ?
It needs some minor adjustments to the test suite. I'll make sure they're in the next release but for now you can make do by applying them locally.
From d3e066a2e547e64483d5b5efa613cbe1ac24c623 Mon Sep 17 00:00:00 2001
From: Ben Noordhuis <info@bnoordhuis.nl>
Date: Mon, 2 Nov 2015 13:54:48 +0100
Subject: [PATCH] Restrict watchdog tests to ia32/x64 linux.
Tighten the platform/architecture checks so that people can run the
test suite without failures on PPC64.
Fixes: https://github.com/strongloop/strong-agent/issues/7
---
test/common.js | 9 +++++++++
test/test-event-loop-watchdog.js | 9 +++------
test/test-no-watchdog.js | 3 ++-
test/test-watchdog-activation-count.js | 9 +++------
4 files changed, 17 insertions(+), 13 deletions(-)
create mode 100644 test/common.js
diff --git a/test/common.js b/test/common.js
new file mode 100644
index 0000000..4742dee
--- /dev/null
+++ b/test/common.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = { canWatchdog: canWatchdog };
+
+function canWatchdog() {
+ return process.platform === 'linux' &&
+ (process.arch === 'ia32' || process.arch === 'x64') &&
+ (process.versions.v8 < '3.15' || process.versions.v8 >= '3.29');
+}
diff --git a/test/test-event-loop-watchdog.js b/test/test-event-loop-watchdog.js
index acbbe74..a548c77 100644
--- a/test/test-event-loop-watchdog.js
+++ b/test/test-event-loop-watchdog.js
@@ -1,12 +1,9 @@
'use strict';
-if (process.platform !== 'linux') {
- console.log('1..0 # SKIP watchdog is Linux-only for now');
- return;
-}
+var common = require('./common');
-if (process.versions.v8 >= '3.15' && process.versions.v8 < '3.29') {
- console.log('1..0 # SKIP watchdog is incompatible with this node version');
+if (!common.canWatchdog()) {
+ console.log('1..0 # SKIP no watchdog for this arch/platform/runtime');
return;
}
diff --git a/test/test-no-watchdog.js b/test/test-no-watchdog.js
index d4b4924..31e0f2e 100644
--- a/test/test-no-watchdog.js
+++ b/test/test-no-watchdog.js
@@ -3,9 +3,10 @@
var addon = require('../lib/addon');
var agent = require('../');
var assert = require('assert');
+var common = require('./common');
var profiler = require('../lib/profilers/cpu');
-if (process.platform === 'linux') {
+if (common.canWatchdog()) {
addon.startCpuProfiling = function(timeout) { if (timeout) return 'BAM'; };
}
diff --git a/test/test-watchdog-activation-count.js b/test/test-watchdog-activation-count.js
index d9fa5bb..ab489e2 100644
--- a/test/test-watchdog-activation-count.js
+++ b/test/test-watchdog-activation-count.js
@@ -1,12 +1,9 @@
'use strict';
-if (process.platform !== 'linux') {
- console.log('1..0 # SKIP watchdog is Linux-only for now');
- return;
-}
+var common = require('./common');
-if (process.versions.v8 >= '3.15' && process.versions.v8 < '3.29') {
- console.log('1..0 # SKIP watchdog is incompatible with this node version');
+if (!common.canWatchdog()) {
+ console.log('1..0 # SKIP no watchdog for this arch/platform/runtime');
return;
}
Thanks @bnoordhuis : post application of the above patch locally , all test cases are passing . Requesting you to commit the above changes to the top of release.
Hi,
I was able to build this repo on my set up below : ppc64le _ rhel 7.1 using "npm install" But when i tried to test case using "npm test" command , i got below errors: There are two sub-tests which are failing mailing due to watchdog/profiling related errors. Please see snippet below.
Even when i tried to install watching it gives me following.
Any pointers to resolve the above failures will be helpful. Is watchdog profiling not supported as of now ? Please comment.