Restconf mem leak
This commit is contained in:
parent
315e554637
commit
fa93364953
6 changed files with 26 additions and 17 deletions
|
|
@ -596,6 +596,7 @@ function start_restconf(){
|
|||
if [ $? -ne 0 ]; then
|
||||
err1 "expected 0" "$?"
|
||||
fi
|
||||
RCPID=$!
|
||||
}
|
||||
|
||||
# Stop restconf daemon before test
|
||||
|
|
@ -609,10 +610,12 @@ function stop_restconf_pre(){
|
|||
# 2) Dont use -u $WWWUSER since clixon_restconf may drop privileges.
|
||||
# 3) After fork, it seems to take some time before name is right
|
||||
function stop_restconf(){
|
||||
sudo pkill -f clixon_restconf
|
||||
if [ $valgrindtest -eq 3 ]; then
|
||||
if [ $valgrindtest -eq 3 ]; then
|
||||
sudo kill ${RCPID}
|
||||
sleep 1
|
||||
checkvalgrind
|
||||
else
|
||||
sudo pkill -f clixon_restconf
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ function memonce(){
|
|||
|
||||
valgrindfile=$(mktemp)
|
||||
echo "valgrindfile:$valgrindfile"
|
||||
|
||||
clixon_backend=
|
||||
clixon_restconf=
|
||||
clixon_cli=
|
||||
|
|
@ -30,9 +29,10 @@ function memonce(){
|
|||
;;
|
||||
'restconf')
|
||||
valgrindtest=3 # This means restconf valgrind test
|
||||
sudo chown root $valgrindfile
|
||||
sudo chmod 777 $valgrindfile
|
||||
: ${DEMWAIT:=15} # valgrind backend needs some time to get up
|
||||
clixon_restconf="/usr/bin/valgrind --num-callers=50 --leak-check=full --show-leak-kinds=all --suppressions=./valgrind-clixon.supp --track-fds=yes --trace-children=no --child-silent-after-fork=yes --log-file=$valgrindfile clixon_restconf"
|
||||
|
||||
;;
|
||||
'cli')
|
||||
valgrindtest=1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue