Skip to content

Commit 4b05ec3

Browse files
hhellyeritaloacasas
authored andcommitted
test: run test-setproctitle where supported
Setting the process title has been enabled in libuv on AIX and z/OS. The latest level of libuv skips only skips testing of uv_set_process_title when __sun is #defined. This change simplifies the skip test so the test is only skipped when common.isSunOS is true to match libuv. Skip running the `ps` part of the test on Windows. PR-URL: #11416 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 4408437 commit 4b05ec3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/parallel/test-setproctitle.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const common = require('../common');
44

55
// FIXME add sunos support
6-
if (!(common.isFreeBSD || common.isOSX || common.isLinux)) {
6+
if (common.isSunOS) {
77
console.log(`1..0 # Skipped: Unsupported platform [${process.platform}]`);
88
return;
99
}
@@ -21,6 +21,10 @@ assert.notStrictEqual(process.title, title);
2121
process.title = title;
2222
assert.strictEqual(process.title, title);
2323

24+
// Test setting the title but do not try to run `ps` on Windows.
25+
if (common.isWindows)
26+
return;
27+
2428
exec(`ps -p ${process.pid} -o args=`, function callback(error, stdout, stderr) {
2529
assert.ifError(error);
2630
assert.strictEqual(stderr, '');

0 commit comments

Comments
 (0)