diff options
Diffstat (limited to 'app-arch/csnappy/files')
-rw-r--r-- | app-arch/csnappy/files/csnappy-0_pre20220804-fix-tests.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/app-arch/csnappy/files/csnappy-0_pre20220804-fix-tests.patch b/app-arch/csnappy/files/csnappy-0_pre20220804-fix-tests.patch new file mode 100644 index 000000000000..e4d11f7d9021 --- /dev/null +++ b/app-arch/csnappy/files/csnappy-0_pre20220804-fix-tests.patch @@ -0,0 +1,41 @@ +https://github.com/zeevt/csnappy/pull/40 + +From 60ac30054eae4bbc50f90f8228ac53d014400619 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> +Date: Thu, 16 Dec 2021 14:24:26 +0100 +Subject: [PATCH] Fix parallel tests by only testing the current optimization + level + +https://github.com/zeevt/csnappy/issues/39 +--- a/Makefile ++++ b/Makefile +@@ -34,25 +34,14 @@ check_leaks: cl_tester + LD_LIBRARY_PATH=. valgrind --leak-check=full --show-reachable=yes ./cl_tester -c <testdata/urls.10K >/dev/null + LD_LIBRARY_PATH=. valgrind --leak-check=full --show-reachable=yes ./cl_tester -S d + +-check_unaligned_uint64: ++check_unaligned_uint64: cl_tester + gzip -dc <testdata/unaligned_uint64_test.snappy.gz >testdata/unaligned_uint64_test.snappy + gzip -dc <testdata/unaligned_uint64_test.bin.gz >testdata/unaligned_uint64_test.bin +- EXTRA_TEST_CFLAGS="-O0" make check_unaligned_uint64_extra_cflags +- EXTRA_TEST_CFLAGS="-O1" make check_unaligned_uint64_extra_cflags +- EXTRA_TEST_CFLAGS="-O2" make check_unaligned_uint64_extra_cflags +- EXTRA_TEST_CFLAGS="-O3" make check_unaligned_uint64_extra_cflags +- EXTRA_TEST_CFLAGS="-O2 -march=native" make check_unaligned_uint64_extra_cflags +- EXTRA_TEST_CFLAGS="-O3 -march=native" make check_unaligned_uint64_extra_cflags +- rm -f testdata/unaligned_uint64_test.snappy testdata/unaligned_uint64_test.bin +- +-check_unaligned_uint64_extra_cflags: +- make clean +- make cl_tester + rm -f tmp + LD_LIBRARY_PATH=. ./cl_tester -d testdata/unaligned_uint64_test.snappy tmp +- diff testdata/unaligned_uint64_test.bin tmp >/dev/null && echo "${EXTRA_TEST_CFLAGS} ok" +- make clean ++ diff testdata/unaligned_uint64_test.bin tmp >/dev/null && echo "Unaligned test is ok" + rm -f tmp ++ rm -f testdata/unaligned_uint64_test.snappy testdata/unaligned_uint64_test.bin + + libcsnappy.so: csnappy_compress.c csnappy_decompress.c csnappy_internal.h csnappy_internal_userspace.h + $(CC) $(CFLAGS) $(EXTRA_TEST_CFLAGS) -fPIC -DPIC -c -o csnappy_compress.o csnappy_compress.c + |