summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2023-02-16 10:50:58 +0200
committerGitHub <noreply@github.com>2023-02-16 10:50:58 +0200
commit5b61b0dc6d2579ee484fa6cf29bfac59513f84ab (patch)
tree0f4bbced22cb5c2af8a9b9befa3e091e2e7c138e /src/util.c
parent233abbbe03211ca700e10f827d289da24d9bd7e3 (diff)
downloadredis-5b61b0dc6d2579ee484fa6cf29bfac59513f84ab.tar.gz
skip new page cache reclame unit test when running in valgrind (#11808)
the new test is incompatible with valgrind. added a new `--valgrind` argument to `redis-server tests` mode, which will cause that test to be skipped..
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index a12846943..d33f4522a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1132,6 +1132,7 @@ int reclaimFilePageCache(int fd, size_t offset, size_t length) {
#ifdef REDIS_TEST
#include <assert.h>
#include <sys/mman.h>
+#include "testhelp.h"
static void test_string2ll(void) {
char buf[32];
@@ -1399,8 +1400,11 @@ int utilTest(int argc, char **argv, int flags) {
test_ld2string();
test_fixedpoint_d2string();
#if defined(__linux__)
- test_reclaimFilePageCache();
+ if (!(flags & REDIS_TEST_VALGRIND)) {
+ test_reclaimFilePageCache();
+ }
#endif
+ printf("Done testing util\n");
return 0;
}
#endif