Added valgrind memory leak tests for backend. Fixed some minor leaks and file descriptor closes.

This commit is contained in:
Olof hagsand 2019-02-19 13:16:59 +01:00
parent add43d250d
commit 4c0b412e9f
34 changed files with 318 additions and 382 deletions

View file

@ -76,10 +76,7 @@ if [ $BE -ne 0 ]; then
err
fi
new "start backend -s init -f $cfg -y $fyang"
sudo $clixon_backend -s init -f $cfg -y $fyang -D $DBG
if [ $? -ne 0 ]; then
err
fi
start_backend -s init -f $cfg -y $fyang
fi
new "kill old restconf daemon"
@ -88,6 +85,7 @@ sudo pkill -u www-data -f "/www-data/clixon_restconf"
new "start restconf daemon"
sudo su -c "$clixon_restconf -f $cfg -y $fyang $RCLOG -D $DBG" -s /bin/sh www-data &
new "waiting"
sleep $RCWAIT
new "restconf tests"
@ -197,9 +195,6 @@ if [ -z "$pid" ]; then
err "backend already dead"
fi
# kill backend
sudo clixon_backend -z -f $cfg
if [ $? -ne 0 ]; then
err "kill backend"
fi
stop_backend -f $cfg
rm -rf $dir