summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'selftest')
-rw-r--r--selftest/target/Samba3.pm33
-rw-r--r--selftest/target/Samba4.pm8
2 files changed, 20 insertions, 21 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 2b96226355..0b176d601c 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -126,9 +126,8 @@ sub setup_dc($$)
$dc_options);
$self->check_or_start($vars,
- ($ENV{NMBD_MAXTIME} or 2700),
- ($ENV{WINBINDD_MAXTIME} or 2700),
- ($ENV{SMBD_MAXTIME} or 2700));
+ ($ENV{SMBD_MAXTIME} or 2700),
+ "yes", "yes", "yes");
$self->wait_for_start($vars);
@@ -145,6 +144,7 @@ sub setup_member($$$)
my $member_options = "
security = domain
+ server signing = on
";
my $ret = $self->provision($prefix,
"LOCALMEMBER3",
@@ -163,9 +163,8 @@ sub setup_member($$$)
system($cmd) == 0 or die("Join failed\n$cmd");
$self->check_or_start($ret,
- ($ENV{NMBD_MAXTIME} or 2700),
- ($ENV{WINBINDD_MAXTIME} or 2700),
- ($ENV{SMBD_MAXTIME} or 2700));
+ ($ENV{SMBD_MAXTIME} or 2700),
+ "yes", "yes", "yes");
$self->wait_for_start($ret);
@@ -212,8 +211,8 @@ sub read_pid($$)
return $pid;
}
-sub check_or_start($$$$) {
- my ($self, $env_vars, $nmbd_maxtime, $winbindd_maxtime, $smbd_maxtime) = @_;
+sub check_or_start($$$$$) {
+ my ($self, $env_vars, $maxtime, $nmbd, $winbindd, $smbd) = @_;
unlink($env_vars->{NMBD_TEST_LOG});
print "STARTING NMBD...";
@@ -229,13 +228,13 @@ sub check_or_start($$$$) {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
$ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
- if ($nmbd_maxtime eq "skip") {
+ if ($nmbd ne "yes") {
$SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
my $signame = shift;
print("Skip nmbd received signal $signame");
exit 0;
};
- sleep(999999);
+ sleep($maxtime);
exit 0;
}
@@ -246,7 +245,7 @@ sub check_or_start($$$$) {
$ENV{MAKE_TEST_BINARY} = $self->binpath("nmbd");
- my @preargs = ($self->binpath("timelimit"), $nmbd_maxtime);
+ my @preargs = ($self->binpath("timelimit"), $maxtime);
if(defined($ENV{NMBD_VALGRIND})) {
@preargs = split(/ /, $ENV{NMBD_VALGRIND});
}
@@ -270,13 +269,13 @@ sub check_or_start($$$$) {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
$ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
- if ($winbindd_maxtime eq "skip") {
+ if ($winbindd ne "yes") {
$SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
my $signame = shift;
print("Skip winbindd received signal $signame");
exit 0;
};
- sleep(999999);
+ sleep($maxtime);
exit 0;
}
@@ -287,7 +286,7 @@ sub check_or_start($$$$) {
$ENV{MAKE_TEST_BINARY} = $self->binpath("winbindd");
- my @preargs = ($self->binpath("timelimit"), $winbindd_maxtime);
+ my @preargs = ($self->binpath("timelimit"), $maxtime);
if(defined($ENV{WINBINDD_VALGRIND})) {
@preargs = split(/ /, $ENV{WINBINDD_VALGRIND});
}
@@ -311,13 +310,13 @@ sub check_or_start($$$$) {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
$ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
- if ($smbd_maxtime eq "skip") {
+ if ($smbd ne "yes") {
$SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
my $signame = shift;
print("Skip smbd received signal $signame");
exit 0;
};
- sleep(999999);
+ sleep($maxtime);
exit 0;
}
@@ -326,7 +325,7 @@ sub check_or_start($$$$) {
if (defined($ENV{SMBD_OPTIONS})) {
@optargs = split(/ /, $ENV{SMBD_OPTIONS});
}
- my @preargs = ($self->binpath("timelimit"), $smbd_maxtime);
+ my @preargs = ($self->binpath("timelimit"), $maxtime);
if(defined($ENV{SMBD_VALGRIND})) {
@preargs = split(/ /,$ENV{SMBD_VALGRIND});
}
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 71dddf6939..1058ac66e0 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -103,8 +103,8 @@ sub check_or_start($$$)
SocketWrapper::set_default_iface($env_vars->{SOCKET_WRAPPER_DEFAULT_IFACE});
my $valgrind = "";
- if (defined($ENV{SMBD_VALGRIND})) {
- $valgrind = $ENV{SMBD_VALGRIND};
+ if (defined($ENV{SAMBA_VALGRIND})) {
+ $valgrind = $ENV{SAMBA_VALGRIND};
}
$ENV{KRB5_CONFIG} = $env_vars->{KRB5_CONFIG};
@@ -122,8 +122,8 @@ sub check_or_start($$$)
if (defined($max_time)) {
$optarg = "--maximum-runtime=$max_time ";
}
- if (defined($ENV{SMBD_OPTIONS})) {
- $optarg.= " $ENV{SMBD_OPTIONS}";
+ if (defined($ENV{SAMBA_OPTIONS})) {
+ $optarg.= " $ENV{SAMBA_OPTIONS}";
}
my $samba = $self->bindir_path("samba");
my $ret = system("$valgrind $samba $optarg $env_vars->{CONFIGURATION} -M single -i --leak-report-full");