-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: check symbols in shared lib #18806
Conversation
// There is no nm in Windows, maybe use dumpbin instead. | ||
// However, we still try to compose the correct shared lib path | ||
if (common.isWindows) { | ||
args.push(path.join(path.dirname(process.execPath), 'node.dll')); |
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.
I wonder if the logic for getting the shared lib instead of the stub executable is worth putting in the test/common/shared-lib-util.js
being added in #18626. The platform specific logic could then be kept out of these changes.
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.
sure. that would be great! Since that PR is not landed yet. I will do that after the merge.
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.
@richardlau per your suggestion and the PR is landed, I moved the shared lib path logic into test/common/shared-lib-util.js
beedb23
to
39c2edf
Compare
const { getSharedLibPath } = require('../common/shared-lib-util.js'); | ||
|
||
// For shared lib case, check shared lib instead | ||
if (process.config.variables.node_shared) { |
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.
Why not just conditionally create args
?
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.
sure! :-)
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.
it's done.
39c2edf
to
79842cc
Compare
test/common/shared-lib-util.js
Outdated
@@ -27,3 +27,17 @@ exports.addLibraryPath = function(env) { | |||
(env.PATH ? env.PATH + path.delimiter : '') + | |||
path.dirname(process.execPath); | |||
}; | |||
|
|||
// Get get the full path of shared lib |
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.
One too many get
's 😁.
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.
oops....... thanks @richardlau . fixed
79842cc
to
0da2151
Compare
debian8-x64 failed on |
previous CI passed the windows build and the second CI passed the linux test. I think it's green for this change. |
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: nodejs#18535 Signed-off-by: Yihong Wang <[email protected]>
0da2151
to
01374fe
Compare
rebased because of the conflict and new CI: https://ci.nodejs.org/job/node-test-commit/16393/ |
Landed in ab7c627 |
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: #18535 Signed-off-by: Yihong Wang <[email protected]> PR-URL: #18806 Refs: #18535 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
thanks @addaleax |
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: #18535 Signed-off-by: Yihong Wang <[email protected]> PR-URL: #18806 Refs: #18535 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: #18535 Signed-off-by: Yihong Wang <[email protected]> PR-URL: #18806 Refs: #18535 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: nodejs#18535 Signed-off-by: Yihong Wang <[email protected]> PR-URL: nodejs#18806 Refs: nodejs#18535 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: #18535 Signed-off-by: Yihong Wang <[email protected]> PR-URL: #18806 Refs: #18535 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: #18535 Signed-off-by: Yihong Wang <[email protected]> PR-URL: #18806 Refs: #18535 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: #18535 Signed-off-by: Yihong Wang <[email protected]> PR-URL: #18806 Refs: #18535 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
When building the node with `--shared` option, we need to verify the symbols in shared lib instead of executable. Refs: #18535 Signed-off-by: Yihong Wang <[email protected]> PR-URL: #18806 Refs: #18535 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
When building the node with
--shared
option, we needto verify the symbols in shared lib instead of executable.
Refs: #18535
Signed-off-by: Yihong Wang [email protected]
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test