summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-02-04 15:16:42 +0100
committerStefan Metzmacher <metze@samba.org>2009-02-10 11:47:02 +0100
commit76a2d068f5fe6e29ac2506e0d38859a2db8892c4 (patch)
treec0ef6086759ff3be1a9da64c0c691672c887062f
parentbb88b038467284d2ef8bdd7236bc07492b6e22ce (diff)
downloadsamba-76a2d068f5fe6e29ac2506e0d38859a2db8892c4.tar.gz
samba-76a2d068f5fe6e29ac2506e0d38859a2db8892c4.tar.bz2
samba-76a2d068f5fe6e29ac2506e0d38859a2db8892c4.zip
selftest: allow "skip" as max runtime for smbd, nmbd and winbindd
metze
-rw-r--r--selftest/target/Samba3.pm32
1 files changed, 31 insertions, 1 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index fdff4b76e9..e1bea16523 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -187,7 +187,7 @@ sub stop_sig_term($$) {
sub stop_sig_kill($$) {
my ($self, $pid) = @_;
- kill("ALRM", $pid) or warn("Unable to kill $pid: $!");
+ kill("KILL", $pid) or warn("Unable to kill $pid: $!");
}
sub write_pid($$$)
@@ -226,6 +226,16 @@ 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") {
+ $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
+ my $signame = shift;
+ print("Skip nmbd received signal $signame");
+ exit 0;
+ };
+ sleep(999999);
+ exit 0;
+ }
+
my @optargs = ("-d0");
if (defined($ENV{NMBD_OPTIONS})) {
@optargs = split(/ /, $ENV{NMBD_OPTIONS});
@@ -257,6 +267,16 @@ 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") {
+ $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
+ my $signame = shift;
+ print("Skip winbindd received signal $signame");
+ exit 0;
+ };
+ sleep(999999);
+ exit 0;
+ }
+
my @optargs = ("-d0");
if (defined($ENV{WINBINDD_OPTIONS})) {
@optargs = split(/ /, $ENV{WINBINDD_OPTIONS});
@@ -288,6 +308,16 @@ 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") {
+ $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
+ my $signame = shift;
+ print("Skip smbd received signal $signame");
+ exit 0;
+ };
+ sleep(999999);
+ exit 0;
+ }
+
$ENV{MAKE_TEST_BINARY} = $self->binpath("smbd");
my @optargs = ("-d0");
if (defined($ENV{SMBD_OPTIONS})) {