summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2019-01-17 23:50:45 +0100
committerKarolin Seeger <kseeger@samba.org>2019-02-05 15:33:26 +0100
commit103600771227e074b46038f1bbb5a345c786d0b9 (patch)
tree665bd882a32c9512db6167453abd8f35c4fe897c /selftest
parent37b9360c714f1913e5107a5882d551bc35a20b24 (diff)
downloadsamba-103600771227e074b46038f1bbb5a345c786d0b9.tar.gz
selftest:Samba4: use 'smbcontrol samba shutdown'
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13752 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Baumbach <bbaumbach@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jan 30 01:51:48 CET 2019 on sn-devel-144 (cherry picked from commit d03991f569b54ae0a11911b622107fbae701715d)
Diffstat (limited to 'selftest')
-rwxr-xr-xselftest/target/Samba4.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index d6d67f5a5ab..264eaf35007 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -1983,6 +1983,15 @@ sub teardown_env_terminate($$)
my $pid;
# This should cause samba to terminate gracefully
+ my $smbcontrol = Samba::bindir_path($self, "smbcontrol");
+ my $cmd = "";
+ $cmd .= "$smbcontrol samba shutdown $envvars->{CONFIGURATION}";
+ my $ret = system($cmd);
+ if ($ret != 0) {
+ warn "'$cmd' failed with '$ret'\n";
+ }
+
+ # This should cause samba to terminate gracefully
close($envvars->{STDIN_PIPE});
$pid = $envvars->{SAMBA_PID};