You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-arch/csnappy/files/csnappy-0_pre20220804-fix-t...

42 lines
2.0 KiB

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