Skip to content

Commit 8e00315

Browse files
danbevMylesBorins
authored andcommitted
test: check zlib version for createDeflateRaw
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]>
1 parent feb6863 commit 8e00315

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/parallel/test-zlib-failed-init.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
'use strict';
22

3-
require('../common');
3+
const common = require('../common');
44

55
const assert = require('assert');
66
const zlib = require('zlib');
77

8+
if (process.config.variables.node_shared_zlib &&
9+
/^1\.2\.[0-8]$/.test(process.versions.zlib)) {
10+
common.skip("older versions of shared zlib don't throw on create");
11+
}
12+
813
// For raw deflate encoding, requests for 256-byte windows are rejected as
914
// invalid by zlib.
1015
// (http://zlib.net/manual.html#Advanced)

0 commit comments

Comments
 (0)