From 05ce6f38a35c7e8c804320383faa77c39716ad03 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Mon, 9 Dec 2019 21:12:39 +0100 Subject: [PATCH] test kill valgrind process after run --- apps/cli/cli_main.c | 2 +- test/lib.sh | 2 +- test/test_augment.sh | 2 +- test/test_choice.sh | 4 ++-- test/test_identity.sh | 2 +- test/test_nacm.sh | 2 +- test/test_nacm_default.sh | 2 +- test/test_nacm_ext.sh | 2 +- test/test_nacm_module_read.sh | 2 +- test/test_nacm_module_write.sh | 2 +- test/test_nacm_protocol.sh | 2 +- test/test_perf.sh | 2 +- test/test_perf_state.sh | 2 +- test/test_privileges.sh | 2 +- test/test_restconf.sh | 4 ++-- test/test_restconf2.sh | 4 ++-- test/test_restconf_err.sh | 4 ++-- test/test_restconf_jukebox.sh | 4 ++-- test/test_restconf_listkey.sh | 4 ++-- test/test_restconf_patch.sh | 4 ++-- test/test_restconf_startup.sh | 2 +- test/test_rpc.sh | 2 +- test/test_stream.sh | 2 +- test/test_submodule.sh | 2 +- test/test_upgrade_auto.sh | 2 +- test/test_upgrade_interfaces.sh | 2 +- test/test_upgrade_repair.sh | 2 +- test/test_yang_namespace.sh | 2 +- 28 files changed, 35 insertions(+), 35 deletions(-) diff --git a/apps/cli/cli_main.c b/apps/cli/cli_main.c index cc5de600..2beb7867 100644 --- a/apps/cli/cli_main.c +++ b/apps/cli/cli_main.c @@ -541,7 +541,7 @@ main(int argc, char **argv) cligen_tree_add(cli_cligen(h), treeref, pt); if (printgen) - cligen_print(stdout, pt, 1); + cligen_print(stdout, pt, 1); /* pt_print */ } /* Initialize cli syntax */ diff --git a/test/lib.sh b/test/lib.sh index 4d43e4df..3e8e3c32 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -213,7 +213,7 @@ start_restconf(){ } stop_restconf(){ - sudo pkill -u $wwwuser -f "$clixon_restconf" + sudo pkill -u $wwwuser -f clixon_restconf # Dont use $clixon_restoconf doesnt work in valgrind if [ $valgrindtest -eq 3 ]; then sleep 1 checkvalgrind diff --git a/test/test_augment.sh b/test/test_augment.sh index 2cc1db1b..ccb7af20 100755 --- a/test/test_augment.sh +++ b/test/test_augment.sh @@ -169,7 +169,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_choice.sh b/test/test_choice.sh index 9bb5e8dc..129908db 100755 --- a/test/test_choice.sh +++ b/test/test_choice.sh @@ -111,7 +111,7 @@ if [ $BE -ne 0 ]; then if [ $? -ne 0 ]; then err fi - sudo pkill clixon_backend # to be sure + sudo pkill -f clixon_backend # to be sure new "start backend -s init -f $cfg" start_backend -s init -f $cfg @@ -121,7 +121,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_identity.sh b/test/test_identity.sh index 4759723c..ce272ef6 100755 --- a/test/test_identity.sh +++ b/test/test_identity.sh @@ -155,7 +155,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_nacm.sh b/test/test_nacm.sh index dedf6799..2da70b4b 100755 --- a/test/test_nacm.sh +++ b/test/test_nacm.sh @@ -127,7 +127,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon (-a is enable basic authentication)" start_restconf -f $cfg -- -a diff --git a/test/test_nacm_default.sh b/test/test_nacm_default.sh index 97b3c90f..84ef39b2 100755 --- a/test/test_nacm_default.sh +++ b/test/test_nacm_default.sh @@ -103,7 +103,7 @@ EOF wait_backend new "kill old restconf daemon" - sudo pkill -u $wwwuser clixon_restconf + sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon (-a is enable basic authentication)" start_restconf -f $cfg -- -a diff --git a/test/test_nacm_ext.sh b/test/test_nacm_ext.sh index 9cfd720e..da066b30 100755 --- a/test/test_nacm_ext.sh +++ b/test/test_nacm_ext.sh @@ -147,7 +147,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon (-a is enable http basic auth)" start_restconf -f $cfg -- -a diff --git a/test/test_nacm_module_read.sh b/test/test_nacm_module_read.sh index 1f420f2f..4d2a3550 100755 --- a/test/test_nacm_module_read.sh +++ b/test/test_nacm_module_read.sh @@ -141,7 +141,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon (-a is enable basic authentication)" start_restconf -f $cfg -- -a diff --git a/test/test_nacm_module_write.sh b/test/test_nacm_module_write.sh index 25aa75ee..67082c42 100755 --- a/test/test_nacm_module_write.sh +++ b/test/test_nacm_module_write.sh @@ -149,7 +149,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon (-a is enable basic authentication)" start_restconf -f $cfg -- -a diff --git a/test/test_nacm_protocol.sh b/test/test_nacm_protocol.sh index 123d4f91..5f8d64d8 100755 --- a/test/test_nacm_protocol.sh +++ b/test/test_nacm_protocol.sh @@ -150,7 +150,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon (-a is enable basic authentication)" start_restconf -f $cfg -- -a diff --git a/test/test_perf.sh b/test/test_perf.sh index 385cc1a6..063e5d02 100755 --- a/test/test_perf.sh +++ b/test/test_perf.sh @@ -83,7 +83,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_perf_state.sh b/test/test_perf_state.sh index 402cfd3f..05935413 100755 --- a/test/test_perf_state.sh +++ b/test/test_perf_state.sh @@ -61,7 +61,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_privileges.sh b/test/test_privileges.sh index 27a37a44..0e927819 100755 --- a/test/test_privileges.sh +++ b/test/test_privileges.sh @@ -60,7 +60,7 @@ testrun(){ err fi # Kill all backends regardless of user or pid files (we mess with them in this test) - sudo pkill clixon_backend + sudo pkill -f clixon_backend # start backend as user diff --git a/test/test_restconf.sh b/test/test_restconf.sh index 433f8d6b..e4e12451 100755 --- a/test/test_restconf.sh +++ b/test/test_restconf.sh @@ -43,7 +43,7 @@ if [ $BE -ne 0 ]; then if [ $? -ne 0 ]; then err fi - sudo pkill clixon_backend # to be sure + sudo pkill -f clixon_backend # to be sure new "start backend -s init -f $cfg -- -s" start_backend -s init -f $cfg -- -s fi @@ -52,7 +52,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_restconf2.sh b/test/test_restconf2.sh index 162139a7..598baf11 100755 --- a/test/test_restconf2.sh +++ b/test/test_restconf2.sh @@ -74,7 +74,7 @@ if [ $BE -ne 0 ]; then if [ $? -ne 0 ]; then err fi - sudo pkill clixon_backend # to be sure + sudo pkill -f clixon_backend # to be sure new "start backend -s init -f $cfg" start_backend -s init -f $cfg fi @@ -83,7 +83,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_restconf_err.sh b/test/test_restconf_err.sh index 192abc71..39ab119c 100755 --- a/test/test_restconf_err.sh +++ b/test/test_restconf_err.sh @@ -120,7 +120,7 @@ if [ $BE -ne 0 ]; then if [ $? -ne 0 ]; then err fi - sudo pkill clixon_backend # to be sure + sudo pkill -f clixon_backend # to be sure new "start backend -s init -f $cfg" start_backend -s init -f $cfg fi @@ -129,7 +129,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_restconf_jukebox.sh b/test/test_restconf_jukebox.sh index e5631a9c..4a36fa97 100755 --- a/test/test_restconf_jukebox.sh +++ b/test/test_restconf_jukebox.sh @@ -69,7 +69,7 @@ if [ $BE -ne 0 ]; then if [ $? -ne 0 ]; then err fi - sudo pkill clixon_backend # to be sure + sudo pkill -f clixon_backend # to be sure new "start backend -s init -f $cfg -- -s" start_backend -s init -f "$cfg" -- -s fi @@ -78,7 +78,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_restconf_listkey.sh b/test/test_restconf_listkey.sh index 24571e4d..ee778a4a 100755 --- a/test/test_restconf_listkey.sh +++ b/test/test_restconf_listkey.sh @@ -71,7 +71,7 @@ if [ $BE -ne 0 ]; then if [ $? -ne 0 ]; then err fi - sudo pkill clixon_backend # to be sure + sudo pkill -f clixon_backend # to be sure new "start backend -s init -f $cfg" start_backend -s init -f $cfg @@ -81,7 +81,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_restconf_patch.sh b/test/test_restconf_patch.sh index afb5510e..6facdc0c 100755 --- a/test/test_restconf_patch.sh +++ b/test/test_restconf_patch.sh @@ -100,7 +100,7 @@ if [ $BE -ne 0 ]; then if [ $? -ne 0 ]; then err fi - sudo pkill clixon_backend # to be sure + sudo pkill -f clixon_backend # to be sure new "start backend -s startup -f $cfg" start_backend -s startup -f $cfg fi @@ -109,7 +109,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon (-a is enable basic authentication)" start_restconf -f $cfg -- -a diff --git a/test/test_restconf_startup.sh b/test/test_restconf_startup.sh index e9fa9326..5aaeb4da 100755 --- a/test/test_restconf_startup.sh +++ b/test/test_restconf_startup.sh @@ -65,7 +65,7 @@ testrun(){ wait_backend new "kill old restconf daemon" - sudo pkill -u $wwwuser clixon_restconf + sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg -y $fyang $option diff --git a/test/test_rpc.sh b/test/test_rpc.sh index 1aaa5ee6..4174e37e 100755 --- a/test/test_rpc.sh +++ b/test/test_rpc.sh @@ -47,7 +47,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_stream.sh b/test/test_stream.sh index 27fafd1a..280f84fa 100755 --- a/test/test_stream.sh +++ b/test/test_stream.sh @@ -118,7 +118,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_submodule.sh b/test/test_submodule.sh index 7ee65882..823de222 100755 --- a/test/test_submodule.sh +++ b/test/test_submodule.sh @@ -163,7 +163,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_upgrade_auto.sh b/test/test_upgrade_auto.sh index 0dabb323..0169f29c 100755 --- a/test/test_upgrade_auto.sh +++ b/test/test_upgrade_auto.sh @@ -259,7 +259,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_upgrade_interfaces.sh b/test/test_upgrade_interfaces.sh index 20d071a7..169e5cab 100755 --- a/test/test_upgrade_interfaces.sh +++ b/test/test_upgrade_interfaces.sh @@ -270,7 +270,7 @@ testrun(){ wait_backend new "kill old restconf daemon" - sudo pkill -u $wwwuser clixon_restconf + sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_upgrade_repair.sh b/test/test_upgrade_repair.sh index 9f01b0fe..bb0a3301 100755 --- a/test/test_upgrade_repair.sh +++ b/test/test_upgrade_repair.sh @@ -117,7 +117,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg diff --git a/test/test_yang_namespace.sh b/test/test_yang_namespace.sh index 60d49b1b..6c700a74 100755 --- a/test/test_yang_namespace.sh +++ b/test/test_yang_namespace.sh @@ -80,7 +80,7 @@ new "waiting" wait_backend new "kill old restconf daemon" -sudo pkill -u $wwwuser clixon_restconf +sudo pkill -u $wwwuser -f clixon_restconf new "start restconf daemon" start_restconf -f $cfg