diff --git a/tests/kdc/check-digest.in b/tests/kdc/check-digest.in index f2f3c0ab9..5e7027ed8 100644 --- a/tests/kdc/check-digest.in +++ b/tests/kdc/check-digest.in @@ -88,10 +88,10 @@ echo $password > ${objdir}/foopassword echo Starting kdc ${kdc} & kdcpid=$! -sleep 20 -if tail -1 messages.log | grep "No sockets" ; then - echo "The KDC failed to bind to any sockets, another KDC running ?" +sh ${srcdir}/wait-kdc.sh +if [ "$?" != 0 ] ; then + kill ${kdcpid} exit 1 fi diff --git a/tests/kdc/check-kdc.in b/tests/kdc/check-kdc.in index 049e9b773..7c53f3a66 100644 --- a/tests/kdc/check-kdc.in +++ b/tests/kdc/check-kdc.in @@ -129,10 +129,10 @@ echo foo > ${objdir}/foopassword echo Starting kdc ${kdc} & kdcpid=$! -sleep 20 -if tail -1 messages.log | grep "No sockets" ; then - echo "The KDC failed to bind to any sockets, another KDC running ?" +sh ${srcdir}/wait-kdc.sh +if [ "$?" != 0 ] ; then + kill ${kdcpid} exit 1 fi