diff --git a/test/cicd/cicd.sh b/test/cicd/cicd.sh
index ac5bcbb8..ea3ecc00 100755
--- a/test/cicd/cicd.sh
+++ b/test/cicd/cicd.sh
@@ -55,3 +55,4 @@ else
ssh -t $h sudo systemctl stop nginx
fi
ssh -t $h "(cd src/clixon/test; ./sum.sh)"
+exit 0
diff --git a/test/test_copy_config.sh b/test/test_copy_config.sh
index 7e42bf37..24d518b5 100755
--- a/test/test_copy_config.sh
+++ b/test/test_copy_config.sh
@@ -180,6 +180,11 @@ expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+xml
new "Check running empty"
expecteof "$clixon_netconf -qf $cfg" 0 "]]>]]>" "^]]>]]>$"
+if [ $RC -ne 0 ]; then
+ new "Kill restconf daemon"
+ stop_restconf
+fi
+
if [ $BE -ne 0 ]; then
new "Kill backend"
# Check if premature kill
@@ -194,4 +199,7 @@ fi
# Set by restconf_config
unset RESTCONFIG
+new "Endtest"
+endtest
+
rm -rf $dir
diff --git a/test/test_identity.sh b/test/test_identity.sh
index 39719734..a5fb9960 100755
--- a/test/test_identity.sh
+++ b/test/test_identity.sh
@@ -334,9 +334,10 @@ if [ $BE -eq 0 ]; then
stop_backend -f $cfg
fi
-endtest
-
# Set by restconf_config
unset RESTCONFIG
+new "Endtest"
+endtest
+
rm -rf $dir
diff --git a/test/test_netconf_ssh_callhome.sh b/test/test_netconf_ssh_callhome.sh
index f621c128..f7b4d471 100755
--- a/test/test_netconf_ssh_callhome.sh
+++ b/test/test_netconf_ssh_callhome.sh
@@ -4,12 +4,18 @@
# Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
-# Skip it no openssh
+# Skip it if no openssh
if ! [ -x "$(command -v ssh)" ]; then
echo "...ssh not installed"
if [ "$s" = $0 ]; then exit 0; else return 0; fi # skip
fi
+# Dont run this test with valgrind
+if [ $valgrindtest -ne 0 ]; then
+ echo "...skipped "
+ return 0 # skip
+fi
+
: ${clixon_netconf_ssh_callhome:="clixon_netconf_ssh_callhome"}
: ${clixon_netconf_ssh_callhome_client:="clixon_netconf_ssh_callhome_client"}
@@ -65,16 +71,19 @@ cp $key.pub $authfile
# The result is not checked, only the client-side
function callhomefn()
{
- sleep 1
-
- cat<$sshdcfg
+ cat<$sshdcfg
PasswordAuthentication no
AuthorizedKeysFile $authfile
EOF
+ sleep 1 # There may be a far-fetched race condition here if this is too early
+
new "Start Callhome in background"
- echo "sudo clixon_netconf_ssh_callhome} -D 1 -a 127.0.0.1 -C $sshdcfg -c $cfg"
- expectpart "$(sudo ${clixon_netconf_ssh_callhome} -D 1 -a 127.0.0.1 -C $sshdcfg -c $cfg)" 255 ""
+ # sudo does not look in /usr/local/bin on eg cento8
+ cmd=$(which ${clixon_netconf_ssh_callhome})
+ echo "sudo ${cmd} -D 1 -a 127.0.0.1 -C $sshdcfg -c $cfg"
+ expectpart "$(sudo ${cmd} -D 1 -a 127.0.0.1 -C $sshdcfg -c $cfg)" 255 ""
+
rm -f $authfile
}
@@ -111,6 +120,7 @@ callhomefn &
cat< $dir/knownhosts
. $(cat /etc/ssh/ssh_host_ed25519_key.pub)
+. $(cat /etc/ssh/ssh_host_ecdsa_key.pub)
EOF
cat< $sshcfg
StrictHostKeyChecking yes
@@ -119,7 +129,7 @@ HashKnownHosts no
EOF
new "Start Listener client"
-echo "ssh -s -v -i $key -o ProxyUseFdpass=yes -o ProxyCommand=\"clixon_netconf_ssh_callhome_client -a 127.0.0.1\" . netconf"
+echo "ssh -s -F $sshcfg -v -i $key -o ProxyUseFdpass=yes -o ProxyCommand=\"clixon_netconf_ssh_callhome_client -a 127.0.0.1\" . netconf"
#-F $sshcfg
expectpart "$(ssh -s -F $sshcfg -v -i $key -o ProxyUseFdpass=yes -o ProxyCommand="${clixon_netconf_ssh_callhome_client} -a 127.0.0.1" . netconf < $rpccmd)" 0 "urn:ietf:params:netconf:base:1.0urn:ietf:params:netconf:capability:yang-library:1.0?revision=2019-01-04&module-set-id=42urn:ietf:params:netconf:capability:candidate:1.0urn:ietf:params:netconf:capability:validate:1.1urn:ietf:params:netconf:capability:startup:1.0urn:ietf:params:netconf:capability:xpath:1.0urn:ietf:params:netconf:capability:notification:1.02]]>]]>" "]]>]]>"
diff --git a/test/test_privileges.sh b/test/test_privileges.sh
index d94db0b2..71afe999 100755
--- a/test/test_privileges.sh
+++ b/test/test_privileges.sh
@@ -12,6 +12,7 @@ APPNAME=example
cfg=$dir/conf_startup.xml
+# Dont run this test with valgrind
if [ $valgrindtest -ne 0 ]; then
echo "...skipped "
return 0 # skip