zlib-ng / zlib-ng
Showing 3 of 6 files from the diff.

@@ -15,12 +15,9 @@
Loading
15 15
#include <stdarg.h>
16 16
#include <inttypes.h>
17 17
18 -
#define TESTFILE "foo.gz"
18 +
#include "test_shared.h"
19 19
20 -
static const char hello[] = "hello, hello!";
21 -
/* "hello world" would be more standard, but the repeated "hello"
22 -
 * stresses the compression code better, sorry...
23 -
 */
20 +
#define TESTFILE "foo.gz"
24 21
25 22
static const char dictionary[] = "hello";
26 23
static unsigned long dictId = 0; /* Adler32 value of the dictionary */
@@ -437,8 +434,10 @@
Loading
437 434
    *comprLen = (z_size_t)c_stream.total_out;
438 435
}
439 436
437 +
#ifdef ZLIBNG_ENABLE_TESTS
440 438
/* ===========================================================================
441 439
 * Test inflateSync()
440 +
 * We expect a certain compressed block layout, so skip this with the original zlib.
442 441
 */
443 442
void test_sync(unsigned char *compr, size_t comprLen, unsigned char *uncompr, size_t uncomprLen) {
444 443
    int err;
@@ -474,6 +473,7 @@
Loading
474 473
475 474
    printf("after inflateSync(): hel%s\n", (char *)uncompr);
476 475
}
476 +
#endif
477 477
478 478
/* ===========================================================================
479 479
 * Test deflate() with preset dictionary
@@ -785,7 +785,7 @@
Loading
785 785
    err = PREFIX(deflatePrime)(&c_stream, 5, 0x0);
786 786
    CHECK_ERR(err, "deflatePrime");
787 787
    /* Gzip modified time */
788 -
    err = PREFIX(deflatePrime)(&c_stream, 32, 0x0);
788 +
    err = deflate_prime_32(&c_stream, 0);
789 789
    CHECK_ERR(err, "deflatePrime");
790 790
    /* Gzip extra flags */
791 791
    err = PREFIX(deflatePrime)(&c_stream, 8, 0x0);
@@ -805,10 +805,10 @@
Loading
805 805
806 806
    /* Gzip uncompressed data crc32 */
807 807
    crc = PREFIX(crc32)(0, (const uint8_t *)hello, (uint32_t)len);
808 -
    err = PREFIX(deflatePrime)(&c_stream, 32, crc);
808 +
    err = deflate_prime_32(&c_stream, crc);
809 809
    CHECK_ERR(err, "deflatePrime");
810 810
    /* Gzip uncompressed data length */
811 -
    err = PREFIX(deflatePrime)(&c_stream, 32, (uint32_t)len);
811 +
    err = deflate_prime_32(&c_stream, (uint32_t)len);
812 812
    CHECK_ERR(err, "deflatePrime");
813 813
814 814
    err = PREFIX(deflateEnd)(&c_stream);
@@ -993,7 +993,9 @@
Loading
993 993
#endif
994 994
995 995
    test_flush(compr, &comprLen);
996 +
#ifdef ZLIBNG_ENABLE_TESTS
996 997
    test_sync(compr, comprLen, uncompr, uncomprLen);
998 +
#endif
997 999
    comprLen = uncomprLen;
998 1000
999 1001
    test_dict_deflate(compr, comprLen);

@@ -42,7 +42,7 @@
Loading
42 42
    err = PREFIX(deflatePrime)(&c_stream, 5, 0x0);
43 43
    EXPECT_EQ(err, Z_OK);
44 44
    /* Gzip modified time */
45 -
    err = PREFIX(deflatePrime)(&c_stream, 32, 0x0);
45 +
    err = deflate_prime_32(&c_stream, 0x0);
46 46
    EXPECT_EQ(err, Z_OK);
47 47
    /* Gzip extra flags */
48 48
    err = PREFIX(deflatePrime)(&c_stream, 8, 0x0);
@@ -61,10 +61,10 @@
Loading
61 61
62 62
    /* Gzip uncompressed data crc32 */
63 63
    crc = PREFIX(crc32)(0, (const uint8_t *)hello, (uint32_t)hello_len);
64 -
    err = PREFIX(deflatePrime)(&c_stream, 32, crc);
64 +
    err = deflate_prime_32(&c_stream, crc);
65 65
    EXPECT_EQ(err, Z_OK);
66 66
    /* Gzip uncompressed data length */
67 -
    err = PREFIX(deflatePrime)(&c_stream, 32, (uint32_t)hello_len);
67 +
    err = deflate_prime_32(&c_stream, (uint32_t)hello_len);
68 68
    EXPECT_EQ(err, Z_OK);
69 69
70 70
    err = PREFIX(deflateEnd)(&c_stream);

@@ -1,2 +1,20 @@
Loading
1 +
/* "hello world" would be more standard, but the repeated "hello"
2 +
 * stresses the compression code better, sorry...
3 +
 */
1 4
static const char hello[] = "hello, hello!";
2 5
static const int hello_len = sizeof(hello);
6 +
7 +
static inline int deflate_prime_32(PREFIX3(stream) *stream, uint32_t value) {
8 +
    int err;
9 +
10 +
#ifdef ZLIBNG_ENABLE_TESTS
11 +
    err = PREFIX(deflatePrime)(stream, 32, value);
12 +
#else
13 +
    /* zlib's deflatePrime() takes at most 16 bits */
14 +
    err = PREFIX(deflatePrime)(stream, 16, value & 0xffff);
15 +
    if (err != Z_OK) return err;
16 +
    err = PREFIX(deflatePrime)(stream, 16, value >> 16);
17 +
#endif
18 +
19 +
    return err;
20 +
}
Files Coverage
arch 87.55%
test 70.89%
tools 99.63%
adler32.c 94.55%
adler32_fold.c 45.45%
adler32_p.h 96.43%
chunkset.c 100.00%
chunkset_tpl.h 99.03%
compare256.c 100.00%
compress.c 97.83%
cpu_features.c 100.00%
crc32_braid.c 100.00%
crc32_braid_comb.c 81.82%
crc32_braid_comb_p.h 100.00%
crc32_fold.c 70.00%
deflate.c 83.21%
deflate.h 100.00%
deflate_fast.c 91.49%
deflate_huff.c 86.96%
deflate_medium.c 91.76%
deflate_p.h 56.82%
deflate_quick.c 96.43%
deflate_rle.c 100.00%
deflate_slow.c 100.00%
deflate_stored.c 100.00%
fallback_builtins.h 92.59%
functable.c 77.88%
gzlib.c 70.61%
gzwrite.c 71.13%
infback.c 99.04%
inffast.c 90.29%
inflate.c 93.81%
inflate_p.h 100.00%
inftrees.c 99.31%
insert_string_tpl.h 100.00%
match_tpl.h 99.32%
slide_hash.c 95.00%
trees.c 92.27%
trees_emit.h 94.95%
uncompr.c 91.30%
zutil.c 85.00%
zutil_p.h 100.00%
Project Totals (127 files) 83.85%
Ubuntu GCC No SSE4 UBSAN
Build #3151740506 -
ubuntu_gcc_no_sse4
Ubuntu GCC -O1 No Unaligned UBSAN
Build #3151740506 -
ubuntu_gcc_o1
Ubuntu GCC ARM HF ASAN
Build #3151740506 -
ubuntu_gcc_armhf
Ubuntu GCC No PCLMULQDQ UBSAN
Build #3151740506 -
ubuntu_gcc_no_pclmulqdq
Ubuntu GCC -O3 OSB
Build #3151740506 -
ubuntu_gcc_osb
Ubuntu GCC No SSE2 UBSAN
Build #3151740506 -
ubuntu_gcc_no_sse2
Ubuntu GCC AARCH64 No ACLE UBSAN
Build #3151740506 -
ubuntu_gcc_aarch64_no_acle
Ubuntu GCC No AVX2 UBSAN
Build #3151740506 -
ubuntu_gcc_no_avx2
macOS Clang ASAN
Build #3151740506 -
macos_clang
Ubuntu GCC ARM HF Compat No Opt UBSAN
Build #3151740506 -
ubuntu_gcc_armhf_compat_no_opt
Windows GCC
Build #3151740506 -
win64_gcc
Ubuntu GCC AARCH64 ASAN
Build #3151740506 -
ubuntu_gcc_aarch64
Ubuntu GCC ARM SF ASAN
Build #3151740506 -
ubuntu_gcc_armsf
Ubuntu MinGW x86_64
Build #3151740506 -
ubuntu_gcc_mingw_x86_64
Ubuntu GCC S390X ASAN
Build #3151740506 -
ubuntu_gcc_s390x
Ubuntu GCC SPARC64
Build #3151740506 -
ubuntu_gcc_sparc64
Windows GCC Compat No Opt
Build #3151740506 -
win64_gcc_compat_no_opt
Ubuntu MinGW i686
Build #3151740506 -
ubuntu_gcc_mingw_i686
Ubuntu GCC S390X No vectorized CRC32 ASAN
Build #3151740506 -
ubuntu_gcc_s390x_no_crc32
Ubuntu GCC Symbol Prefix
Build #3151740507 -
ubuntu_gcc_pigz
Ubuntu Clang No Threads
Build #3151740507 -
ubuntu_clang_pigz_no_threads
Ubuntu GCC
Build #3151740507 -
ubuntu_gcc_pigz
Ubuntu Clang
Build #3151740507 -
ubuntu_clang_pigz
Ubuntu GCC AARCH64
Build #3151740507 -
ubuntu_gcc_pigz_aarch64
Ubuntu Clang No Optim
Build #3151740507 -
ubuntu_clang_pigz_no_optim
Ubuntu Clang Reduced Memory
Build #3151740506 -
ubuntu_clang_reduced_mem
Ubuntu Clang Inflate Strict
Build #3151740506 -
ubuntu_clang_inflate_strict
Ubuntu Clang Inflate Allow Invalid Dist
Build #3151740506 -
ubuntu_clang_inflate_allow_invalid_dist
Ubuntu Clang Memory Map
Build #3151740506 -
ubuntu_clang_mmap
Ubuntu GCC S390X DFLTCC ASAN
Build #3151740506 -
ubuntu_gcc_s390x_dfltcc
Ubuntu Clang Debug
Build #3151740506 -
ubuntu_clang_debug
Ubuntu GCC Compat Symbol Prefix
Build #3151740506 -
ubuntu_gcc_compat_sprefix
Ubuntu GCC 32-bit
Build #3151740506 -
ubuntu_gcc_m32
Ubuntu Clang
Build #3151740506 -
ubuntu_clang
Ubuntu GCC ARM HF No ACLE ASAN
Build #3151740506 -
ubuntu_gcc_armhf_no_acle
Ubuntu GCC AARCH64 Compat No Opt UBSAN
Build #3151740506 -
ubuntu_gcc_aarch64_compat_no_opt
Ubuntu GCC No CTZLL
Build #3151740506 -
ubuntu_gcc_no_ctzll
Ubuntu GCC No CTZ
Build #3151740506 -
ubuntu_gcc_no_ctz
Ubuntu GCC ASAN
Build #3151740506 -
ubuntu_gcc
Ubuntu GCC Compat No Opt ASAN
Build #3151740506 -
ubuntu_gcc_compat_no_opt
macOS GCC UBSAN
Build #3151740506 -
macos_gcc
Ubuntu GCC Benchmark
Build #3151740506 -
ubuntu_gcc_benchmark
Ubuntu GCC PPC No Power8
Build #3151740506 -
ubuntu_gcc_ppc_no_power8
Ubuntu GCC S390X DFLTCC Compat UBSAN
Build #3151740506 -
ubuntu_gcc_s390x_dfltcc_compat
Ubuntu GCC ARM HF No NEON ASAN
Build #3151740506 -
ubuntu_gcc_armhf_no_neon
Ubuntu GCC AARCH64 No NEON UBSAN
Build #3151740506 -
ubuntu_gcc_aarch64_no_neon
Ubuntu GCC PPC64LE
Build #3151740506 -
ubuntu_gcc_ppc64le
Ubuntu GCC Symbol Prefix
Build #3151740506 -
ubuntu_gcc_sprefix
Ubuntu GCC PPC
Build #3151740506 -
ubuntu_gcc_ppc
Ubuntu GCC PPC64
Build #3151740506 -
ubuntu_gcc_ppc64
Ubuntu GCC ARM SF Compat No Opt UBSAN
Build #3151740506 -
ubuntu_gcc_armsf_compat_no_opt

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading