diff --git a/src/dict.c b/src/dict.c index dcde86845e..e3ba5189cd 100644 --- a/src/dict.c +++ b/src/dict.c @@ -1817,7 +1817,7 @@ int dictTest(int argc, char **argv, int flags) { dict *dict = dictCreate(&BenchmarkDictType); long count = 0; unsigned long new_dict_size, current_dict_used, remain_keys; - int accurate = (flags & REDIS_TEST_ACCURATE); + int accurate = (flags & TEST_ACCURATE); if (argc == 4) { if (accurate) { diff --git a/src/listpack.c b/src/listpack.c index 8816a663cb..0b22bfc521 100644 --- a/src/listpack.c +++ b/src/listpack.c @@ -1817,7 +1817,7 @@ int listpackTest(int argc, char *argv[], int flags) { unsigned char *lp, *p, *vstr; int64_t vlen; unsigned char intbuf[LP_INTBUF_SIZE]; - int accurate = (flags & REDIS_TEST_ACCURATE); + int accurate = (flags & TEST_ACCURATE); TEST("Create int list") { lp = createIntList(); diff --git a/src/quicklist.c b/src/quicklist.c index 06c699af66..8a1c6d9ec3 100644 --- a/src/quicklist.c +++ b/src/quicklist.c @@ -2019,7 +2019,7 @@ int quicklistTest(int argc, char *argv[], int flags) { UNUSED(argc); UNUSED(argv); - int accurate = (flags & REDIS_TEST_ACCURATE); + int accurate = (flags & TEST_ACCURATE); unsigned int err = 0; int optimize_start = -(int)(sizeof(optimization_level) / sizeof(*optimization_level)); @@ -3259,7 +3259,7 @@ int quicklistTest(int argc, char *argv[], int flags) { quicklistRelease(ql); } - if (flags & REDIS_TEST_LARGE_MEMORY) { + if (flags & TEST_LARGE_MEMORY) { TEST("compress and decompress quicklist listpack node") { quicklistNode *node = quicklistCreateNode(); node->entry = lpNew(0); diff --git a/src/server.c b/src/server.c index b5a5a8839b..80e436723b 100644 --- a/src/server.c +++ b/src/server.c @@ -6928,9 +6928,9 @@ int main(int argc, char **argv) { int flags = 0; for (j = 3; j < argc; j++) { char *arg = argv[j]; - if (!strcasecmp(arg, "--accurate")) flags |= REDIS_TEST_ACCURATE; - else if (!strcasecmp(arg, "--large-memory")) flags |= REDIS_TEST_LARGE_MEMORY; - else if (!strcasecmp(arg, "--valgrind")) flags |= REDIS_TEST_VALGRIND; + if (!strcasecmp(arg, "--accurate")) flags |= TEST_ACCURATE; + else if (!strcasecmp(arg, "--large-memory")) flags |= TEST_LARGE_MEMORY; + else if (!strcasecmp(arg, "--valgrind")) flags |= TEST_VALGRIND; } if (!strcasecmp(argv[2], "all")) { diff --git a/src/testhelp.h b/src/testhelp.h index d5be80e79b..c00f391148 100644 --- a/src/testhelp.h +++ b/src/testhelp.h @@ -39,9 +39,9 @@ #ifndef __TESTHELP_H #define __TESTHELP_H -#define REDIS_TEST_ACCURATE (1<<0) -#define REDIS_TEST_LARGE_MEMORY (1<<1) -#define REDIS_TEST_VALGRIND (1<<2) +#define TEST_ACCURATE (1<<0) +#define TEST_LARGE_MEMORY (1<<1) +#define TEST_VALGRIND (1<<2) extern int __failed_tests; extern int __test_num; diff --git a/src/util.c b/src/util.c index 00e774209f..f200aa3f8a 100644 --- a/src/util.c +++ b/src/util.c @@ -1646,7 +1646,7 @@ int utilTest(int argc, char **argv, int flags) { test_ld2string(); test_fixedpoint_d2string(); #if defined(__linux__) - if (!(flags & REDIS_TEST_VALGRIND)) { + if (!(flags & TEST_VALGRIND)) { test_reclaimFilePageCache(); } #endif diff --git a/src/ziplist.c b/src/ziplist.c index 1a16945852..48c6502be1 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -1847,7 +1847,7 @@ static size_t strEntryBytesLarge(size_t slen) { /* ./redis-server test ziplist */ int ziplistTest(int argc, char **argv, int flags) { - int accurate = (flags & REDIS_TEST_ACCURATE); + int accurate = (flags & TEST_ACCURATE); unsigned char *zl, *p; unsigned char *entry; unsigned int elen;