From 2280ab0513b6b6b89eb7080410acecc5cacea189 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Mon, 14 Oct 2019 22:47:25 +0300 Subject: [PATCH] mdbx-build: refine `memcheck` target. Change-Id: I8551c5d7ce5249a16959d34c1272c38cd1ad2d27 --- GNUmakefile | 5 +++-- test/valgrind_suppress.txt | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 0d6f19c0..0608159e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -155,10 +155,11 @@ check-fault: all mdbx_test VALGRIND=valgrind --trace-children=yes --log-file=valgrind-%p.log --leak-check=full --track-origins=yes --error-exitcode=42 --suppressions=test/valgrind_suppress.txt memcheck check-valgrind: all mdbx_test + @echo "$(MDBX_OPTIONS)" | grep -q MDBX_USE_VALGRIND || echo "WARNING: Please build libmdbx with -DMDBX_USE_VALGRIND to avoid false-positives from Valgrind !!!" >&2 rm -f valgrind-*.log $(TEST_DB) $(TEST_LOG) && (set -o pipefail; \ - ($(VALGRIND) ./mdbx_test --progress --console=no --repeat=4 --pathname=$(TEST_DB) --dont-cleanup-after basic && \ + ($(VALGRIND) ./mdbx_test --mode=-writemap,-lifo --progress --console=no --repeat=4 --pathname=$(TEST_DB) --dont-cleanup-after basic && \ $(VALGRIND) ./mdbx_test --progress --console=no --pathname=$(TEST_DB) --dont-cleanup-before --dont-cleanup-after --copy && \ - $(VALGRIND) ./mdbx_test --mode=-writemap,-lifo --progress --console=no --repeat=2 --pathname=$(TEST_DB) --dont-cleanup-after basic) \ + $(VALGRIND) ./mdbx_test --progress --console=no --repeat=2 --pathname=$(TEST_DB) --dont-cleanup-after basic) \ | tee -a $(TEST_LOG) | tail -n 42) \ && $(VALGRIND) ./mdbx_chk -vvn $(TEST_DB) && ./mdbx_chk -vvn $(TEST_DB)-copy diff --git a/test/valgrind_suppress.txt b/test/valgrind_suppress.txt index 84c4746f..d9ee6af5 100644 --- a/test/valgrind_suppress.txt +++ b/test/valgrind_suppress.txt @@ -14,3 +14,12 @@ ... fun:mdbx_env_sync_ex } +{ + pwrite-page-flush + Memcheck:Param + pwritev(vector[...]) + fun:pwritev + fun:mdbx_pwritev + fun:mdbx_page_flush + fun:mdbx_txn_commit +}