Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1598894

Browse filesBrowse files
AdamMajerdanielleadams
authored andcommitted
test: s390x z15 accelerated zlib fixes
Modern s390x x15 has accelerated zlib operations on the CPU. Many distros currently have patches to take advantage of this feature. One side-effect of these patches is that compression routine is no longer deterministic as with software. Interruption to input produces different compressed results. Invalid input can result in processor fault. PR-URL: #44117 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 51b4a1b commit 1598894
Copy full SHA for 1598894

File tree

Expand file treeCollapse file tree

3 files changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-zlib-dictionary-fail.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-zlib-dictionary-fail.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const input = Buffer.from([0x78, 0xBB, 0x04, 0x09, 0x01, 0xA5]);
5353
stream.on('error', common.mustCall(function(err) {
5454
// It's not possible to separate invalid dict and invalid data when using
5555
// the raw format
56-
assert.match(err.message, /invalid/);
56+
assert.match(err.message, /(invalid|Operation-Ending-Supplemental Code is 0x12)/);
5757
}));
5858

5959
stream.write(input);
Collapse file

‎test/parallel/test-zlib-flush-drain-longblock.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-zlib-flush-drain-longblock.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ zipper.write('A'.repeat(17000));
1616
zipper.flush();
1717

1818
let received = 0;
19-
unzipper.on('data', common.mustCall((d) => {
19+
unzipper.on('data', common.mustCallAtLeast((d) => {
2020
received += d.length;
2121
}, 2));
2222

Collapse file

‎test/parallel/test-zlib-from-string.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-zlib-from-string.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ const expectedBase64Gzip = 'H4sIAAAAAAAAA11RS05DMQy8yhzg6d2BPSAkJPZu4laWkjiN4' +
5555
'sHnHNzRtagj5AQAA';
5656

5757
zlib.deflate(inputString, common.mustCall((err, buffer) => {
58-
assert.strictEqual(buffer.toString('base64'), expectedBase64Deflate);
58+
zlib.inflate(buffer, common.mustCall((err, inflated) => {
59+
assert.strictEqual(inflated.toString(), inputString);
60+
}));
5961
}));
6062

6163
zlib.gzip(inputString, common.mustCall((err, buffer) => {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.