diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 2ab8af31b1a74bcb44b2b61bf0a7267fb0446b04..9226e9aa37e25e8ce7c8faed5345588c84229d74 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -495,7 +495,7 @@ static int32_t taosSetClientCfg(SConfig *pCfg) { tsRpcTimer = cfgGetItem(pCfg, "rpcTimer")->i32; tsRpcMaxTime = cfgGetItem(pCfg, "rpcMaxTime")->i32; tsRpcForceTcp = cfgGetItem(pCfg, "rpcForceTcp")->i32; - tsShellActivityTimer = cfgGetItem(pCfg, "shellActivityTimer")->bval; + tsShellActivityTimer = cfgGetItem(pCfg, "shellActivityTimer")->i32; tsCompressMsgSize = cfgGetItem(pCfg, "compressMsgSize")->i32; tsCompressColData = cfgGetItem(pCfg, "compressColData")->i32; tsMaxWildCardsLen = cfgGetItem(pCfg, "maxWildCardsLength")->i32; diff --git a/tests/script/test.sh b/tests/script/test.sh index 7721f21db7470b223ef7d4e4317b9e36a75349f8..f5a9e4187bb85ea4f0ddeadde92dec0bfc0a6fd0 100755 --- a/tests/script/test.sh +++ b/tests/script/test.sh @@ -125,8 +125,8 @@ ulimit -c unlimited if [ -n "$FILE_NAME" ]; then echo "------------------------------------------------------------------------" if [ $VALGRIND -eq 1 ]; then - echo valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes --log-file=${CODE_DIR}/../script/valgrind.log $PROGRAM -c $CFG_DIR -f $FILE_NAME - valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes --log-file=${CODE_DIR}/../script/valgrind.log $PROGRAM -c $CFG_DIR -f $FILE_NAME + echo valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes --log-file=${CODE_DIR}/../script/valgrind.log $PROGRAM -c $CFG_DIR -f $FILE_NAME -v + valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes --log-file=${CODE_DIR}/../script/valgrind.log $PROGRAM -c $CFG_DIR -f $FILE_NAME -v else if [[ $MULTIPROCESS -eq 1 ]];then echo "ExcuteCmd(multiprocess):" $PROGRAM -m -c $CFG_DIR -f $FILE_NAME diff --git a/tests/tsim/inc/simInt.h b/tests/tsim/inc/simInt.h index a667139de1934fab479c8ed2c3d857b7ee111dea..c8b13736c7cb752c7fa52500f132ede02988089e 100644 --- a/tests/tsim/inc/simInt.h +++ b/tests/tsim/inc/simInt.h @@ -156,6 +156,7 @@ extern int32_t simDebugFlag; extern char simScriptDir[]; extern bool abortExecution; extern bool useMultiProcess; +extern bool useValgrind; SScript *simParseScript(char *fileName); SScript *simProcessCallOver(SScript *script); diff --git a/tests/tsim/src/simExe.c b/tests/tsim/src/simExe.c index d71323336292cccf3d4cdb951c3ce457bded0667..5a18084fff254de271c4c68a2472c283de331797 100644 --- a/tests/tsim/src/simExe.c +++ b/tests/tsim/src/simExe.c @@ -340,6 +340,10 @@ bool simExecuteSystemCmd(SScript *script, char *option) { simReplaceStr(buf, "deploy.sh", "deploy.sh -m"); } + if (useValgrind) { + simReplaceStr(buf, "exec.sh", "exec.sh -v"); + } + simLogSql(buf, true); int32_t code = system(buf); int32_t repeatTimes = 0; diff --git a/tests/tsim/src/simMain.c b/tests/tsim/src/simMain.c index 8898f1b201da5e41db81982a8261a2d792888912..713e46df58e8957be2593eb5d78698ed46e5a69b 100644 --- a/tests/tsim/src/simMain.c +++ b/tests/tsim/src/simMain.c @@ -19,6 +19,7 @@ bool simExecSuccess = false; bool abortExecution = false; bool useMultiProcess = false; +bool useValgrind = false; void simHandleSignal(int32_t signo, void *sigInfo, void *context) { simSystemCleanUp(); @@ -35,6 +36,8 @@ int32_t main(int32_t argc, char *argv[]) { strcpy(scriptFile, argv[++i]); } else if (strcmp(argv[i], "-m") == 0) { useMultiProcess = true; + } else if (strcmp(argv[i], "-v") == 0) { + useValgrind = true; } else { printf("usage: %s [options] \n", argv[0]); printf(" [-c config]: config directory, default is: %s\n", configDir);