mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
selftest: Print dns_update_cache path into the logs
This sometimes get stuck in a loop and this may help debug it. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jul 8 12:44:49 UTC 2021 on sn-devel-184
This commit is contained in:
parent
5101269270
commit
595d12ca7b
@ -204,28 +204,29 @@ sub wait_for_start($$)
|
||||
# Ensure we registered all our names
|
||||
if ($testenv_vars->{SERVER_ROLE} eq "domain controller") {
|
||||
my $max_wait = 120;
|
||||
print "Waiting for dns_update_cache to be created.\n";
|
||||
my $dns_update_cache = "$testenv_vars->{PRIVATEDIR}/dns_update_cache";
|
||||
print "Waiting for $dns_update_cache to be created.\n";
|
||||
$count = 0;
|
||||
while (not -e "$testenv_vars->{PRIVATEDIR}/dns_update_cache") {
|
||||
while (not -e $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}");
|
||||
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";
|
||||
print "Waiting for $dns_update_cache to be created...\n";
|
||||
sleep(1);
|
||||
}
|
||||
print "Waiting for dns_update_cache to be filled.\n";
|
||||
print "Waiting for $dns_update_cache to be filled.\n";
|
||||
$count = 0;
|
||||
while ((-s "$testenv_vars->{PRIVATEDIR}/dns_update_cache") == 0) {
|
||||
while ((-s "$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}");
|
||||
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";
|
||||
print "Waiting for $dns_update_cache to be filled...\n";
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user