Mem leakage and test update for valgrind

This commit is contained in:
Olof hagsand 2018-11-06 14:41:43 +01:00
parent d5390fc808
commit e343ad6454
24 changed files with 153 additions and 133 deletions

View file

@ -90,7 +90,7 @@ if [ $? -ne 0 ]; then
err
fi
new "start backend -s init -f $cfg -y $fyang"
sudo $clixon_backend -s init -f $cfg -y $fyang # -D 1
sudo $clixon_backend -s init -f $cfg -y $fyang # -D 1
if [ $? -ne 0 ]; then
err
fi
@ -99,9 +99,9 @@ new "kill old restconf daemon"
sudo pkill -u www-data clixon_restconf
new "start restconf daemon"
sudo start-stop-daemon -S -q -o -b -x /www-data/clixon_restconf -d /www-data -c www-data -- -f $cfg -y $fyang # -D 1
sudo su -c "$clixon_restconf -f $cfg -y $fyang" -s /bin/sh www-data &
sleep 1
sleep $RCWAIT
new "restconf tests"
@ -314,16 +314,16 @@ fi
# Cant get shell macros to work, inline matching from lib.sh
new "Kill restconf daemon"
sudo pkill -u www-data clixon_restconf
sudo pkill -u www-data -f "/www-data/clixon_restconf"
new "Kill backend"
# Check if still alive
pid=`pgrep clixon_backend`
# Check if premature kill
pid=`pgrep -u root -f clixon_backend`
if [ -z "$pid" ]; then
err "backend already dead"
fi
# kill backend
sudo clixon_backend -zf $cfg
sudo clixon_backend -z -f $cfg
if [ $? -ne 0 ]; then
err "kill backend"
fi