changeset 48344:f447b90a4b11 stable

tests: allow for variation in zstd output as seen on s390x and powerpc
author Julien Cristau <jcristau@debian.org>
date Wed, 25 Aug 2021 17:14:47 +0200
parents b74ee41addee
children b52cf5063865
files tests/hghave.py tests/test-clone-stream.t tests/test-generaldelta.t tests/test-persistent-nodemap.t
diffstat 4 files changed, 35 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Mon Nov 29 12:27:33 2021 +0000
+++ b/tests/hghave.py	Wed Aug 25 17:14:47 2021 +0200
@@ -1149,3 +1149,8 @@
 @check("bash", "bash shell")
 def has_bash():
     return matchoutput("bash -c 'echo hi'", b'^hi$')
+
+
+@check("bigendian", "big-endian CPU")
+def has_bigendian():
+    return sys.byteorder == 'big'
--- a/tests/test-clone-stream.t	Mon Nov 29 12:27:33 2021 +0000
+++ b/tests/test-clone-stream.t	Wed Aug 25 17:14:47 2021 +0200
@@ -404,11 +404,13 @@
 #endif
 #if zstd no-rust
   $ f --size --hex --bytes 256 body
-  body: size=116340
+  body: size=116340 (no-bigendian !)
+  body: size=116335 (bigendian !)
   0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
   0010: 9a 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
   0020: 06 09 04 0c 5e 62 79 74 65 63 6f 75 6e 74 31 30 |....^bytecount10|
-  0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109|
+  0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109| (no-bigendian !)
+  0030: 31 32 37 31 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1271filecount109| (bigendian !)
   0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |3requirementsdot|
   0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
   0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
@@ -533,7 +535,8 @@
   transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
   bundle2-input-part: total payload size 118984 (no-zstd !)
   transferred 98.9 KB in * seconds (* */sec) (glob) (zstd !)
-  bundle2-input-part: total payload size 116145 (zstd !)
+  bundle2-input-part: total payload size 116145 (zstd no-bigendian !)
+  bundle2-input-part: total payload size 116140 (zstd bigendian !)
   bundle2-input-part: "listkeys" (params: 1 mandatory) supported
   bundle2-input-bundle: 2 parts total
   checking for updated bookmarks
--- a/tests/test-generaldelta.t	Mon Nov 29 12:27:33 2021 +0000
+++ b/tests/test-generaldelta.t	Wed Aug 25 17:14:47 2021 +0200
@@ -290,11 +290,14 @@
        52       4        4       51      p1         58        640        669   1.04531       669         0    0.00000 (no-zstd !)
        49       4        1       -1    base        205        316        205   0.64873       205         0    0.00000 (zstd !)
        50       4        2       49      p1         58        362        263   0.72652       263         0    0.00000 (zstd !)
-       51       4        3       50    prev        366        594        629   1.05892       629         0    0.00000 (zstd !)
-       52       4        4       51      p1         58        640        687   1.07344       687         0    0.00000 (zstd !)
+       51       4        3       50    prev        366        594        629   1.05892       629         0    0.00000 (zstd no-bigendian !)
+       52       4        4       51      p1         58        640        687   1.07344       687         0    0.00000 (zstd no-bigendian !)
+       51       4        3       50    prev        367        594        630   1.06061       630         0    0.00000 (zstd bigendian !)
+       52       4        4       51      p1         58        640        688   1.07500       688         0    0.00000 (zstd bigendian !)
        53       5        1       -1    base          0          0          0   0.00000         0         0    0.00000
        54       6        1       -1    base        369        640        369   0.57656       369         0    0.00000 (no-zstd !)
-       54       6        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd !)
+       54       6        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd no-bigendian !)
+       54       6        1       -1    base        376        640        376   0.58750       376         0    0.00000 (zstd bigendian !)
   $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2800 relax-chain --config format.generaldelta=yes
   requesting all changes
   adding changesets
@@ -362,10 +365,12 @@
        49       4        1       -1    base        205        316        205   0.64873       205         0    0.00000 (zstd !)
        50       4        2       49      p1         58        362        263   0.72652       263         0    0.00000 (zstd !)
        51       2       13       17      p1         58        594        739   1.24411      2789      2050    2.77402 (zstd !)
-       52       5        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd !)
+       52       5        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd no-bigendian !)
+       52       5        1       -1    base        376        640        376   0.58750       376         0    0.00000 (zstd bigendian !)
        53       6        1       -1    base          0          0          0   0.00000         0         0    0.00000
        54       7        1       -1    base        369        640        369   0.57656       369         0    0.00000 (no-zstd !)
-       54       7        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd !)
+       54       7        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd no-bigendian !)
+       54       7        1       -1    base        376        640        376   0.58750       376         0    0.00000 (zstd bigendian !)
   $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.usegeneraldelta=yes --config storage.revlog.reuse-external-delta-parent=no
   requesting all changes
   adding changesets
@@ -432,4 +437,5 @@
        52       2       14       51      p1         58        640        797   1.24531      2700      1903    2.38770
        53       4        1       -1    base          0          0          0   0.00000         0         0    0.00000
        54       5        1       -1    base        369        640        369   0.57656       369         0    0.00000 (no-zstd !)
-       54       5        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd !)
+       54       5        1       -1    base        375        640        375   0.58594       375         0    0.00000 (zstd no-bigendian !)
+       54       5        1       -1    base        376        640        376   0.58750       376         0    0.00000 (zstd bigendian !)
--- a/tests/test-persistent-nodemap.t	Mon Nov 29 12:27:33 2021 +0000
+++ b/tests/test-persistent-nodemap.t	Wed Aug 25 17:14:47 2021 +0200
@@ -1023,7 +1023,8 @@
   adding [s] 00changelog.n (62 bytes)
   adding [s] 00changelog-*.nd (118 KB) (glob)
   adding [s] 00manifest.d (452 KB) (no-zstd !)
-  adding [s] 00manifest.d (491 KB) (zstd !)
+  adding [s] 00manifest.d (491 KB) (zstd no-bigendian !)
+  adding [s] 00manifest.d (492 KB) (zstd bigendian !)
   adding [s] 00changelog.d (360 KB) (no-zstd !)
   adding [s] 00changelog.d (368 KB) (zstd !)
   adding [s] 00manifest.i (313 KB)
@@ -1063,7 +1064,8 @@
 
   $ f --size test-repo/.hg/store/00changelog*
   test-repo/.hg/store/00changelog-*.nd: size=121088 (glob)
-  test-repo/.hg/store/00changelog.d: size=376891 (zstd !)
+  test-repo/.hg/store/00changelog.d: size=376891 (zstd no-bigendian !)
+  test-repo/.hg/store/00changelog.d: size=376889 (zstd bigendian !)
   test-repo/.hg/store/00changelog.d: size=368890 (no-zstd !)
   test-repo/.hg/store/00changelog.i: size=320384
   test-repo/.hg/store/00changelog.n: size=62
@@ -1093,7 +1095,8 @@
   adding [s] 00changelog.n (62 bytes)
   adding [s] 00changelog-*.nd (118 KB) (glob)
   adding [s] 00manifest.d (452 KB) (no-zstd !)
-  adding [s] 00manifest.d (491 KB) (zstd !)
+  adding [s] 00manifest.d (491 KB) (zstd no-bigendian !)
+  adding [s] 00manifest.d (492 KB) (zstd bigendian !)
   adding [s] 00changelog.d (360 KB) (no-zstd !)
   adding [s] 00changelog.d (368 KB) (zstd !)
   adding [s] 00manifest.i (313 KB)
@@ -1104,7 +1107,8 @@
   $ f --size stream-clone-race-1/.hg/store/00changelog*
   stream-clone-race-1/.hg/store/00changelog-*.nd: size=121088 (glob)
   stream-clone-race-1/.hg/store/00changelog.d: size=368890 (no-zstd !)
-  stream-clone-race-1/.hg/store/00changelog.d: size=376891 (zstd !)
+  stream-clone-race-1/.hg/store/00changelog.d: size=376891 (zstd no-bigendian !)
+  stream-clone-race-1/.hg/store/00changelog.d: size=376889 (zstd bigendian !)
   stream-clone-race-1/.hg/store/00changelog.i: size=320384
   stream-clone-race-1/.hg/store/00changelog.n: size=62
 
@@ -1158,7 +1162,8 @@
   test-repo/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !)
   test-repo/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !)
   test-repo/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !)
-  test-repo/.hg/store/00changelog.d: size=376950 (zstd !)
+  test-repo/.hg/store/00changelog.d: size=376950 (zstd no-bigendian !)
+  test-repo/.hg/store/00changelog.d: size=376948 (zstd bigendian !)
   test-repo/.hg/store/00changelog.d: size=368949 (no-zstd !)
   test-repo/.hg/store/00changelog.i: size=320448
   test-repo/.hg/store/00changelog.n: size=62
@@ -1209,7 +1214,8 @@
   stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (rust !)
   stream-clone-race-2/.hg/store/00changelog-*.nd: size=121344 (glob) (pure !)
   stream-clone-race-2/.hg/store/00changelog-*.nd: size=121152 (glob) (no-rust no-pure !)
-  stream-clone-race-2/.hg/store/00changelog.d: size=376950 (zstd !)
+  stream-clone-race-2/.hg/store/00changelog.d: size=376950 (zstd no-bigendian !)
+  stream-clone-race-2/.hg/store/00changelog.d: size=376948 (zstd bigendian !)
   stream-clone-race-2/.hg/store/00changelog.d: size=368949 (no-zstd !)
   stream-clone-race-2/.hg/store/00changelog.i: size=320448
   stream-clone-race-2/.hg/store/00changelog.n: size=62