Skip to content
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

Closed
wants to merge 1 commit into from
Closed

test: older shared zlib doesnt throw on create #15478

wants to merge 1 commit into from

Conversation

drewfish
Copy link
Contributor

@drewfish drewfish commented Sep 19, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • make lint doesn't show any new lint
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

test, zlib

@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. v6.x labels Sep 19, 2017
@@ -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");
Copy link
Contributor

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)) {
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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
MylesBorins pushed a commit that referenced this pull request Sep 22, 2017
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]>
@MylesBorins
Copy link
Contributor

landed in f364d7c
I took the liberty to land the commit with the original metadata + commit author to properly support our auditing tools.

Thanks @drewfish

MylesBorins pushed a commit that referenced this pull request Sep 26, 2017
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]>
@drewfish drewfish deleted the zlib-ver branch October 31, 2017 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants