From 3b70249a2704ddd6c6228683c8322e66f03ad864 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Wed, 11 Aug 2021 17:42:45 +0800 Subject: [PATCH 1/3] [TD-5910]obtain coredump execfn in script --- tests/test-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-all.sh b/tests/test-all.sh index 6e7963e787..c179811ce6 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -25,7 +25,7 @@ function stopTaosd { function dohavecore(){ corefile=`find $corepath -mmin 1` core_file=`echo $corefile|cut -d " " -f2` - proc=`echo $corefile|cut -d "_" -f3` + proc=`file $core_file|awk -F "execfn:" '/execfn:/{print $2}'|tr -d \' |awk '{print $1}'|tr -d \,` if [ -n "$corefile" ];then echo 'taosd or taos has generated core' rm case.log @@ -46,7 +46,7 @@ function dohavecore(){ fi fi if [[ $1 == 1 ]];then - echo '\n'|gdb /usr/local/taos/bin/$proc $core_file -ex "bt 10" -ex quit + echo '\n'|gdb $proc $core_file -ex "bt 10" -ex quit exit 8 fi fi From 7a924a11e739cffecc56ebbac6d6d2cdb206cf0f Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 12 Aug 2021 11:29:18 +0800 Subject: [PATCH 2/3] add some log --- tests/test-all.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-all.sh b/tests/test-all.sh index c179811ce6..1753da3d36 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -26,6 +26,7 @@ function dohavecore(){ corefile=`find $corepath -mmin 1` core_file=`echo $corefile|cut -d " " -f2` proc=`file $core_file|awk -F "execfn:" '/execfn:/{print $2}'|tr -d \' |awk '{print $1}'|tr -d \,` + echo $core_file,$corefile if [ -n "$corefile" ];then echo 'taosd or taos has generated core' rm case.log From a75137581e0c0a4b52d1f22eb1e24a26607d7cc8 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Thu, 12 Aug 2021 13:42:22 +0800 Subject: [PATCH 3/3] update case --- tests/test-all.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test-all.sh b/tests/test-all.sh index 1753da3d36..8dd1ade9be 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -24,10 +24,9 @@ function stopTaosd { function dohavecore(){ corefile=`find $corepath -mmin 1` - core_file=`echo $corefile|cut -d " " -f2` - proc=`file $core_file|awk -F "execfn:" '/execfn:/{print $2}'|tr -d \' |awk '{print $1}'|tr -d \,` - echo $core_file,$corefile if [ -n "$corefile" ];then + core_file=`echo $corefile|cut -d " " -f2` + proc=`file $core_file|awk -F "execfn:" '/execfn:/{print $2}'|tr -d \' |awk '{print $1}'|tr -d \,` echo 'taosd or taos has generated core' rm case.log if [[ "$tests_dir" == *"$IN_TDINTERNAL"* ]] && [[ $1 == 1 ]]; then