Added --helgrind support to crash_gen tool

This commit is contained in:
Steven Li 2020-10-10 22:09:22 +00:00
parent 4f5e4dc025
commit f26a4f893b
2 changed files with 13 additions and 2 deletions

View File

@ -42,6 +42,10 @@ 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 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. # 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:$(pwd) export PYTHONPATH=$(pwd)/../../src/connector/python/linux/python3:$(pwd)
@ -57,9 +61,15 @@ if [[ $1 == '--valgrind' ]]; then
valgrind \ valgrind \
--leak-check=yes \ --leak-check=yes \
--suppressions=crash_gen/valgrind_taos.supp \ --suppressions=crash_gen/valgrind_taos.supp \
python3.8 \ $PYTHON_EXEC \
./crash_gen/crash_gen.py $@
elif [[ $1 == '--helgrind' ]]; then
shift
valgrind \
--tool=helgrind \
$PYTHON_EXEC \
./crash_gen/crash_gen.py $@ ./crash_gen/crash_gen.py $@
else else
python3.8 ./crash_gen/crash_gen.py $@ $PYTHON_EXEC ./crash_gen/crash_gen.py $@
fi fi

View File

@ -421,6 +421,7 @@ class ThreadCoordinator:
errno2 = Helper.convertErrno(err.errno) # correct error scheme errno2 = Helper.convertErrno(err.errno) # correct error scheme
errMsg = "Transition failed: errno=0x{:X}, msg: {}".format(errno2, err) errMsg = "Transition failed: errno=0x{:X}, msg: {}".format(errno2, err)
logger.info(errMsg) logger.info(errMsg)
traceback.print_exc()
self._execStats.registerFailure(errMsg) self._execStats.registerFailure(errMsg)
# Then we move on to the next step # Then we move on to the next step