From 688ec3e85cfd859502ebe3da9c9f629c53e8a260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sun, 9 Oct 2022 15:41:00 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-test:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B8=D1=81=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D0=B9=20Valgrind=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=BE=D0=B4?= =?UTF-8?q?=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/osal.c | 6 +++++- test/valgrind_suppress.txt | 14 ++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/osal.c b/src/osal.c index e120490a..99bcd7cd 100644 --- a/src/osal.c +++ b/src/osal.c @@ -621,8 +621,12 @@ MDBX_INTERNAL_FUNC int osal_ioring_create(osal_ioring_t *ior, #endif /* !Windows */ #if MDBX_HAVE_PWRITEV && defined(_SC_IOV_MAX) - if (!osal_iov_max) + if (!osal_iov_max) { osal_iov_max = sysconf(_SC_IOV_MAX); + if (RUNNING_ON_VALGRIND && osal_iov_max > 64) + /* чтобы не описывать все 1024 исключения в valgrind_suppress.txt */ + osal_iov_max = 64; + } #endif ior->boundary = (char *)(ior->pool + ior->allocated); diff --git a/test/valgrind_suppress.txt b/test/valgrind_suppress.txt index 2eb3142b..2a95ff0f 100644 --- a/test/valgrind_suppress.txt +++ b/test/valgrind_suppress.txt @@ -33,16 +33,22 @@ # memcmp() inside iov_write() as workaround for todo4recovery://erased_by_github/libmdbx/issues/269 { - write-page-check-bcmp + iov-pagecheck-1 Memcheck:Cond fun:bcmp - fun:iov_write* + fun:iov_callback4dirtypages + fun:osal_ioring_walk + fun:iov_complete + fun:iov_write } { - write-page-check-memcmp + iov-pagecheck-2 Memcheck:Cond fun:memcmp* - fun:iov_write* + fun:iov_callback4dirtypages + fun:osal_ioring_walk + fun:iov_complete + fun:iov_write } # single-page flush by pwrite()