selftest: check for smbd on a 1-second basis.
authorMichael Adam <obnox@samba.org>
Tue, 12 Jul 2016 11:16:27 +0000 (13:16 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 12 Jul 2016 15:49:19 +0000 (17:49 +0200)
Chance to reduce the overall time spent in checking for smbd

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
selftest/target/Samba3.pm

index 60300f880c2fd010d4eb0f499894bf730a5b25e3..4e3169dc10725c430a14707c9afcef45e98cb4e0 100755 (executable)
@@ -1907,11 +1907,11 @@ sub wait_for_start($$$$$)
            do {
                $ret = system(Samba::bindir_path($self, "smbclient") ." $envvars->{CONFIGURATION} -L $envvars->{SERVER} -U% -p 139");
                if ($ret != 0) {
-                   sleep(2);
+                   sleep(1);
                }
                $count++
-           } while ($ret != 0 && $count < 10);
-           if ($count == 10) {
+           } while ($ret != 0 && $count < 20);
+           if ($count == 20) {
                print "SMBD failed to start up in a reasonable time (20sec)\n";
                teardown_env($self, $envvars);
                return 0;