Valgrind tests for clixon_snmp.

This commit is contained in:
Kristofer Hallin 2022-04-27 21:03:47 +02:00 committed by Olof hagsand
parent 28514c6750
commit 366b1cb42f
3 changed files with 40 additions and 17 deletions

View file

@ -415,6 +415,30 @@ function chunked_framing()
printf "\n#%s\n%s\n##\n" ${length} "${str}"
}
# Start clixon_snmp
function start_snmp(){
cfg=$1
$clixon_snmp -f $cfg -D $DBG -l s &
if [ $? -ne 0 ]; then
err
fi
if [ $valgrindtest != 0 ]; then
checkvalgrind
fi
}
# Stop clixon_snmp and Valgrind if needed
function stop_snmp(){
if [ $valgrindtest != 0 ]; then
kill `ps aux | grep [v]algrind | awk '{print $2}' | tail -n1`
else
killall clixon_snmp
fi
}
# Start backend with all varargs.
# If valgrindtest == 2, start valgrind
function start_backend(){