summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-11-23 00:02:33 +0100
committerStefan Metzmacher <metze@samba.org>2012-12-03 08:48:24 +0100
commitf7dca55224af2cb2ac172831755246f5c9b04e0f (patch)
tree4662e27aa81a06e30fbfe62ab69978f812e9b753 /selftest
parent4210e08109d9bc24168740f5a8a52953c532df4a (diff)
downloadsamba-f7dca55224af2cb2ac172831755246f5c9b04e0f.tar.gz
samba-f7dca55224af2cb2ac172831755246f5c9b04e0f.tar.bz2
samba-f7dca55224af2cb2ac172831755246f5c9b04e0f.zip
selftest:Samba3: call wait_for_start() from check_or_start()
...instead of calling the two one after another each time. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'selftest')
-rwxr-xr-xselftest/target/Samba3.pm31
1 files changed, 9 insertions, 22 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 04fe8ee6cf..6e45159f0e 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -201,10 +201,7 @@ sub setup_s3dc($$)
$vars or return undef;
- $self->check_or_start($vars,
- "yes", "yes", "yes");
-
- if (not $self->wait_for_start($vars)) {
+ if (not $self->check_or_start($vars, "yes", "yes", "yes")) {
return undef;
}
@@ -247,9 +244,7 @@ sub setup_member($$$)
return undef;
}
- $self->check_or_start($ret, "yes", "yes", "yes");
-
- if (not $self->wait_for_start($ret)) {
+ if (not $self->check_or_start($ret, "yes", "yes", "yes")) {
return undef;
}
@@ -320,10 +315,9 @@ sub setup_admember($$$$)
# access the share for tests.
chmod 0777, "$prefix/share";
- $self->check_or_start($ret,
- "yes", "yes", "yes");
-
- $self->wait_for_start($ret);
+ if (not $self->check_or_start($ret, "yes", "yes", "yes")) {
+ return undef;
+ }
$ret->{DC_SERVER} = $dcvars->{SERVER};
$ret->{DC_SERVER_IP} = $dcvars->{SERVER_IP};
@@ -364,9 +358,7 @@ sub setup_simpleserver($$)
$vars or return undef;
- $self->check_or_start($vars, "yes", "no", "yes");
-
- if (not $self->wait_for_start($vars)) {
+ if (not $self->check_or_start($vars, "yes", "no", "yes")) {
return undef;
}
@@ -462,9 +454,7 @@ $ret->{USERNAME} = KTEST\\Administrator
# access the share for tests.
chmod 0777, "$prefix/share";
- $self->check_or_start($ret, "yes", "no", "yes");
-
- if (not $self->wait_for_start($ret)) {
+ if (not $self->check_or_start($ret, "yes", "no", "yes")) {
return undef;
}
return $ret;
@@ -487,10 +477,7 @@ map to guest = bad user
$vars or return undef;
- $self->check_or_start($vars,
- "yes", "no", "yes");
-
- if (not $self->wait_for_start($vars)) {
+ if (not $self->check_or_start($vars, "yes", "no", "yes")) {
return undef;
}
@@ -688,7 +675,7 @@ sub check_or_start($$$$$) {
close(STDIN_READER);
- return 0;
+ return $self->wait_for_start($env_vars);
}
sub provision($$$$$$)