selftest:Samba4: use 'smbcontrol samba shutdown'
authorStefan Metzmacher <metze@samba.org>
Thu, 17 Jan 2019 22:50:45 +0000 (23:50 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 30 Jan 2019 00:51:48 +0000 (01:51 +0100)
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

selftest/target/Samba4.pm

index f2635e574cdf55a81cba91824331d3b3d11a668e..b662776a84708dba1db72048c7d979111624a0c9 100755 (executable)
@@ -2221,6 +2221,15 @@ sub teardown_env_terminate($$)
        my ($self, $envvars) = @_;
        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});