-
Notifications
You must be signed in to change notification settings - Fork 45
Conversation
Enable node-report on SmartOS. Mostly fixes #ifdefs so we take the correct paths. Code for listing the loaded libraries is the only new code.
Skip test for OS version due to broken uname call.
LGTM |
@misterdjules, could you take a look at this, please? |
@sam-github I will take a look at this today or tomorrow, thanks for the heads up! |
Also, let's make sure we mention @nodejs/platform-smartos next time there's a SmartOS specific change to discuss. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'd like an approval if possible from someone on @nodejs/platform-smartos
The code in node-report seems to consider that a call to However, it is not the case on all POSIX environments. For instance, on SmartOS This is confirmed by tracing the execution of the
Note the following call to the
In other words, the Linux man page is not incorrect, but I believe node-report's implementation should stick to the POSIX standard and consider any non-negative return value for I would think that what could have happened in the case the formatted Do you mind making that change, re-enabling the relevant test on SmartOS and trying to run the tests again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the uname
issue I pointed at is fixed, I believe this will look good to me. Thank you very much for doing this, it is very much appreciated!
test/test-os-version.js
Outdated
@@ -25,6 +25,8 @@ if (common.isWindows()) { | |||
tap.match(version_str, | |||
new RegExp('OS version: ' + os_name + ' \\d+.' + os.release()), | |||
'Checking OS version'); | |||
} else if (common.isSunOS()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cross referencing this with my earlier comment at #62 (comment). I believe we should be able to not skip this test.
Fix SmartOS uname call - returns >= 0 on success not 0.
Add 'sunos' -> 'SunOS' to the map of operating systems.
Ah, standards versus de facto standards. Fixed. |
@@ -31,7 +31,7 @@ if (process.argv[2] === 'child') { | |||
const options = {pid: child.pid}; | |||
// Node.js currently overwrites the command line on AIX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we might want to update the comment so that it mentions that node currently overwrites the command line arguments on SmartOS too.
@misterdjules - Have you verified that node.js does corrupt the arguments on SmartOS? AIX and SmartOS do handle the command line slightly differently in some ways. For example there's one more level of indirection to the array on AIX:
It might have the same bug but I'm reluctant to say so without testing it on a SmartOS box. You could try the test at the top of the node bug I raised for AIX: nodejs/node#10607 |
I'm on vacation with limited connectivity and no laptop, so please accept my excuses for the quick response and the lack of details and references. Also, i do not have access to my current work on that topic, so i'm writing based on what i remember, and i could be forgetting some important details. Yes, i tested that node on SmartOS overwrites the process's command line argument because libuv's I have changes in progress to fix that and libuv's proc title related functions on SmartOS as soon as I get some time to work on that. I'll be back in 6 days, so don't let that nit hold you back from landing these changes, but if you agree with my recollection of SmartOS issue with command line arguments, then feel free to update the comment as i suggested. |
Enable node-report on SmartOS. Mostly fixes #ifdefs so we take the correct paths. Code for listing the loaded libraries is the only new code. Allow for POSIX non-negative return values from uname(). PR-URL: #62 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
Landed as b082144 |
Just noticed we forgot to update the README.md. Raised #64. |
This PR fixes the compilation errors on SmartOS so that citgm goes green and should resolve issue #50.
Mostly this fixes #ifdefs so we take the correct paths. The code for listing the loaded libraries is the only new code.
I had to make one test change to not check the OS version as calling uname() returns an error on SmartOS. (I formatted the errorno value and it seemed to be "No such file or directory", google suggested that the uname info might come from /etc/release so that might be missing. It's quite hard to tell without access to the machine though.)
Aside from that it seems to be fully functional. If there is extended information that SmartOS provides that other platforms don't (different ulimit values for example) those can be added under other PR's.
There's a CI run with the full set of platforms here:
https://ci.nodejs.org/view/post-mortem/job/nodereport-continuous-integration/83/