| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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? |
Sorry, something went wrong.
Yes, Node.js on IBMi PASE always links to the system libraries (no static linking). Or maybe I should skip these cases? |
Sorry, something went wrong.
|
Anyone know what the Linux packagers that link against shared libraries do? |
Sorry, something went wrong.
There was a problem hiding this comment.
Just making sure that this does not land as-is
Sorry, something went wrong.
Hello @addaleax , |
Sorry, something went wrong.
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. |
Sorry, something went wrong.
|
@dmabupt how many/what tests don't pass? |
Sorry, something went wrong.
Hello @mhdawson , There are 18 failed tests --
|
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Looking at the test code seems that the platform should be detected as OS400 by the test harness and maps to 'ibmi' so using [$system==ibmi] should work. In what file did you add that along with the tests ? I think you would have to add to .../test/addons/addon.status and something like this [$system==ibmi]
addons/openssl-binding/test: SKIP
addons/zlib-binding/test: SKIP |
Sorry, something went wrong.
Yes, but I missed the addons path and wrote openssl-binding/test: SKIP. That may be the problem. |
Sorry, something went wrong.
|
@dmabupt ok let us know if fixing up the paths works. |
Sorry, something went wrong.
@mhdawson , Seems it still can not skip the cases -- Error: Command failed: /home/XUMENG/rpmbuild/BUILD/node-v14.0.0-nightly202003026bcea0a383/out/Release/node /home/XUMENG/rpmbuild/BUILD/node-v14.0.0-nightly202003026bcea0a383/deps/npm/node_modules/node-gyp/bin/node-gyp.js rebuild --directory=/home/XUMENG/rpmbuild/BUILD/node-v14.0.0-nightly202003026bcea0a383/test/addons/openssl-binding ld: 0711-224 WARNING: Duplicate symbol: std::_Sp_counted_ptr<decltype(nullptr), (__gnu_cxx::_Lock_policy)2>::_M_dispose() ld: 0711-224 WARNING: Duplicate symbol: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_destroy() ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .TLSv1_2_server_method ld: 0711-317 ERROR: Undefined symbol: .RAND_poll ld: 0711-317 ERROR: Undefined symbol: .RAND_bytes collect2: error: ld returned 8 exit status gmake[2]: *** [binding.target.mk:145: Release/obj.target/binding.node] Error 1 The patch is -- --- a/test/addons/addon.status +++ b/test/addons/addon.status @@ -9,3 +9,7 @@ prefix addons [$arch==arm] # https://github.com/nodejs/node/issues/30786 openssl-binding/test: PASS,FLAKY + +[$system==ibmi] +addons/openssl-binding/test: SKIP +addons/zlib-binding/test: SKIP |
Sorry, something went wrong.
|
Is it failing in the build step as opposed to the test step? |
Sorry, something went wrong.
@mhdawson , It is failing in the make test-only step. More precisely, in the make build-addons step. To skip the build step, we have to edit this file (not that gracefully) -- --- a/tools/build-addons.js
+++ b/tools/build-addons.js
@@ -28,7 +28,8 @@ async function runner(directoryQueue) {
return next();
throw err;
}
-
+ if(dir.indexOf('openssl-binding') >= 0 || dir.indexOf('zlib-binding') >= 0)
+ return next();
console.log(`Building addon in ${dir}`);
const { stdout, stderr } =
await execFile(process.execPath, [nodeGyp, 'rebuild', `--directory=${dir}`],
|
Sorry, something went wrong.
|
@dmabupt can you add guards based on IBMi based on the platform in the test files, for example in node/test/addons/zlib-binding which avoids the compile failures, that along with the excludes might work and be a better answer. |
Sorry, something went wrong.
@mhdawson Do you mean updating node/test/addons/zlib-binding/binding.gyp to skip IBMi systems? |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
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) ? |
Sorry, something went wrong.
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. |
Sorry, something went wrong.
|
But if the test is skipped then it should not matter what is in the js code right? |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
@dmabupt I don't understand your point. If the test is skipped in the status file the js code will not run, correct? |
Sorry, something went wrong.
@mhdawson |
Sorry, something went wrong.
|
Now I think if we want to minimize the code change, my initial workaround (adding -lssl, -lz to the gyp file to make the two tests pass on IBMi PASE) is still a choice. |
Sorry, something went wrong.
|
@dmabupt your original change seemed to affect all platforms. It might be ok if it only affect IBM i |
Sorry, something went wrong.
My following force push actions have overwritten the first commit. In that commit, the ldflags are only added on platform ibmi. |
Sorry, something went wrong.
|
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). |
Sorry, something went wrong.
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.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
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 <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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 <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
@dmabupt This is failing to build on Windows machines that do not have uname available, fyi. |
Sorry, something went wrong.
Ah...yes, I should detect uname only in the aix condition. I opened another PR for the fix on Windows. |
Sorry, something went wrong.
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 <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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 <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Ldflags "-lcrypto", "-lssl" and "-lz" are needed on
IBMi PASE to build the test suite