From 475e70d773e8ece4abc0ca75835ae7613755adbc Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Tue, 15 Dec 2020 14:43:01 +0100 Subject: [PATCH] * New process-control RPC feature in clixon-lib.yang to manage processes * This is an alternative to manage a clixon daemon via sudtemd, containerd or other * One important special case is starting the clixon-restconf daemon internally * This is how it works: * Register a process via `clixon_process_register(h, name, namespace, argv, argc)` * Use process-control RPC defined in clixon-lib.yang to start/stop/restart or query status on that process * Example code in the main example --- test/test_restconf_rpc.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/test_restconf_rpc.sh b/test/test_restconf_rpc.sh index 2c9a99fd..d596e32c 100755 --- a/test/test_restconf_rpc.sh +++ b/test/test_restconf_rpc.sh @@ -10,8 +10,8 @@ APPNAME=example cfg=$dir/conf.xml # Cant get it to work in the general case, single tests work fine -# More specifically, if mem.sh background netconf, netconf crashes -if [ $valgrindtest -ne 0 ]; then +# More specifically, if mem.sh background netconf, netconf crashes which is valgrindtest 1 +if [ $valgrindtest -eq 1 ]; then echo "...skipped " return 0 # skip fi @@ -110,10 +110,12 @@ expecteof "$clixon_netconf -qf $cfg" 0 "restconfstatus]]>]]>" "true]]>]]>" -new "9)check new pid" -pid1=$(pgrep clixon_restconf) -if [ $pid0 -eq $pid1 ]; then - err "Different pids" "pid0:$pid0 = pid1:$pid1" +if [ $valgrindtest -eq 0 ]; then # Cant get pgrep to work properly + new "9)check new pid" + pid1=$(pgrep clixon_restconf) + if [ $pid0 -eq $pid1 ]; then + err "Different pids" "pid0:$pid0 = pid1:$pid1" + fi fi if [ $BE -ne 0 ]; then