The branch, master has been updated
via eb2637c selftest: Improve check to detect if nmbd is working.
via ed225d7 selftest: Use the actual name of the nmblookup binary.
from fb9d8c4 lib: Remove unused nstrcpy
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit eb2637ccc93b9f385cf34eb998bf3283bb4a4320
Author: Andreas Schneider <[email protected]>
Date: Fri Jul 25 16:45:29 2014 +0200
selftest: Improve check to detect if nmbd is working.
With this change you mostly have to wait only for one second till the
tests get executed instead of ten seconds.
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Michael Adam <[email protected]>
Autobuild-User(master): Michael Adam <[email protected]>
Autobuild-Date(master): Mon Aug 4 17:58:58 CEST 2014 on sn-devel-104
commit ed225d7c490ffde053a4b3c8de60bd7efb528bd0
Author: Andreas Schneider <[email protected]>
Date: Fri Jul 25 16:35:25 2014 +0200
selftest: Use the actual name of the nmblookup binary.
nmblookup3 is just a binary mapping. We shouldn't use the mapping
anymore.
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Michael Adam <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
selftest/target/Samba3.pm | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 6c34dbb..394d637 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1286,16 +1286,31 @@ sub wait_for_start($$$$$)
my $ret;
if ($nmbd eq "yes") {
- # give time for nbt server to register its names
- print "delaying for nbt name registration\n";
- sleep(10);
- # This will return quickly when things are up, but be slow if we
need to wait for (eg) SSL init
- my $nmblookup = Samba::bindir_path($self, "nmblookup3");
- system("$nmblookup $envvars->{CONFIGURATION} -U
$envvars->{SERVER_IP} __SAMBA__");
- system("$nmblookup $envvars->{CONFIGURATION} __SAMBA__");
- system("$nmblookup $envvars->{CONFIGURATION} -U 127.255.255.255
__SAMBA__");
- system("$nmblookup $envvars->{CONFIGURATION} -U
$envvars->{SERVER_IP} $envvars->{SERVER}");
- system("$nmblookup $envvars->{CONFIGURATION} $envvars->{SERVER}");
+ my $count = 0;
+
+ # give time for nbt server to register its names
+ print "checking for nmbd\n";
+
+ # This will return quickly when things are up, but be slow if
we need to wait for (eg) SSL init
+ my $nmblookup = Samba::bindir_path($self, "nmblookup");
+
+ do {
+ $ret = system("$nmblookup $envvars->{CONFIGURATION}
$envvars->{SERVER}");
+ if ($ret != 0) {
+ sleep(1);
+ } else {
+ system("$nmblookup $envvars->{CONFIGURATION} -U
$envvars->{SERVER_IP} __SAMBA__");
+ system("$nmblookup $envvars->{CONFIGURATION}
__SAMBA__");
+ system("$nmblookup $envvars->{CONFIGURATION} -U
127.255.255.255 __SAMBA__");
+ system("$nmblookup $envvars->{CONFIGURATION} -U
$envvars->{SERVER_IP} $envvars->{SERVER}");
+ }
+ $count++;
+ } while ($ret != 0 && $count < 10);
+ if ($count == 10) {
+ print "NMBD not reachable after 10 retries\n";
+ teardown_env($self, $envvars);
+ return 0;
+ }
}
if ($winbindd eq "yes") {
--
Samba Shared Repository