]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
update CI
authorDanielle Rozenblit <drozenblit@fb.com>
Fri, 27 Jan 2023 22:18:29 +0000 (14:18 -0800)
committerDanielle Rozenblit <drozenblit@fb.com>
Fri, 27 Jan 2023 22:18:29 +0000 (14:18 -0800)
.github/workflows/dev-long-tests.yml
tests/Makefile
tests/zstreamtest.c

index 3fa2ceea240eb447fef7a846384b7ed08c22c459..c6e1e0be269776c1a30468c36493c0a398b9dbf8 100644 (file)
@@ -65,6 +65,17 @@ jobs:
     - name: thread sanitizer fuzztest
       run: CC=clang make tsan-fuzztest
 
+
+  big-tests-zstreamtest32:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag=v3
+    - name: zstream tests in 32bit mode, with big tests
+      run: |
+        sudo apt-get -qqq update
+        make libc6install
+        CC=clang make -C tests test-zstream32 FUZZERFLAGS="--big-tests"
+
   # lasts ~23mn
   gcc-8-asan-ubsan-testzstd:
     runs-on: ubuntu-latest
index 8226176cc867b955544304e227104ec93b418da5..3eed19ea80c088b03167fb6d2094b3082ef26a71 100644 (file)
@@ -373,7 +373,7 @@ test-zstream: zstreamtest
        $(QEMU_SYS) ./zstreamtest --newapi -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
 
 test-zstream32: zstreamtest32
-       $(QEMU_SYS) ./zstreamtest32 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
+       $(QEMU_SYS) ./zstreamtest32 -v $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
 
 test-longmatch: longmatch
        $(QEMU_SYS) ./longmatch
index 3e5d854f12529baaeef6f19c4a31d21a2335f20a..2442593b7b24b8a7bb997627392e5bd3d95c35ae 100644 (file)
@@ -2224,7 +2224,7 @@ static int basicUnitTests(U32 seed, double compressibility, int bigTests)
 
 
     DISPLAYLEVEL(3, "test%3i : Testing large offset with small window size: ", testNb++);
-    {
+    if (bigTests) {
         ZSTD_CCtx* cctx = ZSTD_createCCtx();
         ZSTD_DCtx* dctx = ZSTD_createDCtx();
 
@@ -2237,7 +2237,7 @@ static int basicUnitTests(U32 seed, double compressibility, int bigTests)
             size_t const kNbSequences = 4;
             ZSTD_Sequence* sequences = malloc(sizeof(ZSTD_Sequence) * kNbSequences);
             void* const checkBuf = malloc(srcSize);
-            const size_t largeDictSize = 1 << 30;
+            const size_t largeDictSize = 1 << 25;
             ZSTD_CDict* cdict = NULL;
             ZSTD_DDict* ddict = NULL;
 
@@ -2255,8 +2255,8 @@ static int basicUnitTests(U32 seed, double compressibility, int bigTests)
             ZSTD_DCtx_refDDict(dctx, ddict);
 
             sequences[0] = (ZSTD_Sequence) {3, 3, 3, 0};
-            sequences[1] = (ZSTD_Sequence) {1 << 29, 0, 3, 0};
-            sequences[2] = (ZSTD_Sequence) {1 << 29, 0, 9, 0};
+            sequences[1] = (ZSTD_Sequence) {1 << 25, 0, 3, 0};
+            sequences[2] = (ZSTD_Sequence) {1 << 25, 0, 9, 0};
             sequences[3] = (ZSTD_Sequence) {3, 0, 3, 0};
 
             cSize = ZSTD_compressSequences(cctx, dst, dstSize,
@@ -3094,6 +3094,7 @@ int main(int argc, const char** argv)
 
             if (!strcmp(argument, "--newapi")) { selected_api=advanced_api; testNb += !testNb; continue; }
             if (!strcmp(argument, "--no-big-tests")) { bigTests=0; continue; }
+            if (!strcmp(argument, "--big-tests")) { bigTests=1; continue; }
 
             argument++;
             while (*argument!=0) {