From 8a5cf9cebcb9362dac015e088b8ea951b1ddbdb9 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 26 Aug 2024 10:44:23 +0800 Subject: [PATCH 1/2] tetst:add memory leak detection for TD in psiminfo to the CI --- tests/script/sh/checkAsan.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/script/sh/checkAsan.sh b/tests/script/sh/checkAsan.sh index b1571aa173..aa73d4cb23 100755 --- a/tests/script/sh/checkAsan.sh +++ b/tests/script/sh/checkAsan.sh @@ -49,6 +49,7 @@ fi indirect_leak=$(cat ${LOG_DIR}/*.asan | grep "Indirect leak" | wc -l) python_error=$(cat ${LOG_DIR}/*.info | grep -w "stack" | wc -l) +python_taos_error=$(cat ${LOG_DIR}/*.info |grep "#" | grep -w "TDinternal" | wc -l) # ignore @@ -84,17 +85,18 @@ echo -e "\033[44;32;1m"asan memory_leak: $memory_leak"\033[0m" echo -e "\033[44;32;1m"asan indirect_leak: $indirect_leak"\033[0m" echo -e "\033[44;32;1m"asan runtime error: $runtime_error"\033[0m" echo -e "\033[44;32;1m"asan python error: $python_error"\033[0m" +echo -e "\033[44;32;1m"asan python taos error: $python_taos_error"\033[0m" -let "errors=$error_num+$memory_leak+$indirect_leak+$runtime_error+$python_error" +let "errors=$error_num+$memory_leak+$indirect_leak+$runtime_error+$python_error+$python_taos_error" if [ $errors -eq 0 ]; then echo -e "\033[44;32;1m"no asan errors"\033[0m" exit 0 else echo -e "\033[44;31;1m"asan total errors: $errors"\033[0m" - if [ $python_error -ne 0 ]; then - cat ${LOG_DIR}/*.info + if [ $python_error -ne 0 ] || [ $python_taos_error -ne 0 ] ; then + cat ${LOG_DIR}/*.info |grep "#" | grep -w "TDinternal" fi cat ${LOG_DIR}/*.asan exit 1 -fi +fi \ No newline at end of file From 8ca7b967a60c635a02cf711470618d179257e05c Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 26 Aug 2024 13:49:30 +0800 Subject: [PATCH 2/2] test:commit the failed case in cases-task --- tests/parallel_test/cases.task | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 3553f0d913..c51fa6fe2a 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -310,7 +310,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/balance_vgroups_r1.py -N 6 ,,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 -,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellNetChk.py +,,n,system-test,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/backquote_check.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosdMonitor.py