diff options
author | Michael Adam <obnox@samba.org> | 2012-11-23 00:18:44 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-12-03 08:48:24 +0100 |
commit | 11ca06338670c3aa1ad6928232f2c582116f42e8 (patch) | |
tree | f0baac8c36879a4620f4c937fdf092b84c88b55b /selftest/target | |
parent | 5b975ce78cc77bd9ff39e2ec0c2e7d674bf61ebe (diff) | |
download | samba-11ca06338670c3aa1ad6928232f2c582116f42e8.tar.gz samba-11ca06338670c3aa1ad6928232f2c582116f42e8.tar.bz2 samba-11ca06338670c3aa1ad6928232f2c582116f42e8.zip |
selftest:Samba3: add "wbinfo -p" test to wait_for_start()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'selftest/target')
-rwxr-xr-x | selftest/target/Samba3.pm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index bd277d22ad..99f126c96d 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1097,6 +1097,7 @@ domadmins:X:$gid_domadmins: sub wait_for_start($$$$$) { my ($self, $envvars, $nmbd, $winbindd, $smbd) = @_; + my $ret; if ($nmbd eq "yes") { # give time for nbt server to register its names @@ -1111,12 +1112,28 @@ sub wait_for_start($$$$$) system("$nmblookup $envvars->{CONFIGURATION} $envvars->{SERVER}"); } + if ($winbindd eq "yes") { + print "checking for winbindd\n"; + my $count = 0; + do { + $ret = system("WINBINDD_SOCKET_DIR=" . $envvars->{WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "wbinfo") . " -p"); + if ($ret != 0) { + sleep(2); + } + $count++; + } while ($ret != 0 && $count < 10); + if ($count == 10) { + print "WINBINDD not reachable after 20 seconds\n"; + teardown_env($self, $envvars); + return 0; + } + } + if ($smbd eq "yes") { # make sure smbd is also up set print "wait for smbd\n"; my $count = 0; - my $ret; do { $ret = system(Samba::bindir_path($self, "smbclient3") ." $envvars->{CONFIGURATION} -L $envvars->{SERVER} -U% -p 139"); if ($ret != 0) { |