From 103600771227e074b46038f1bbb5a345c786d0b9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 17 Jan 2019 23:50:45 +0100 Subject: [PATCH] selftest:Samba4: use 'smbcontrol samba shutdown' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=13752 Signed-off-by: Stefan Metzmacher Reviewed-by: Björn Baumbach Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jan 30 01:51:48 CET 2019 on sn-devel-144 (cherry picked from commit d03991f569b54ae0a11911b622107fbae701715d) --- selftest/target/Samba4.pm | 9 +++++++++ 1 file changed, 9 insertions(+) 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}; -- 2.11.4.GIT