未验证 提交 858da49d 编写于 作者: H huili 提交者: GitHub

Merge pull request #5239 from taosdata/test/testcase

[TD-3011]<test>memory leak can't merge
...@@ -174,14 +174,13 @@ pipeline { ...@@ -174,14 +174,13 @@ pipeline {
./crash_gen.sh -a -p -t 4 -s 2000 ./crash_gen.sh -a -p -t 4 -s 2000
''' '''
} }
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh ''' sh '''
cd ${WKC}/tests/pytest cd ${WKC}/tests/pytest
rm -rf /var/lib/taos/* rm -rf /var/lib/taos/*
rm -rf /var/log/taos/* rm -rf /var/log/taos/*
./handle_crash_gen_val_log.sh ./handle_crash_gen_val_log.sh
''' '''
}
timeout(time: 45, unit: 'MINUTES'){ timeout(time: 45, unit: 'MINUTES'){
sh ''' sh '''
date date
......
...@@ -16,7 +16,7 @@ TOP_DIR=`pwd` ...@@ -16,7 +16,7 @@ TOP_DIR=`pwd`
TAOSD_DIR=`find . -name "taosd"|grep -v community|head -n1` TAOSD_DIR=`find . -name "taosd"|grep -v community|head -n1`
nohup $TAOSD_DIR >/dev/null & nohup $TAOSD_DIR >/dev/null &
cd - cd -
./crash_gen.sh --valgrind -p -t 10 -s 350 -b 4 ./crash_gen.sh --valgrind -p -t 10 -s 500 -b 4
pidof taosd|xargs kill -9 pidof taosd|xargs kill -9
grep 'start to execute\|ERROR SUMMARY' valgrind.err|grep -v 'grep'|uniq|tee crash_gen_mem_err.log grep 'start to execute\|ERROR SUMMARY' valgrind.err|grep -v 'grep'|uniq|tee crash_gen_mem_err.log
...@@ -36,11 +36,13 @@ for defiMemError in `grep 'definitely lost:' crash_gen-definitely-lost-out.log | ...@@ -36,11 +36,13 @@ for defiMemError in `grep 'definitely lost:' crash_gen-definitely-lost-out.log |
do do
defiMemError=(${defiMemError//,/}) defiMemError=(${defiMemError//,/})
if [ -n "$defiMemError" ]; then if [ -n "$defiMemError" ]; then
if [ "$defiMemError" -gt 3 -a "$defiMemError" -lt 1013 ]; then if [ "$defiMemError" -gt 0 -a "$defiMemError" -lt 1013 ]; then
echo -e "${RED} ## Memory errors number valgrind reports \ cat valgrind.err
Definitely lost is $defiMemError. More than our threshold! ## ${NC}" echo -e "${RED} ## Memory errors number valgrind reports \
Definitely lost is $defiMemError. More than our threshold! ## ${NC}"
exit 8 exit 8
elif [ "$defiMemError" -gt 1013 ];then #add for azure elif [ "$defiMemError" -gt 1013 ];then #add for azure
cat valgrind.err
echo -e "${RED} ## Memory errors number valgrind reports \ echo -e "${RED} ## Memory errors number valgrind reports \
Definitely lost is $defiMemError. More than our threshold! ## ${NC}" Definitely lost is $defiMemError. More than our threshold! ## ${NC}"
exit 8 exit 8
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册