Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
82b21d6e
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
82b21d6e
编写于
10月 11, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
10月 11, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3585 from taosdata/feature/crash_gen
Added valgrind memory check to crash_gen tool
上级
16782bff
76dc969f
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
17735 addition
and
246 deletion
+17735
-246
tests/pytest/crash_gen.sh
tests/pytest/crash_gen.sh
+28
-2
tests/pytest/crash_gen/crash_gen.py
tests/pytest/crash_gen/crash_gen.py
+458
-244
tests/pytest/crash_gen/valgrind_taos.supp
tests/pytest/crash_gen/valgrind_taos.supp
+17249
-0
未找到文件。
tests/pytest/crash_gen.sh
浏览文件 @
82b21d6e
...
...
@@ -42,11 +42,37 @@ TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1`
LIB_DIR
=
`
echo
$TAOSD_DIR
|rev|cut
-d
'/'
-f
3,4,5,6|rev
`
/lib
# Now getting ready to execute Python
# The following is the default of our standard dev env (Ubuntu 20.04), modify/adjust at your own risk
PYTHON_EXEC
=
python3.8
# First we need to set up a path for Python to find our own TAOS modules, so that "import" can work.
export
PYTHONPATH
=
$(
pwd
)
/../../src/connector/python/linux/python3
export
PYTHONPATH
=
$(
pwd
)
/../../src/connector/python/linux/python3
:
$(
pwd
)
# Then let us set up the library path so that our compiled SO file can be loaded by Python
export
LD_LIBRARY_PATH
=
$LD_LIBRARY_PATH
:
$LIB_DIR
# Now we are all let, and let's see if we can find a crash. Note we pass all params
python3.8 ./crash_gen.py
$@
if
[[
$1
==
'--valgrind'
]]
;
then
shift
export
PYTHONMALLOC
=
malloc
VALGRIND_OUT
=
valgrind.out
VALGRIND_ERR
=
valgrind.err
# How to generate valgrind suppression file: https://stackoverflow.com/questions/17159578/generating-suppressions-for-memory-leaks
# valgrind --leak-check=full --gen-suppressions=all --log-fd=9 python3.8 ./crash_gen.py $@ 9>>memcheck.log
echo
Executing under VALGRIND, with STDOUT/ERR going to
$VALGRIND_OUT
and
$VALGRIND_ERR
, please watch them from a different terminal.
valgrind
\
--leak-check
=
yes
\
--suppressions
=
crash_gen/valgrind_taos.supp
\
$PYTHON_EXEC
\
./crash_gen/crash_gen.py
$@
>
$VALGRIND_OUT
2>
$VALGRIND_ERR
elif
[[
$1
==
'--helgrind'
]]
;
then
shift
valgrind
\
--tool
=
helgrind
\
$PYTHON_EXEC
\
./crash_gen/crash_gen.py
$@
else
$PYTHON_EXEC
./crash_gen/crash_gen.py
$@
fi
tests/pytest/crash_gen.py
→
tests/pytest/crash_gen
/crash_gen
.py
浏览文件 @
82b21d6e
此差异已折叠。
点击以展开。
tests/pytest/crash_gen/valgrind_taos.supp
0 → 100644
浏览文件 @
82b21d6e
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录