restconf memleaks

This commit is contained in:
Olof hagsand 2021-06-24 13:09:18 +02:00
parent d6c175e76e
commit c5da97e2a4
7 changed files with 23 additions and 25 deletions

View file

@ -32,6 +32,7 @@ for test in $pattern; do
testfile=$test
. ./$test
errcode=$?
endsuite
if [ $errcode -ne 0 ]; then
allerr=1
echo -e "\e[31mError in $test errcode=$errcode"

View file

@ -432,6 +432,7 @@ function wait_restconf_stopped(){
}
# End of test, final tests before normal exit of test
# Note this is a single test started by new, not a total test suite
function endtest()
{
if [ $valgrindtest -eq 1 ]; then
@ -448,6 +449,12 @@ function new(){
>&2 echo "Test $testi($testnr) [$1]"
}
# End of complete test-suite, eg a test file
function endsuite()
{
unset CURLOPTS
}
# Evaluate and return
# Example: expectpart $(fn arg) 0 "my return" -- "foo"
# - evaluated expression

View file

@ -58,6 +58,7 @@ function memonce(){
testfile=$test
. ./$test
errcode=$?
endsuite
if [ $errcode -ne 0 ]; then
memerr=1
echo -e "\e[31mError in $test errcode=$errcode"

View file

@ -116,12 +116,7 @@ fi
new "wait backend"
wait_backend
#new "netconf edit config"
#expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><edit-config><target><candidate/></target><config>$RESTCONFIG</config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
#new "netconf commit"
#expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><commit/></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"
# Explicit start of restconf for easier debugging
if [ $RC -ne 0 ]; then
new "kill old restconf daemon"
stop_restconf_pre