From 3ba9ebdab032fa4713d54cce44a3d8835aa7b464 Mon Sep 17 00:00:00 2001 From: William Dauchy Date: Wed, 16 Sep 2020 22:02:27 +0200 Subject: [PATCH] tests, radius-group: fix unstable tests - print outfile instead of new command; this will help debug when an issue occurs, to know what was the original output - also add some time between tests to avoid race; this was failing on "could not find group information" Established DTLS connection (using GnuTLS). Ciphersuite (DTLS1.2)-(PSK)-(AES-256-GCM). inet 192.168.93.190/32 scope global tun0 PING 192.168.93.1 (192.168.93.1) 56(84) bytes of data. 64 bytes from 192.168.93.1: icmp_seq=1 ttl=64 time=0.217 ms 64 bytes from 192.168.93.1: icmp_seq=2 ttl=64 time=0.246 ms 64 bytes from 192.168.93.1: icmp_seq=3 ttl=64 time=0.235 ms --- 192.168.93.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2052ms rtt min/avg/max/mdev = 0.217/0.232/0.246/0.011 ms could not find group information Signed-off-by: William Dauchy --- tests/radius-group | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/radius-group b/tests/radius-group index 77a3f720..ab1c5ed7 100755 --- a/tests/radius-group +++ b/tests/radius-group @@ -106,7 +106,7 @@ if test $? != 0;then exit 1 fi -sleep 3 +sleep 6 ${CMDNS1} ${IP} addr show|grep $(echo ${VPNADDR}|cut -d '.' -f 1-3) if test $? != 0;then @@ -125,7 +125,7 @@ MATCH="Groupname: group2" ${OCCTL} -s ${OCCTL_SOCKET} show user ${USERNAME} >${OUTFILE} 2>&1 grep "${MATCH}" ${OUTFILE} if test $? != 0;then - ${OCCTL} -s ${OCCTL_SOCKET} show user ${USERNAME} + cat ${OUTFILE} echo "could not find group information" exit 1 fi @@ -143,7 +143,7 @@ if test $? != 0;then exit 1 fi -sleep 3 +sleep 6 ${CMDNS1} ${IP} addr show|grep $(echo ${VPNADDR}|cut -d '.' -f 1-3) if test $? != 0;then @@ -156,7 +156,7 @@ MATCH="Groupname: group1" ${OCCTL} -s ${OCCTL_SOCKET} show user ${USERNAME} >${OUTFILE} 2>&1 grep "${MATCH}" ${OUTFILE} if test $? != 0;then - ${OCCTL} -s ${OCCTL_SOCKET} show user ${USERNAME} + cat ${OUTFILE} echo "could not find group information" exit 1 fi