-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: older shared zlib doesnt throw on create #15478
Conversation
@@ -5,6 +5,10 @@ require('../common'); | |||
const assert = require('assert'); | |||
const zlib = require('zlib'); | |||
|
|||
if (process.config.variables.node_shared_zlib && /^1\.2\.[0-8]$/.test(process.versions.zlib)) { | |||
require('../common').skip("older versions of shared zlib don't throw on create"); |
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.
../common
is already required above. You just need to assign it to a variable.
|
||
const assert = require('assert'); | ||
const zlib = require('zlib'); | ||
|
||
if (process.config.variables.node_shared_zlib && /^1\.2\.[0-8]$/.test(process.versions.zlib)) { |
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: long line. I think linter is not happy with it.
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.
Hmm... from digging through the Makefile this appears to be the lint command:
$(NODE) tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules --ext=.js,.md benchmark doc lib test tools
I ran that and it didn't show any lint in that file. I'll break the long line anyways, however.
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.
Thank you.
When using compiling using `./configure --shared-zlib` older versions of the shared zlib might not through as expected by the test-zlib-failed-init test. Refs: #13697
We are currenly builing Node with --shared-zlib which happens to be version 1.2.8. The test for zlib.createDeflateRaw is expected to fail but does not when using version 1.2.8. As far as I can tell the fix referred to in the comments was introduced in version 1.2.9: - Reject a window size of 256 bytes if not using the zlib wrapper This commit suggests adding a check for the version and skipping this assert if the version is less than 1.2.9. Refs: http://zlib.net/ChangeLog.txt Backport-PR-URL: #15478 PR-URL: #13697 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]>
We are currenly builing Node with --shared-zlib which happens to be version 1.2.8. The test for zlib.createDeflateRaw is expected to fail but does not when using version 1.2.8. As far as I can tell the fix referred to in the comments was introduced in version 1.2.9: - Reject a window size of 256 bytes if not using the zlib wrapper This commit suggests adding a check for the version and skipping this assert if the version is less than 1.2.9. Refs: http://zlib.net/ChangeLog.txt Backport-PR-URL: #15478 PR-URL: #13697 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesmake lint
doesn't show any new lintAffected core subsystem(s)
test, zlib