-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: skip some binding tests on IBMi PASE #31967
Conversation
Those tests are testing addons can build against the openssl and zlib bindings statically linked into the Node.js binary so linking to external libraries negates the purpose of those tests. Or does Node.js on IBMi PASE always build against the system openssl/zlib? |
Yes, Node.js on IBMi PASE always links to the system libraries (no static linking). Or maybe I should skip these cases? |
Anyone know what the Linux packagers that link against shared libraries do? |
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.
Just making sure that this does not land as-is
Hello @addaleax , |
I tried to compile node.js with shared openssl&zlib on CentOS and the addon tests showed no error. I guess that even in this 'shared' configuration, the Linux node.js build can also bind to the static libraries as well. But it does not work on IBMi PASE. |
@dmabupt how many/what tests don't pass? |
Hello @mhdawson , There are 18 failed tests --
|
So these are the only 2 that are related to the addons: addons/openssl-binding/test Sounds like you did tests on linux, though and excluding them in the way you suggest does not make sense since the tests still run ok there. We should see if we can get the excludes working properly. |
Looking at the test code seems that the platform should be detected as OS400 by the test harness and maps to 'ibmi' so using In what file did you add that along with the tests ? I think you would have to add to and something like this [$system==ibmi]
addons/openssl-binding/test: SKIP
addons/zlib-binding/test: SKIP |
Yes, but I missed the |
@dmabupt ok let us know if fixing up the paths works. |
@mhdawson , Seems it still can not skip the cases --
The patch is --
|
Is it failing in the build step as opposed to the test step? |
@mhdawson , It is failing in the To skip the build step, we have to edit this file (not that gracefully) --
|
@dmabupt can you add guards based on IBMi based on the platform in the test files, for example in |
@mhdawson Do you mean updating |
Was not thinking of that, more changing the code in the cc file so that it still compiles (but obviously not work), if we can make the gyp file not compile it for IBMi that might be even better. |
Updating the c code to make it build a dummy executable file on IBMi, then both the build step and test step can be passed (skipped) ? |
Seems it is not that easy. The zlib js test code deflates the data compressed by the compiled C code, and then compares it with the origin buffer -- https://github.com/nodejs/node/blob/master/test/addons/zlib-binding/test.js#L12 That means we have to change the js code as well if we skip the logic in the C code. |
But if the test is skipped then it should not matter what is in the js code right? |
|
@dmabupt I don't understand your point. If the test is skipped in the status file the js code will not run, correct? |
@mhdawson |
Now I think if we want to minimize the code change, my initial workaround (adding |
@dmabupt your original change seemed to affect all platforms. It might be ok if it only affect IBM i |
My following |
Hello @mhdawson , I have reverted the commits to the initial one -> 4df86c9 . This change only affect the IBMi PASE platform and it makes the two failed tests skipped (both compile & test steps). |
IBMi PASE Node.js always links to shared openssl and zlib libraries. So skip the static binding tests.
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
Landed in b416993 |
IBMi PASE Node.js always links to shared openssl and zlib libraries. So skip the static binding tests. PR-URL: #31967 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
IBMi PASE Node.js always links to shared openssl and zlib libraries. So skip the static binding tests. PR-URL: #31967 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@dmabupt This is failing to build on Windows machines that do not have |
Ah...yes, I should detect uname only in the |
IBMi PASE Node.js always links to shared openssl and zlib libraries. So skip the static binding tests. PR-URL: #31967 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
IBM i PASE Node.js always links to shared openssl libraries. Skip recently added OpenSSL addons tests as we do for other OpenSSL addons tests on IBM i. Refs: nodejs#31967 Refs: nodejs#44148
IBM i PASE Node.js always links to shared openssl libraries. Skip recently added OpenSSL addons tests as we do for other OpenSSL addons tests on IBM i. Refs: #31967 Refs: #44148 PR-URL: #44810 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
IBM i PASE Node.js always links to shared openssl libraries. Skip recently added OpenSSL addons tests as we do for other OpenSSL addons tests on IBM i. Refs: #31967 Refs: #44148 PR-URL: #44810 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
Ldflags "-lcrypto", "-lssl" and "-lz" are needed on
IBMi PASE to build the test suite