From 923cf224cf4d98ccdc2ecbe8adc6098ea84d4160 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 23 Nov 2022 10:57:01 +0800 Subject: [PATCH] test: add asan case --- tests/parallel_test/cases.task | 26 +++++++++---------- tests/script/sh/stop_dnodes.sh | 14 ++++++++++ tests/system-test/0-others/taosShellNetChk.py | 6 +++-- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 1ee30da291..86f4294d30 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -231,7 +231,7 @@ ,,y,script,./test.sh -f tsim/stream/windowClose.sim ,,y,script,./test.sh -f tsim/stream/ignoreExpiredData.sim ,,y,script,./test.sh -f tsim/stream/sliding.sim -,,n,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim +,,,script,./test.sh -f tsim/stream/partitionbyColumnInterval.sim ,,y,script,./test.sh -f tsim/stream/partitionbyColumnSession.sim ,,y,script,./test.sh -f tsim/stream/partitionbyColumnState.sim ,,y,script,./test.sh -f tsim/stream/deleteInterval.sim @@ -278,8 +278,8 @@ ,,y,script,./test.sh -f tsim/stable/values.sim ,,y,script,./test.sh -f tsim/stable/vnode3.sim ,,y,script,./test.sh -f tsim/stable/metrics_idx.sim -,,n,script,./test.sh -f tsim/sma/drop_sma.sim -,,n,script,./test.sh -f tsim/sma/sma_leak.sim +,,,script,./test.sh -f tsim/sma/drop_sma.sim +,,,script,./test.sh -f tsim/sma/sma_leak.sim ,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim ,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim ,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim @@ -403,16 +403,16 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShell.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellError.py -,,,system-test,python3 ./test.py -f 0-others/taosShellNetChk.py -,,,system-test,python3 ./test.py -f 0-others/telemetry.py -,,,system-test,python3 ./test.py -f 0-others/taosdMonitor.py -,,,system-test,python3 ./test.py -f 0-others/udfTest.py -,,,system-test,python3 ./test.py -f 0-others/udf_create.py -,,,system-test,python3 ./test.py -f 0-others/udf_restart_taosd.py -,,,system-test,python3 ./test.py -f 0-others/cachemodel.py -,,,system-test,python3 ./test.py -f 0-others/udf_cfg1.py -,,,system-test,python3 ./test.py -f 0-others/udf_cfg2.py -,,,system-test,python3 ./test.py -f 0-others/taosdShell.py -N 5 -M 3 -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellNetChk.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/telemetry.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosdMonitor.py +,,n,system-test,python3 ./test.py -f 0-others/udfTest.py +,,n,system-test,python3 ./test.py -f 0-others/udf_create.py +,,n,system-test,python3 ./test.py -f 0-others/udf_restart_taosd.py +,,n,system-test,python3 ./test.py -f 0-others/cachemodel.py +,,n,system-test,python3 ./test.py -f 0-others/udf_cfg1.py +,,n,system-test,python3 ./test.py -f 0-others/udf_cfg2.py +,,n,system-test,python3 ./test.py -f 0-others/taosdShell.py -N 5 -M 3 -Q 3 ,,,system-test,python3 ./test.py -f 0-others/sysinfo.py ,,,system-test,python3 ./test.py -f 0-others/user_control.py ,,,system-test,python3 ./test.py -f 0-others/fsync.py diff --git a/tests/script/sh/stop_dnodes.sh b/tests/script/sh/stop_dnodes.sh index ce2d7144f9..ab9cfc1017 100755 --- a/tests/script/sh/stop_dnodes.sh +++ b/tests/script/sh/stop_dnodes.sh @@ -26,3 +26,17 @@ while [ -n "$PID" ]; do fi PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'` done + +PID=`ps -ef|grep -w taos | grep -v grep | awk '{print $2}'` +while [ -n "$PID" ]; do + echo kill -9 $PID + #pkill -9 taosd + kill -9 $PID + echo "Killing taosd processes" + if [ "$OS_TYPE" != "Darwin" ]; then + fuser -k -n tcp 6030 + else + lsof -nti:6030 | xargs kill -9 + fi + PID=`ps -ef|grep -w taosd | grep -v grep | awk '{print $2}'` +done diff --git a/tests/system-test/0-others/taosShellNetChk.py b/tests/system-test/0-others/taosShellNetChk.py index 781fcae638..aac7808d24 100644 --- a/tests/system-test/0-others/taosShellNetChk.py +++ b/tests/system-test/0-others/taosShellNetChk.py @@ -230,9 +230,11 @@ class TDTestCase: tdLog.exit('taos -n client fail!') finally: if platform.system().lower() == 'windows': - os.system('ps -a | grep taos | awk \'{print $2}\' | xargs kill -9') + tdLog.info("ps -a | grep taos | awk \'{print $2}\' | xargs kill -9") + # os.system('ps -a | grep taos | awk \'{print $2}\' | xargs kill -9') else: - os.system('pkill -9 taos') + tdLog.info("pkill -9 taos") + # os.system('pkill -9 taos') def stop(self): tdSql.close() -- GitLab