Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
tools: add check for using process.binding crypto#17867
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require.Currently, when configured --without-ssl this test fails with the following error: === release test-accessor-properties === Path: parallel/test-accessor-properties node/test/parallel/test-accessor-properties.js:16 const crypto = process.binding('crypto'); ^ Error: No such module: crypto at Object.<anonymous> (test-accessor-properties.js:16:24) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:577:32) at tryModuleLoad (module.js:517:12) at Function.Module._load (module.js:509:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:645:3 This commit adds a hasCrypto check.Currently, when configured --without-ssl test-repl-tab-complete fails with the following error: assert.js:43 throw new errors.AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: [ [], 'lexicalL' ] deepStrictEqual [] at testRepl.complete.common.mustCall (node/test/parallel/test-repl-tab-complete.js:549:14) at /node/test/common/index.js:530:15 at completionGroupsLoaded (repl.js:1204:5) at REPLServer.complete (repl.js:1090:11) at REPLServer.completer (repl.js:450:14) at REPLServer.complete (repl.js:919:18) at __dirname.forEach (parallel/test-repl-tab-complete.js:548:14) at Array.forEach (<anonymous>) at Object.<anonymous> (parallel/test-repl-tab-complete.js:545:29) at Module._compile (module.js:660:30) This commit attempts to fix this test but I'm not sure if this is a proper fix as I'm not familiar with the repl code base yet.
danbev commented Dec 26, 2017
danbev commented Dec 26, 2017
| constcommon=require('../common'); | ||
| if(!common.hasCrypto) | ||
| common.skip('missing crypto'); |
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.
Rather than skipping this entire test, can we move the crypto stuff to its if block and only run those tests if hasCrypto is true? This way, we aren't skipping the non-crypto tests in the file.
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.
Sounds good, I'll do that.
Trott commented Dec 26, 2017
Does our |
| constquery=`lexical${type[0]}`; | ||
| constexpected=hasInspector ? [[`lexical${type}`],query] : []; | ||
| constexpected=hasInspector ? [[`lexical${type}`],query] : | ||
| [[],`lexical${type[0]}`]; |
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.
Unrelated change?
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.
Actually it is related. Without this I get the error mentioned in the commit:
assert.js:43 throw new errors.AssertionError(obj); ^AssertionError [ERR_ASSERTION]: [ [], 'lexicalL' ] deepStrictEqual [] at testRepl.complete.common.mustCall (node/test/parallel/test-repl-tab-complete.js:549:14) at /node/test/common/index.js:530:15 at completionGroupsLoaded (repl.js:1204:5) at REPLServer.complete (repl.js:1090:11) at REPLServer.completer (repl.js:450:14) at REPLServer.complete (repl.js:919:18) at __dirname.forEach (parallel/test-repl-tab-complete.js:548:14) at Array.forEach (<anonymous>) at Object.<anonymous> (parallel/test-repl-tab-complete.js:545:29) at Module._compile (module.js:660:30)jasnell commented Dec 26, 2017
process.binding('http2') is still present without openssl but require('http2') is not |
Trott commented Dec 26, 2017
If I'm understanding correctly, then perhaps in some or even all cases, instead of skipping tests that include |
jasnell commented Dec 26, 2017
It's better to just skip all http2 tests when openssl is not present |
danbev commented Dec 27, 2017
Trott commented Dec 27, 2017
@jasnell Is that because there is no expected behavior without OpenSSL other than "absolutely nothing whatsoever in http2 works at all"? Or is there a different reason? |
jasnell commented Dec 27, 2017
It's because I'm likely going to change it so that |
BridgeAR left a comment
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.
No strong opinion, so LGTM
danbev commented Dec 29, 2017
test/node-test-commit failure looks unrelatedg++: internal compiler error: Killed (program cc1plus)Please submit a full bug report,with preprocessed source if appropriate.See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.deps/v8/src/v8_base.target.mk:608: recipe for target '/home/iojs/build/workspace/node-test-commit-arm/nodes/ubuntu1604-arm64_odroid_c2/out/Release/obj.target/v8_base/deps/v8/src/objects.o' failedmake[2]: *** [/home/iojs/build/workspace/node-test-commit-arm/nodes/ubuntu1604-arm64_odroid_c2/out/Release/obj.target/v8_base/deps/v8/src/objects.o] Error 4make[2]: *** Waiting for unfinished jobs....rm fa4b5595818ee3c6b8e353e33594a7e9a94ec498.intermediateMakefile:87: recipe for target 'node' failedmake[1]: *** [node] Error 2Makefile:611: recipe for target 'build-ci' failedmake: *** [build-ci] Error 2Build step 'Conditional steps (multiple)' marked build as failureRun condition [Always] enabling perform for step [[]]TAP Reports Processing: STARTLooking for TAP results report in workspace using pattern: *.tapDid not find any matching files. Setting build result to FAILURE.Checking ^not okJenkins Text Finder: File set '*.tap' is emptyNotifying upstream projects of job completionFinished: FAILURE |
Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl tests that use process.binding('crypto') fail with the following error: === release test-accessor-properties === Path: parallel/test-accessor-properties node/test/parallel/test-accessor-properties.js:16 const crypto = process.binding('crypto'); ^ Error: No such module: crypto at Object.<anonymous> (test-accessor-properties.js:16:24) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:577:32) at tryModuleLoad (module.js:517:12) at Function.Module._load (module.js:509:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:645:3 This commit adds a hasCrypto check. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl test-repl-tab-complete fails with the following error: assert.js:43 throw new errors.AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: [ [], 'lexicalL' ] deepStrictEqual [] at testRepl.complete.common.mustCall (node/test/parallel/test-repl-tab-complete.js:549:14) at /node/test/common/index.js:530:15 at completionGroupsLoaded (repl.js:1204:5) at REPLServer.complete (repl.js:1090:11) at REPLServer.completer (repl.js:450:14) at REPLServer.complete (repl.js:919:18) at __dirname.forEach (parallel/test-repl-tab-complete.js:548:14) at Array.forEach (<anonymous>) at Object.<anonymous> (parallel/test-repl-tab-complete.js:545:29) at Module._compile (module.js:660:30) This commit attempts to fix this test but I'm not sure if this is a proper fix as I'm not familiar with the repl code base yet. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
danbev commented Dec 29, 2017
Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl tests that use process.binding('crypto') fail with the following error: === release test-accessor-properties === Path: parallel/test-accessor-properties node/test/parallel/test-accessor-properties.js:16 const crypto = process.binding('crypto'); ^ Error: No such module: crypto at Object.<anonymous> (test-accessor-properties.js:16:24) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:577:32) at tryModuleLoad (module.js:517:12) at Function.Module._load (module.js:509:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:645:3 This commit adds a hasCrypto check. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl test-repl-tab-complete fails with the following error: assert.js:43 throw new errors.AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: [ [], 'lexicalL' ] deepStrictEqual [] at testRepl.complete.common.mustCall (node/test/parallel/test-repl-tab-complete.js:549:14) at /node/test/common/index.js:530:15 at completionGroupsLoaded (repl.js:1204:5) at REPLServer.complete (repl.js:1090:11) at REPLServer.completer (repl.js:450:14) at REPLServer.complete (repl.js:919:18) at __dirname.forEach (parallel/test-repl-tab-complete.js:548:14) at Array.forEach (<anonymous>) at Object.<anonymous> (parallel/test-repl-tab-complete.js:545:29) at Module._compile (module.js:660:30) This commit attempts to fix this test but I'm not sure if this is a proper fix as I'm not familiar with the repl code base yet. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl tests that use process.binding('crypto') fail with the following error: === release test-accessor-properties === Path: parallel/test-accessor-properties node/test/parallel/test-accessor-properties.js:16 const crypto = process.binding('crypto'); ^ Error: No such module: crypto at Object.<anonymous> (test-accessor-properties.js:16:24) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:577:32) at tryModuleLoad (module.js:517:12) at Function.Module._load (module.js:509:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:645:3 This commit adds a hasCrypto check. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl test-repl-tab-complete fails with the following error: assert.js:43 throw new errors.AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: [ [], 'lexicalL' ] deepStrictEqual [] at testRepl.complete.common.mustCall (node/test/parallel/test-repl-tab-complete.js:549:14) at /node/test/common/index.js:530:15 at completionGroupsLoaded (repl.js:1204:5) at REPLServer.complete (repl.js:1090:11) at REPLServer.completer (repl.js:450:14) at REPLServer.complete (repl.js:919:18) at __dirname.forEach (parallel/test-repl-tab-complete.js:548:14) at Array.forEach (<anonymous>) at Object.<anonymous> (parallel/test-repl-tab-complete.js:545:29) at Module._compile (module.js:660:30) This commit attempts to fix this test but I'm not sure if this is a proper fix as I'm not familiar with the repl code base yet. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins commented Jan 9, 2018
This will need to be manually backported as it is breaking v9.x-staging |
Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl tests that use process.binding('crypto') fail with the following error: === release test-accessor-properties === Path: parallel/test-accessor-properties node/test/parallel/test-accessor-properties.js:16 const crypto = process.binding('crypto'); ^ Error: No such module: crypto at Object.<anonymous> (test-accessor-properties.js:16:24) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:577:32) at tryModuleLoad (module.js:517:12) at Function.Module._load (module.js:509:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:645:3 This commit adds a hasCrypto check. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>gibfahn commented Jan 24, 2018
@MylesBorins did you end up getting this to work in 9.x? |
MylesBorins commented Feb 27, 2018
Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: nodejs#17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl test-repl-tab-complete fails with the following error: assert.js:43 throw new errors.AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: [ [], 'lexicalL' ] deepStrictEqual [] at testRepl.complete.common.mustCall (node/test/parallel/test-repl-tab-complete.js:549:14) at /node/test/common/index.js:530:15 at completionGroupsLoaded (repl.js:1204:5) at REPLServer.complete (repl.js:1090:11) at REPLServer.completer (repl.js:450:14) at REPLServer.complete (repl.js:919:18) at __dirname.forEach (parallel/test-repl-tab-complete.js:548:14) at Array.forEach (<anonymous>) at Object.<anonymous> (parallel/test-repl-tab-complete.js:545:29) at Module._compile (module.js:660:30) This commit attempts to fix this test but I'm not sure if this is a proper fix as I'm not familiar with the repl code base yet. PR-URL: nodejs#17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl tests that use process.binding('crypto') fail with the following error: === release test-accessor-properties === Path: parallel/test-accessor-properties node/test/parallel/test-accessor-properties.js:16 const crypto = process.binding('crypto'); ^ Error: No such module: crypto at Object.<anonymous> (test-accessor-properties.js:16:24) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:577:32) at tryModuleLoad (module.js:517:12) at Function.Module._load (module.js:509:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:645:3 This commit adds a hasCrypto check. PR-URL: nodejs#17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>Currently, when configured --without-ssl tests that use process.binding('crypto') fail with the following error: === release test-accessor-properties === Path: parallel/test-accessor-properties node/test/parallel/test-accessor-properties.js:16 const crypto = process.binding('crypto'); ^ Error: No such module: crypto at Object.<anonymous> (test-accessor-properties.js:16:24) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:577:32) at tryModuleLoad (module.js:517:12) at Function.Module._load (module.js:509:3) at Function.Module.runMain (module.js:701:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:645:3 This commit adds a hasCrypto check. Backport-PR-URL: #20456 PR-URL: #17867 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Currently, when configuring
--without-sslany tests that useprocess.binding('crypto')will not report a lint warning. This isbecause the eslint check only generates a warning when using require.
This commit adds a check for using binding in addition to require.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
tools