mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
selftest:Samba4: wait for DNS names being registered
We can't reliable start tests without registered dns names. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b988695ed7
commit
8c0853b80c
@ -284,6 +284,35 @@ sub wait_for_start($$)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Ensure we registered all our names
|
||||||
|
if ($testenv_vars->{SERVER_ROLE} eq "domain controller") {
|
||||||
|
my $max_wait = 60;
|
||||||
|
print "Waiting for dns_update_cache to be created.\n";
|
||||||
|
$count = 0;
|
||||||
|
while (not -e "$testenv_vars->{PRIVATEDIR}/dns_update_cache") {
|
||||||
|
$count++;
|
||||||
|
if ($count > $max_wait) {
|
||||||
|
teardown_env($self, $testenv_vars);
|
||||||
|
warn("Timed out ($max_wait sec) waiting for dns_update_cache PID $testenv_vars->{SAMBA_PID}");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
print "Waiting for dns_update_cache to be created...\n";
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
|
print "Waiting for dns_update_cache to be filled.\n";
|
||||||
|
$count = 0;
|
||||||
|
while ((-s "$testenv_vars->{PRIVATEDIR}/dns_update_cache") == 0) {
|
||||||
|
$count++;
|
||||||
|
if ($count > $max_wait) {
|
||||||
|
teardown_env($self, $testenv_vars);
|
||||||
|
warn("Timed out ($max_wait sec) waiting for dns_update_cache PID $testenv_vars->{SAMBA_PID}");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
print "Waiting for dns_update_cache to be filled...\n";
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print $self->getlog_env($testenv_vars);
|
print $self->getlog_env($testenv_vars);
|
||||||
|
|
||||||
print "READY ($testenv_vars->{SAMBA_PID})\n";
|
print "READY ($testenv_vars->{SAMBA_PID})\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user