1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

selftest:Samba4: report when samba is started and ready

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2019-01-30 13:44:04 +01:00 committed by Andrew Bartlett
parent 19f34b2161
commit b988695ed7

View File

@ -217,9 +217,9 @@ sub wait_for_start($$)
$count++;
} while ($ret != 0 && $count < 20);
if ($count == 20) {
warn("nbt not reachable after 20 retries\n");
teardown_env($self, $testenv_vars);
return 0;
warn("nbt not reachable after 20 retries\n");
return -1;
}
# Ensure we have the first RID Set before we start tests. This makes the tests more reliable.
@ -254,10 +254,11 @@ sub wait_for_start($$)
while (system("$cmd >/dev/null") != 0) {
$count++;
if ($count > $max_wait) {
teardown_env($self, $testenv_vars);
warn("Timed out ($max_wait sec) waiting for working LDAP and a RID Set to be allocated by $testenv_vars->{NETBIOSNAME} PID $testenv_vars->{SAMBA_PID}");
$ret = -1;
last;
return -1;
}
print "Waiting for working LDAP...\n";
sleep(1);
}
}
@ -278,14 +279,16 @@ sub wait_for_start($$)
$count++;
} while ($ret != 0 && $count < 20);
if ($count == 20) {
warn("winbind not reachable after 20 retries\n");
teardown_env($self, $testenv_vars);
return 0;
warn("winbind not reachable after 20 retries\n");
return -1;
}
print $self->getlog_env($testenv_vars);
return $ret
print "READY ($testenv_vars->{SAMBA_PID})\n";
return 0
}
sub write_ldb_file($$$)