Remove REDIS tag from test macros. (#333)

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
This commit is contained in:
Shivshankar 2024-04-19 05:34:02 -04:00 committed by GitHub
parent cc94c98a9d
commit 7809df0c93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 12 additions and 12 deletions

View File

@ -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) {

View File

@ -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();

View File

@ -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);

View File

@ -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")) {

View File

@ -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;

View File

@ -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

View File

@ -1847,7 +1847,7 @@ static size_t strEntryBytesLarge(size_t slen) {
/* ./redis-server test ziplist <randomseed> */
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;