Bug 6188 - zstd differences on big-endian (test-repo-compengines.t fails)
Summary: zstd differences on big-endian (test-repo-compengines.t fails)
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: PC Linux
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-22 09:12 UTC by Julien Cristau
Modified: 2019-09-15 00:01 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments
zstd-level-default/.hg/store/data/a.i from test-repo-compengines.t on s390x (4.01 KB, application/octet-stream)
2019-08-22 09:12 UTC, Julien Cristau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Cristau 2019-08-22 09:12 UTC
Created attachment 2056 [details]
zstd-level-default/.hg/store/data/a.i from test-repo-compengines.t on s390x

Hi,

I'm not sure whether this is an issue with zstd itself, python-zstandard or mercurial, so filing here.

Running test-repo-compengines.t on a big-endian host seems to fail consistently (reproduced on mips and on s390x, with hg 5.1):

--- /home/jcristau/mercurial/tests/test-repo-compengines.t
+++ /home/jcristau/mercurial/tests/test-repo-compengines.t.err
@@ -171,7 +171,7 @@
   $ $RUNTESTDIR/f -s zstd-*/.hg/store/data/*
   zstd-level-1/.hg/store/data/a.i: size=4097
   zstd-level-22/.hg/store/data/a.i: size=4091
-  zstd-level-default/.hg/store/data/a.i: size=4094
+  zstd-level-default/.hg/store/data/a.i: size=4102
 
 Test error cases
 

ERROR: test-repo-compengines.t output changed

Attaching the file I get on s390x.
Comment 1 Augie Fackler 2019-08-22 11:15 UTC
+indygreg, zstd wizard
Comment 2 Gregory Szorc 2019-08-27 00:42 UTC
If the repo isn't corrupt, I'm guessing it is a difference in zstd's behavior on big-endian machines. It feels safe to make the test output conditional.
Comment 3 Julien Cristau 2019-08-27 05:14 UTC
Fair enough.  It seemed surprising that the level-1 and level-22 cases were the same but level-default was different (and the file size is bigger than both 1 and 22, instead of in between).
Comment 4 HG Bot 2019-08-30 11:50 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/a4e32fd539ab
Gregory Szorc <gregory.szorc@gmail.com>
python-zstandard: apply big-endian fix (issue6188)

This is a port of commit d4baf1f95b811f40773f5df0d8780fb2111ba6f5
from the upstream project to fix python-zstandard on 64-bit big-endian.

(please test the fix)
Comment 5 Julien Cristau 2019-08-30 15:05 UTC
status moved back to confirmed since the change from comment 4 doesn't address this.
Comment 6 HG Bot 2019-09-07 13:05 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/da2c360899c9
Julien Cristau <jcristau@debian.org>
test: allow different result for zstd compression (issue6188)

test-repo-compengines fails on big-endian due to different file size,
but the repo doesn't seem broken, so allow both sizes.

Differential Revision: https://phab.mercurial-scm.org/D6787

(please test the fix)
Comment 7 Bugzilla 2019-09-15 00:01 UTC
Bug was set to TESTING for 7 days, resolving