修正test目录下的makefile

This commit is contained in:
zhengchao
2017-10-09 18:52:42 +08:00
parent b697cf74d2
commit fd6d060ad8
3 changed files with 7 additions and 8 deletions

View File

@@ -175,7 +175,7 @@ enum MAAT_SCAN_OPT
int Maat_set_scan_status(Maat_feather_t feather,scan_status_t* mid,enum MAAT_SCAN_OPT type,const void* value,int size); int Maat_set_scan_status(Maat_feather_t feather,scan_status_t* mid,enum MAAT_SCAN_OPT type,const void* value,int size);
//Return hit rule number, return -1 when error occurs,return -2 when hit current region //Return hit rule number, return -1 when error occurs,return -2 when hit current region
//mid MUST set NULL before fist call //mid MUST set to NULL before fist call
int Maat_scan_intval(Maat_feather_t feather,int table_id int Maat_scan_intval(Maat_feather_t feather,int table_id
,unsigned int intval ,unsigned int intval
,struct Maat_rule_t*result,int rule_num ,struct Maat_rule_t*result,int rule_num

View File

@@ -419,6 +419,7 @@ int get_rm_key_list(unsigned int version,redisContext *c,struct serial_rule_t**
assert(reply->type==REDIS_REPLY_ARRAY); assert(reply->type==REDIS_REPLY_ARRAY);
if(reply->elements==0) if(reply->elements==0)
{ {
//a duplicate rule_id would induce this error.
MESA_handle_runtime_log(logger, RLOG_LV_FATAL, maat_redis_monitor,"Got nothing after ZRANGEBYSCORE %s (%d %d",rm_status_sset,version,version_in_redis); MESA_handle_runtime_log(logger, RLOG_LV_FATAL, maat_redis_monitor,"Got nothing after ZRANGEBYSCORE %s (%d %d",rm_status_sset,version,version_in_redis);
freeReplyObject(reply); freeReplyObject(reply);
return -1; return -1;
@@ -616,7 +617,7 @@ int calculate_serial_rule_num(struct _Maat_cmd_inner_t* _cmd,int * new_region_cn
*new_region_cnt+=cmd->groups[i].region_num; *new_region_cnt+=cmd->groups[i].region_num;
(*new_group_cnt)++; (*new_group_cnt)++;
} }
//for MAAT_OP_DEL, if the group's refcnt>0, group->region_num=0. //for MAAT_OP_DEL, if the group's refcnt>1, group->region_num=0.
//so it's OK to add. //so it's OK to add.
serial_num+=cmd->groups[i].region_num; serial_num+=cmd->groups[i].region_num;
} }

View File

@@ -1,8 +1,6 @@
LIBS= ../lib/libmaatframe.so -lhiredis_vip LIBS=../lib/libmaatframe.so
INC=-I../inc/ -I ../src/entry/ -I../src/inc_internal/ -I/usr/include/MESA/ INC=-I../inc/ -I/usr/include/MESA/
all: all:
g++ -o maat_redis_tool.o -c -g -Wall maat_redis_tool.cpp $(INC) g++ -o maat_test -g -Wall maat_test.cpp $(INC) $(LIBS) -lMESA_handle_logger
g++ -o maat_redis_tool maat_redis_tool.o $(LIBS)
g++ -o digest_gen -g digest_gen.c $(INC) $(LIBS)
clean: clean:
rm *.o rm maat_test test.log* -f