From: Andrew Bartlett Date: Thu, 23 May 2019 00:20:35 +0000 (+1200) Subject: selftest: Remove infinite client/server loop in srvsvc_NetNameValidate test X-Git-Tag: ldb-2.0.5~653 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=773e476203fcd15a20032d49e3377417ccd237fe;p=thirdparty%2Fsamba.git selftest: Remove infinite client/server loop in srvsvc_NetNameValidate test Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c index f732a99032f..c777f3612e4 100644 --- a/source4/torture/rpc/srvsvc.c +++ b/source4/torture/rpc/srvsvc.c @@ -1109,6 +1109,13 @@ again: if (W_ERROR_IS_OK(r.out.result)) { min = n; n += (max - min + 1)/2; + if (n == min) { + /* + * We did not move, so + * do not loop forever + */ + break; + } continue; } else {