|
|
21b10c |
From 27a84de4a30cd35f8565937397f6d1205b912818 Mon Sep 17 00:00:00 2001
|
|
|
21b10c |
From: Ondrej Dubaj <odubaj@redhat.com>
|
|
|
21b10c |
Date: Thu, 5 Sep 2019 09:16:35 +0200
|
|
|
21b10c |
Subject: [PATCH 1/2] fix: power8 crc32 - return 0 with 0 ptr passed
|
|
|
21b10c |
|
|
|
21b10c |
|
|
|
21b10c |
contrib/power8-crc/vec_crc32.c | 1 +
|
|
|
21b10c |
1 file changed, 1 insertion(+)
|
|
|
21b10c |
|
|
|
21b10c |
diff
|
|
|
21b10c |
index bb2204b..5ce9cd2 100644
|
|
|
21b10c |
|
|
|
21b10c |
|
|
|
21b10c |
@@ -74,6 +74,7 @@ unsigned int CRC32_FUNCTION(unsigned int crc, const unsigned char *p,
|
|
|
21b10c |
unsigned int prealign;
|
|
|
21b10c |
unsigned int tail;
|
|
|
21b10c |
|
|
|
21b10c |
+ if (p == (const unsigned char *) 0x0) return 0;
|
|
|
21b10c |
#ifdef CRC_XOR
|
|
|
21b10c |
crc ^= 0xffffffff;
|
|
|
21b10c |
#endif
|
|
|
21b10c |
--
|
|
|
21b10c |
2.19.1
|
|
|
21b10c |
|
|
|
21b10c |
|
|
|
21b10c |
From c066ac92982a2ffe5b1e9bd36000058927437bd5 Mon Sep 17 00:00:00 2001
|
|
|
21b10c |
From: Ondrej Dubaj <odubaj@redhat.com>
|
|
|
21b10c |
Date: Thu, 5 Sep 2019 09:36:47 +0200
|
|
|
21b10c |
Subject: [PATCH 2/2] Add CRC32 tests (crc32_test)
|
|
|
21b10c |
|
|
|
21b10c |
This commit includes a CRC32 test (crc32_test). This tests are important
|
|
|
21b10c |
since some architectures may want include CPU dependent optimizations for
|
|
|
21b10c |
CRC32 algorithm like using vector instructions and we may want to
|
|
|
21b10c |
validate those.
|
|
|
21b10c |
|
|
|
21b10c |
Makefile.in | 35 +++++
|
|
|
21b10c |
test/crc32_test.c | 205 ++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
21b10c |
2 files changed, 230 insertions(+), 10 deletions(-)
|
|
|
21b10c |
create mode 100644 test/crc32_test.c
|
|
|
21b10c |
|
|
|
21b10c |
diff --git a/Makefile.in b/Makefile.in
|
|
|
21b10c |
index 40b5cfb..6070dcc 100644
|
|
|
21b10c |
|
|
|
21b10c |
+++ b/Makefile.in
|
|
|
21b10c |
@@ -75,11 +75,11 @@ PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA)
|
|
|
21b10c |
|
|
|
21b10c |
all: static shared
|
|
|
21b10c |
|
|
|
21b10c |
-static: example$(EXE) minigzip$(EXE)
|
|
|
21b10c |
+static: crc32_test$(EXE) example$(EXE) minigzip$(EXE)
|
|
|
21b10c |
|
|
|
21b10c |
-shared: examplesh$(EXE) minigzipsh$(EXE)
|
|
|
21b10c |
+shared: crc32_testsh$(EXE) examplesh$(EXE) minigzipsh$(EXE)
|
|
|
21b10c |
|
|
|
21b10c |
-all64: example64$(EXE) minigzip64$(EXE)
|
|
|
21b10c |
+all64: crc32_test64$(EXE) example64$(EXE) minigzip64$(EXE)
|
|
|
21b10c |
|
|
|
21b10c |
check: test
|
|
|
21b10c |
|
|
|
21b10c |
@@ -87,7 +87,7 @@ test: all teststatic testshared
|
|
|
21b10c |
|
|
|
21b10c |
teststatic: static
|
|
|
21b10c |
@TMPST=tmpst_$$; \
|
|
|
21b10c |
- if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
|
|
|
21b10c |
+ if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST && ./crc32_test; then \
|
|
|
21b10c |
echo ' *** zlib test OK ***'; \
|
|
|
21b10c |
else \
|
|
|
21b10c |
echo ' *** zlib test FAILED ***'; false; \
|
|
|
21b10c |
@@ -100,7 +100,7 @@ testshared: shared
|
|
|
21b10c |
DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
|
|
|
21b10c |
SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
|
|
|
21b10c |
TMPSH=tmpsh_$$; \
|
|
|
21b10c |
- if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \
|
|
|
21b10c |
+ if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH && ./crc32_testsh; then \
|
|
|
21b10c |
echo ' *** zlib shared test OK ***'; \
|
|
|
21b10c |
else \
|
|
|
21b10c |
echo ' *** zlib shared test FAILED ***'; false; \
|
|
|
21b10c |
@@ -109,7 +109,7 @@ testshared: shared
|
|
|
21b10c |
|
|
|
21b10c |
test64: all64
|
|
|
21b10c |
@TMP64=tmp64_$$; \
|
|
|
21b10c |
- if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
|
|
|
21b10c |
+ if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64 && ./crc32_test64; then \
|
|
|
21b10c |
echo ' *** zlib 64-bit test OK ***'; \
|
|
|
21b10c |
else \
|
|
|
21b10c |
echo ' *** zlib 64-bit test FAILED ***'; false; \
|
|
|
21b10c |
@@ -157,6 +157,12 @@ example.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
minigzip.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/minigzip.c
|
|
|
21b10c |
|
|
|
21b10c |
+crc32_test.o: $(SRCDIR)test/crc32_test.c $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
+ $(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/crc32_test.c
|
|
|
21b10c |
+
|
|
|
21b10c |
+crc32_test64.o: $(SRCDIR)test/crc32_test.c $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
+ $(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/crc32_test.c
|
|
|
21b10c |
+
|
|
|
21b10c |
example64.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
$(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/example.c
|
|
|
21b10c |
|
|
|
21b10c |
@@ -307,12 +313,21 @@ example$(EXE): example.o $(STATICLIB)
|
|
|
21b10c |
minigzip$(EXE): minigzip.o $(STATICLIB)
|
|
|
21b10c |
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
|
|
|
21b10c |
|
|
|
21b10c |
+crc32_test$(EXE): crc32_test.o $(STATICLIB)
|
|
|
21b10c |
+ $(CC) $(CFLAGS) -o $@ crc32_test.o $(TEST_LDFLAGS)
|
|
|
21b10c |
+
|
|
|
21b10c |
+crc32_testsh$(EXE): crc32_test.o $(SHAREDLIBV)
|
|
|
21b10c |
+ $(CC) $(CFLAGS) -o $@ crc32_test.o -L. $(SHAREDLIBV)
|
|
|
21b10c |
+
|
|
|
21b10c |
examplesh$(EXE): example.o $(SHAREDLIBV)
|
|
|
21b10c |
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
|
|
|
21b10c |
|
|
|
21b10c |
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
|
|
|
21b10c |
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
|
|
|
21b10c |
|
|
|
21b10c |
+crc32_test64$(EXE): crc32_test64.o $(STATICLIB)
|
|
|
21b10c |
+ $(CC) $(CFLAGS) -o $@ crc32_test64.o $(TEST_LDFLAGS)
|
|
|
21b10c |
+
|
|
|
21b10c |
example64$(EXE): example64.o $(STATICLIB)
|
|
|
21b10c |
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
|
|
|
21b10c |
|
|
|
21b10c |
@@ -382,8 +397,8 @@ zconf: $(SRCDIR)zconf.h.in
|
|
|
21b10c |
mostlyclean: clean
|
|
|
21b10c |
clean:
|
|
|
21b10c |
rm -f *.o *.lo *~ \
|
|
|
21b10c |
- example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
|
|
|
21b10c |
- example64$(EXE) minigzip64$(EXE) \
|
|
|
21b10c |
+ crc32_test$(EXE) example$(EXE) minigzip$(EXE) crc32_testsh$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
|
|
|
21b10c |
+ crc32_test64$(EXE) example64$(EXE) minigzip64$(EXE) \
|
|
|
21b10c |
infcover \
|
|
|
21b10c |
libz.* foo.gz so_locations \
|
|
|
21b10c |
_match.s maketree contrib/infback9/*.o
|
|
|
21b10c |
@@ -407,7 +422,7 @@ tags:
|
|
|
21b10c |
|
|
|
21b10c |
adler32.o zutil.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
gzclose.o gzlib.o gzread.o gzwrite.o: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
|
|
|
21b10c |
-compress.o example.o minigzip.o uncompr.o: $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
+compress.o crc32_test.o example.o minigzip.o uncompr.o: $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
crc32.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h
|
|
|
21b10c |
deflate.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
infback.o inflate.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h
|
|
|
21b10c |
@@ -417,7 +432,7 @@ trees.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)tr
|
|
|
21b10c |
|
|
|
21b10c |
adler32.lo zutil.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
gzclose.lo gzlib.lo gzread.lo gzwrite.lo: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
|
|
|
21b10c |
-compress.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
+compress.lo crc32_test.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
crc32.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h
|
|
|
21b10c |
deflate.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
|
|
|
21b10c |
infback.lo inflate.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h
|
|
|
21b10c |
diff --git a/test/crc32_test.c b/test/crc32_test.c
|
|
|
21b10c |
new file mode 100644
|
|
|
21b10c |
index 0000000..5d73128
|
|
|
21b10c |
--- /dev/null
|
|
|
21b10c |
+++ b/test/crc32_test.c
|
|
|
21b10c |
@@ -0,0 +1,205 @@
|
|
|
21b10c |
+/* crc32_tes.c -- unit test for crc32 in the zlib compression library
|
|
|
21b10c |
+ * Copyright (C) 1995-2006, 2010, 2011, 2016, 2019 Rogerio Alves
|
|
|
21b10c |
+ * For conditions of distribution and use, see copyright notice in zlib.h
|
|
|
21b10c |
+ */
|
|
|
21b10c |
+
|
|
|
21b10c |
+#include "zlib.h"
|
|
|
21b10c |
+#include <stdio.h>
|
|
|
21b10c |
+
|
|
|
21b10c |
+#ifdef STDC
|
|
|
21b10c |
+# include <string.h>
|
|
|
21b10c |
+# include <stdlib.h>
|
|
|
21b10c |
+#endif
|
|
|
21b10c |
+
|
|
|
21b10c |
+void test_crc32 OF((uLong crc, Byte* buf, z_size_t len, uLong chk, int line));
|
|
|
21b10c |
+int main OF((void));
|
|
|
21b10c |
+
|
|
|
21b10c |
+typedef struct {
|
|
|
21b10c |
+ int line;
|
|
|
21b10c |
+ uLong crc;
|
|
|
21b10c |
+ Byte* buf;
|
|
|
21b10c |
+ int len;
|
|
|
21b10c |
+ uLong expect;
|
|
|
21b10c |
+} crc32_test;
|
|
|
21b10c |
+
|
|
|
21b10c |
+void test_crc32(crc, buf, len, chk, line)
|
|
|
21b10c |
+ uLong crc;
|
|
|
21b10c |
+ Byte *buf;
|
|
|
21b10c |
+ z_size_t len;
|
|
|
21b10c |
+ uLong chk;
|
|
|
21b10c |
+ int line;
|
|
|
21b10c |
+{
|
|
|
21b10c |
+ uLong res = crc32(crc, buf, len);
|
|
|
21b10c |
+ if (res != chk) {
|
|
|
21b10c |
+ fprintf(stderr, "FAIL [%d]: crc32 returned 0x%08X expected 0x%08X\n",
|
|
|
21b10c |
+ line, (unsigned int)res, (unsigned int)chk);
|
|
|
21b10c |
+ exit(1);
|
|
|
21b10c |
+ }
|
|
|
21b10c |
+}
|
|
|
21b10c |
+
|
|
|
21b10c |
+static const crc32_test tests[] = {
|
|
|
21b10c |
+ {__LINE__, 0x0, 0x0, 0, 0x0},
|
|
|
21b10c |
+ {__LINE__, 0xffffffff, 0x0, 0, 0x0},
|
|
|
21b10c |
+ {__LINE__, 0x0, 0x0, 255, 0x0}, /* BZ 174799. */
|
|
|
21b10c |
+ {__LINE__, 0x0, 0x0, 256, 0x0},
|
|
|
21b10c |
+ {__LINE__, 0x0, 0x0, 257, 0x0},
|
|
|
21b10c |
+ {__LINE__, 0x0, 0x0, 32767, 0x0},
|
|
|
21b10c |
+ {__LINE__, 0x0, 0x0, 32768, 0x0},
|
|
|
21b10c |
+ {__LINE__, 0x0, 0x0, 32769, 0x0},
|
|
|
21b10c |
+ {__LINE__, 0x0, "", 0, 0x0},
|
|
|
21b10c |
+ {__LINE__, 0xffffffff, "", 0, 0xffffffff},
|
|
|
21b10c |
+ {__LINE__, 0x0, "abacus", 6, 0xc3d7115b},
|
|
|
21b10c |
+ {__LINE__, 0x0, "backlog", 7, 0x269205},
|
|
|
21b10c |
+ {__LINE__, 0x0, "campfire", 8, 0x22a515f8},
|
|
|
21b10c |
+ {__LINE__, 0x0, "delta", 5, 0x9643fed9},
|
|
|
21b10c |
+ {__LINE__, 0x0, "executable", 10, 0xd68eda01},
|
|
|
21b10c |
+ {__LINE__, 0x0, "file", 4, 0x8c9f3610},
|
|
|
21b10c |
+ {__LINE__, 0x0, "greatest", 8, 0xc1abd6cd},
|
|
|
21b10c |
+ {__LINE__, 0x0, "hello", 5, 0x3610a686},
|
|
|
21b10c |
+ {__LINE__, 0x0, "inverter", 8, 0xc9e962c9},
|
|
|
21b10c |
+ {__LINE__, 0x0, "jigsaw", 6, 0xce4e3f69},
|
|
|
21b10c |
+ {__LINE__, 0x0, "karate", 6, 0x890be0e2},
|
|
|
21b10c |
+ {__LINE__, 0x0, "landscape", 9, 0xc4e0330b},
|
|
|
21b10c |
+ {__LINE__, 0x0, "machine", 7, 0x1505df84},
|
|
|
21b10c |
+ {__LINE__, 0x0, "nanometer", 9, 0xd4e19f39},
|
|
|
21b10c |
+ {__LINE__, 0x0, "oblivion", 8, 0xdae9de77},
|
|
|
21b10c |
+ {__LINE__, 0x0, "panama", 6, 0x66b8979c},
|
|
|
21b10c |
+ {__LINE__, 0x0, "quest", 5, 0x4317f817},
|
|
|
21b10c |
+ {__LINE__, 0x0, "resource", 8, 0xbc91f416},
|
|
|
21b10c |
+ {__LINE__, 0x0, "secret", 6, 0x5ca2e8e5},
|
|
|
21b10c |
+ {__LINE__, 0x0, "test", 4, 0xd87f7e0c},
|
|
|
21b10c |
+ {__LINE__, 0x0, "ultimate", 8, 0x3fc79b0b},
|
|
|
21b10c |
+ {__LINE__, 0x0, "vector", 6, 0x1b6e485b},
|
|
|
21b10c |
+ {__LINE__, 0x0, "walrus", 6, 0xbe769b97},
|
|
|
21b10c |
+ {__LINE__, 0x0, "xeno", 4, 0xe7a06444},
|
|
|
21b10c |
+ {__LINE__, 0x0, "yelling", 7, 0xfe3944e5},
|
|
|
21b10c |
+ {__LINE__, 0x0, "zlib", 4, 0x73887d3a},
|
|
|
21b10c |
+ {__LINE__, 0x0, "4BJD7PocN1VqX0jXVpWB", 20, 0xd487a5a1},
|
|
|
21b10c |
+ {__LINE__, 0x0, "F1rPWI7XvDs6nAIRx41l", 20, 0x61a0132e},
|
|
|
21b10c |
+ {__LINE__, 0x0, "ldhKlsVkPFOveXgkGtC2", 20, 0xdf02f76},
|
|
|
21b10c |
+ {__LINE__, 0x0, "5KKnGOOrs8BvJ35iKTOS", 20, 0x579b2b0a},
|
|
|
21b10c |
+ {__LINE__, 0x0, "0l1tw7GOcem06Ddu7yn4", 20, 0xf7d16e2d},
|
|
|
21b10c |
+ {__LINE__, 0x0, "MCr47CjPIn9R1IvE1Tm5", 20, 0x731788f5},
|
|
|
21b10c |
+ {__LINE__, 0x0, "UcixbzPKTIv0SvILHVdO", 20, 0x7112bb11},
|
|
|
21b10c |
+ {__LINE__, 0x0, "dGnAyAhRQDsWw0ESou24", 20, 0xf32a0dac},
|
|
|
21b10c |
+ {__LINE__, 0x0, "di0nvmY9UYMYDh0r45XT", 20, 0x625437bb},
|
|
|
21b10c |
+ {__LINE__, 0x0, "2XKDwHfAhFsV0RhbqtvH", 20, 0x896930f9},
|
|
|
21b10c |
+ {__LINE__, 0x0, "ZhrANFIiIvRnqClIVyeD", 20, 0x8579a37},
|
|
|
21b10c |
+ {__LINE__, 0x0, "v7Q9ehzioTOVeDIZioT1", 20, 0x632aa8e0},
|
|
|
21b10c |
+ {__LINE__, 0x0, "Yod5hEeKcYqyhfXbhxj2", 20, 0xc829af29},
|
|
|
21b10c |
+ {__LINE__, 0x0, "GehSWY2ay4uUKhehXYb0", 20, 0x1b08b7e8},
|
|
|
21b10c |
+ {__LINE__, 0x0, "kwytJmq6UqpflV8Y8GoE", 20, 0x4e33b192},
|
|
|
21b10c |
+ {__LINE__, 0x0, "70684206568419061514", 20, 0x59a179f0},
|
|
|
21b10c |
+ {__LINE__, 0x0, "42015093765128581010", 20, 0xcd1013d7},
|
|
|
21b10c |
+ {__LINE__, 0x0, "88214814356148806939", 20, 0xab927546},
|
|
|
21b10c |
+ {__LINE__, 0x0, "43472694284527343838", 20, 0x11f3b20c},
|
|
|
21b10c |
+ {__LINE__, 0x0, "49769333513942933689", 20, 0xd562d4ca},
|
|
|
21b10c |
+ {__LINE__, 0x0, "54979784887993251199", 20, 0x233395f7},
|
|
|
21b10c |
+ {__LINE__, 0x0, "58360544869206793220", 20, 0x2d167fd5},
|
|
|
21b10c |
+ {__LINE__, 0x0, "27347953487840714234", 20, 0x8b5108ba},
|
|
|
21b10c |
+ {__LINE__, 0x0, "07650690295365319082", 20, 0xc46b3cd8},
|
|
|
21b10c |
+ {__LINE__, 0x0, "42655507906821911703", 20, 0xc10b2662},
|
|
|
21b10c |
+ {__LINE__, 0x0, "29977409200786225655", 20, 0xc9a0f9d2},
|
|
|
21b10c |
+ {__LINE__, 0x0, "85181542907229116674", 20, 0x9341357b},
|
|
|
21b10c |
+ {__LINE__, 0x0, "87963594337989416799", 20, 0xf0424937},
|
|
|
21b10c |
+ {__LINE__, 0x0, "21395988329504168551", 20, 0xd7c4c31f},
|
|
|
21b10c |
+ {__LINE__, 0x0, "51991013580943379423", 20, 0xf11edcc4},
|
|
|
21b10c |
+ {__LINE__, 0x0, "*]+@!);({_$;}[_},?{?;(_?,=-][@", 30, 0x40795df4},
|
|
|
21b10c |
+ {__LINE__, 0x0, "_@:_).&(#.[:[{[:)$++-($_;@[)}+", 30, 0xdd61a631},
|
|
|
21b10c |
+ {__LINE__, 0x0, "&[!,[$_==}+.]@!;*(+},[;:)$;)-@", 30, 0xca907a99},
|
|
|
21b10c |
+ {__LINE__, 0x0, "]{.[.+?+[[=;[?}_#&;[=)__$$:+=_", 30, 0xf652deac},
|
|
|
21b10c |
+ {__LINE__, 0x0, "-%.)=/[@].:.(:,()$;=%@-$?]{%+%", 30, 0xaf39a5a9},
|
|
|
21b10c |
+ {__LINE__, 0x0, "+]#$(@&.=:,*];/.!]%/{:){:@(;)$", 30, 0x6bebb4cf},
|
|
|
21b10c |
+ {__LINE__, 0x0, ")-._.:?[&:.=+}(*$/=!.${;(=$@!}", 30, 0x76430bac},
|
|
|
21b10c |
+ {__LINE__, 0x0, ":(_*&%/[[}+,?#$&*+#[([*-/#;%(]", 30, 0x6c80c388},
|
|
|
21b10c |
+ {__LINE__, 0x0, "{[#-;:$/{)(+[}#]/{&!%(@)%:@-$:", 30, 0xd54d977d},
|
|
|
21b10c |
+ {__LINE__, 0x0, "_{$*,}(&,@.)):=!/%(&(,,-?$}}}!", 30, 0xe3966ad5},
|
|
|
21b10c |
+ {__LINE__, 0x0, "e$98KNzqaV)Y:2X?]77].{gKRD4G5{mHZk,Z)SpU%L3FSgv!Wb8MLAFdi{+fp)c,@8m6v)yXg@]HBDFk?.4&}g5_udE*JHCiH=aL", 100, 0xe7c71db9},
|
|
|
21b10c |
+ {__LINE__, 0x0, "r*Fd}ef+5RJQ;+W=4jTR9)R*p!B;]Ed7tkrLi;88U7g@3v!5pk2X6D)vt,.@N8c]@yyEcKi[vwUu@.Ppm@C6%Mv*3Nw}Y,58_aH)", 100, 0xeaa52777},
|
|
|
21b10c |
+ {__LINE__, 0x0, "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&", 100, 0xcd472048},
|
|
|
21b10c |
+ {__LINE__, 0x7a30360d, "abacus", 6, 0xf8655a84},
|
|
|
21b10c |
+ {__LINE__, 0x6fd767ee, "backlog", 7, 0x1ed834b1},
|
|
|
21b10c |
+ {__LINE__, 0xefeb7589, "campfire", 8, 0x686cfca},
|
|
|
21b10c |
+ {__LINE__, 0x61cf7e6b, "delta", 5, 0x1554e4b1},
|
|
|
21b10c |
+ {__LINE__, 0xdc712e2, "executable", 10, 0x761b4254},
|
|
|
21b10c |
+ {__LINE__, 0xad23c7fd, "file", 4, 0x7abdd09b},
|
|
|
21b10c |
+ {__LINE__, 0x85cb2317, "greatest", 8, 0x4ba91c6b},
|
|
|
21b10c |
+ {__LINE__, 0x9eed31b0, "inverter", 8, 0xd5e78ba5},
|
|
|
21b10c |
+ {__LINE__, 0xb94f34ca, "jigsaw", 6, 0x23649109},
|
|
|
21b10c |
+ {__LINE__, 0xab058a2, "karate", 6, 0xc5591f41},
|
|
|
21b10c |
+ {__LINE__, 0x5bff2b7a, "landscape", 9, 0xf10eb644},
|
|
|
21b10c |
+ {__LINE__, 0x605c9a5f, "machine", 7, 0xbaa0a636},
|
|
|
21b10c |
+ {__LINE__, 0x51bdeea5, "nanometer", 9, 0x6af89afb},
|
|
|
21b10c |
+ {__LINE__, 0x85c21c79, "oblivion", 8, 0xecae222b},
|
|
|
21b10c |
+ {__LINE__, 0x97216f56, "panama", 6, 0x47dffac4},
|
|
|
21b10c |
+ {__LINE__, 0x18444af2, "quest", 5, 0x70c2fe36},
|
|
|
21b10c |
+ {__LINE__, 0xbe6ce359, "resource", 8, 0x1471d925},
|
|
|
21b10c |
+ {__LINE__, 0x843071f1, "secret", 6, 0x50c9a0db},
|
|
|
21b10c |
+ {__LINE__, 0xf2480c60, "ultimate", 8, 0xf973daf8},
|
|
|
21b10c |
+ {__LINE__, 0x2d2feb3d, "vector", 6, 0x344ac03d},
|
|
|
21b10c |
+ {__LINE__, 0x7490310a, "walrus", 6, 0x6d1408ef},
|
|
|
21b10c |
+ {__LINE__, 0x97d247d4, "xeno", 4, 0xe62670b5},
|
|
|
21b10c |
+ {__LINE__, 0x93cf7599, "yelling", 7, 0x1b36da38},
|
|
|
21b10c |
+ {__LINE__, 0x73c84278, "zlib", 4, 0x6432d127},
|
|
|
21b10c |
+ {__LINE__, 0x228a87d1, "4BJD7PocN1VqX0jXVpWB", 20, 0x997107d0},
|
|
|
21b10c |
+ {__LINE__, 0xa7a048d0, "F1rPWI7XvDs6nAIRx41l", 20, 0xdc567274},
|
|
|
21b10c |
+ {__LINE__, 0x1f0ded40, "ldhKlsVkPFOveXgkGtC2", 20, 0xdcc63870},
|
|
|
21b10c |
+ {__LINE__, 0xa804a62f, "5KKnGOOrs8BvJ35iKTOS", 20, 0x6926cffd},
|
|
|
21b10c |
+ {__LINE__, 0x508fae6a, "0l1tw7GOcem06Ddu7yn4", 20, 0xb52b38bc},
|
|
|
21b10c |
+ {__LINE__, 0xe5adaf4f, "MCr47CjPIn9R1IvE1Tm5", 20, 0xf83b8178},
|
|
|
21b10c |
+ {__LINE__, 0x67136a40, "UcixbzPKTIv0SvILHVdO", 20, 0xc5213070},
|
|
|
21b10c |
+ {__LINE__, 0xb00c4a10, "dGnAyAhRQDsWw0ESou24", 20, 0xbc7648b0},
|
|
|
21b10c |
+ {__LINE__, 0x2e0c84b5, "di0nvmY9UYMYDh0r45XT", 20, 0xd8123a72},
|
|
|
21b10c |
+ {__LINE__, 0x81238d44, "2XKDwHfAhFsV0RhbqtvH", 20, 0xd5ac5620},
|
|
|
21b10c |
+ {__LINE__, 0xf853aa92, "ZhrANFIiIvRnqClIVyeD", 20, 0xceae099d},
|
|
|
21b10c |
+ {__LINE__, 0x5a692325, "v7Q9ehzioTOVeDIZioT1", 20, 0xb07d2b24},
|
|
|
21b10c |
+ {__LINE__, 0x3275b9f, "Yod5hEeKcYqyhfXbhxj2", 20, 0x24ce91df},
|
|
|
21b10c |
+ {__LINE__, 0x38371feb, "GehSWY2ay4uUKhehXYb0", 20, 0x707b3b30},
|
|
|
21b10c |
+ {__LINE__, 0xafc8bf62, "kwytJmq6UqpflV8Y8GoE", 20, 0x16abc6a9},
|
|
|
21b10c |
+ {__LINE__, 0x9b07db73, "70684206568419061514", 20, 0xae1fb7b7},
|
|
|
21b10c |
+ {__LINE__, 0xe75b214, "42015093765128581010", 20, 0xd4eecd2d},
|
|
|
21b10c |
+ {__LINE__, 0x72d0fe6f, "88214814356148806939", 20, 0x4660ec7},
|
|
|
21b10c |
+ {__LINE__, 0xf857a4b1, "43472694284527343838", 20, 0xfd8afdf7},
|
|
|
21b10c |
+ {__LINE__, 0x54b8e14, "49769333513942933689", 20, 0xc6d1b5f2},
|
|
|
21b10c |
+ {__LINE__, 0xd6aa5616, "54979784887993251199", 20, 0x32476461},
|
|
|
21b10c |
+ {__LINE__, 0x11e63098, "58360544869206793220", 20, 0xd917cf1a},
|
|
|
21b10c |
+ {__LINE__, 0xbe92385, "27347953487840714234", 20, 0x4ad14a12},
|
|
|
21b10c |
+ {__LINE__, 0x49511de0, "07650690295365319082", 20, 0xe37b5c6c},
|
|
|
21b10c |
+ {__LINE__, 0x3db13bc1, "42655507906821911703", 20, 0x7cc497f1},
|
|
|
21b10c |
+ {__LINE__, 0xbb899bea, "29977409200786225655", 20, 0x99781bb2},
|
|
|
21b10c |
+ {__LINE__, 0xf6cd9436, "85181542907229116674", 20, 0x132256a1},
|
|
|
21b10c |
+ {__LINE__, 0x9109e6c3, "87963594337989416799", 20, 0xbfdb2c83},
|
|
|
21b10c |
+ {__LINE__, 0x75770fc, "21395988329504168551", 20, 0x8d9d1e81},
|
|
|
21b10c |
+ {__LINE__, 0x69b1d19b, "51991013580943379423", 20, 0x7b6d4404},
|
|
|
21b10c |
+ {__LINE__, 0xc6132975, "*]+@!);({_$;}[_},?{?;(_?,=-][@", 30, 0x8619f010},
|
|
|
21b10c |
+ {__LINE__, 0xd58cb00c, "_@:_).&(#.[:[{[:)$++-($_;@[)}+", 30, 0x15746ac3},
|
|
|
21b10c |
+ {__LINE__, 0xb63b8caa, "&[!,[$_==}+.]@!;*(+},[;:)$;)-@", 30, 0xaccf812f},
|
|
|
21b10c |
+ {__LINE__, 0x8a45a2b8, "]{.[.+?+[[=;[?}_#&;[=)__$$:+=_", 30, 0x78af45de},
|
|
|
21b10c |
+ {__LINE__, 0xcbe95b78, "-%.)=/[@].:.(:,()$;=%@-$?]{%+%", 30, 0x25b06b59},
|
|
|
21b10c |
+ {__LINE__, 0x4ef8a54b, "+]#$(@&.=:,*];/.!]%/{:){:@(;)$", 30, 0x4ba0d08f},
|
|
|
21b10c |
+ {__LINE__, 0x76ad267a, ")-._.:?[&:.=+}(*$/=!.${;(=$@!}", 30, 0xe26b6aac},
|
|
|
21b10c |
+ {__LINE__, 0x569e613c, ":(_*&%/[[}+,?#$&*+#[([*-/#;%(]", 30, 0x7e2b0a66},
|
|
|
21b10c |
+ {__LINE__, 0x36aa61da, "{[#-;:$/{)(+[}#]/{&!%(@)%:@-$:", 30, 0xb3430dc7},
|
|
|
21b10c |
+ {__LINE__, 0xf67222df, "_{$*,}(&,@.)):=!/%(&(,,-?$}}}!", 30, 0x626c17a},
|
|
|
21b10c |
+ {__LINE__, 0x74b34fd3, "e$98KNzqaV)Y:2X?]77].{gKRD4G5{mHZk,Z)SpU%L3FSgv!Wb8MLAFdi{+fp)c,@8m6v)yXg@]HBDFk?.4&}g5_udE*JHCiH=aL", 100, 0xccf98060},
|
|
|
21b10c |
+ {__LINE__, 0x351fd770, "r*Fd}ef+5RJQ;+W=4jTR9)R*p!B;]Ed7tkrLi;88U7g@3v!5pk2X6D)vt,.@N8c]@yyEcKi[vwUu@.Ppm@C6%Mv*3Nw}Y,58_aH)", 100, 0xd8b95312},
|
|
|
21b10c |
+ {__LINE__, 0xc45aef77, "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&", 100, 0xbb1c9912},
|
|
|
21b10c |
+ {__LINE__, 0xc45aef77, "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&"
|
|
|
21b10c |
+ "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&"
|
|
|
21b10c |
+ "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&"
|
|
|
21b10c |
+ "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&"
|
|
|
21b10c |
+ "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&"
|
|
|
21b10c |
+ "h{bcmdC+a;t+Cf{6Y_dFq-{X4Yu&7uNfVDh?q&_u.UWJU],-GiH7ADzb7-V.Q%4=+v!$L9W+T=bP]$_:]Vyg}A.ygD.r;h-D]m%&", 600, 0x888AFA5B}
|
|
|
21b10c |
+};
|
|
|
21b10c |
+
|
|
|
21b10c |
+static const int test_size = sizeof(tests) / sizeof(tests[0]);
|
|
|
21b10c |
+
|
|
|
21b10c |
+int main(void)
|
|
|
21b10c |
+{
|
|
|
21b10c |
+ int i;
|
|
|
21b10c |
+ for (i = 0; i < test_size; i++) {
|
|
|
21b10c |
+ test_crc32(tests[i].crc, tests[i].buf, tests[i].len,
|
|
|
21b10c |
+ tests[i].expect, tests[i].line);
|
|
|
21b10c |
+ }
|
|
|
21b10c |
+ return 0;
|
|
|
21b10c |
+}
|
|
|
21b10c |
\ No newline at end of file
|
|
|
21b10c |
--
|
|
|
21b10c |
2.19.1
|
|
|
21b10c |
|