From ff8650c748e28297cf4ce9ff2da05a005e5553b9 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Tue, 15 Dec 2020 17:22:07 +0100 Subject: [PATCH] restconf-rpc tests --- lib/src/clixon_proc.c | 3 +-- test/test_restconf_rpc.sh | 25 +++++++++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/src/clixon_proc.c b/lib/src/clixon_proc.c index 5000fc49..30709bab 100644 --- a/lib/src/clixon_proc.c +++ b/lib/src/clixon_proc.c @@ -60,7 +60,6 @@ #include #include #include -#include #include #include @@ -288,7 +287,7 @@ clixon_proc_background(char **argv, *pid0 = child; retval = 0; quit: - clicon_debug(1, "%s retval:%d child:%d", __FUNCTION__, retval, child); + clicon_debug(1, "%s retval:%d", __FUNCTION__, retval); return retval; } diff --git a/test/test_restconf_rpc.sh b/test/test_restconf_rpc.sh index d596e32c..14515037 100755 --- a/test/test_restconf_rpc.sh +++ b/test/test_restconf_rpc.sh @@ -67,6 +67,9 @@ new "start restconf" expecteof "$clixon_netconf -qf $cfg" 0 "restconfstart]]>]]>" "]]>]]>" new "3)check restconf on" +if [ $valgrindtest -eq 0 ]; then # Cant get pgrep to work properly + sleep $DEMWAIT # Slows the tests down considerably, but needed in eg docker test +fi ps=$(ps aux|grep "$WWWDIR/clixon_restconf -f $cfg" | grep -v grep) if [ -z "$ps" ]; then err "restconf running" @@ -82,6 +85,9 @@ new "start restconf again" expecteof "$clixon_netconf -qf $cfg" 0 "restconfstart]]>]]>" "]]>]]>" new "5)check restconf on" +if [ $valgrindtest -eq 0 ]; then # Cant get pgrep to work properly + sleep $DEMWAIT # Slows the tests down considerably, but needed in eg docker test +fi ps=$(ps aux|grep "$WWWDIR/clixon_restconf -f $cfg" | grep -v grep) if [ -z "$ps" ]; then err "A restconf running" @@ -102,6 +108,9 @@ expecteof "$clixon_netconf -qf $cfg" 0 "restconfstatus]]>]]>" "true]]>]]>" +if [ $valgrindtest -eq 0 ]; then # Cant get pgrep to work properly + sleep $DEMWAIT # Slows the tests down considerably, but needed in eg docker test +fi pid0=$(pgrep clixon_restconf) new "restart restconf" @@ -112,7 +121,11 @@ expecteof "$clixon_netconf -qf $cfg" 0 "