]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: Make process_model argument optional in check_or_start()
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 31 Jan 2019 00:12:43 +0000 (13:12 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 1 Feb 2019 02:36:16 +0000 (03:36 +0100)
It's more realistic to *not* always specify a process-model, and rely on
the samba code to use the correct default. This patch changes selftest
so we only use the -M process-model option if a particular process_model
was specified. Otherwise the testenv will use whatever the default is.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/target/Samba4.pm

index d4aa2f232157fa9986691c4c7d9b2fe10d4c97af..b4f3cab3abf9ec14e3d1a8b37d5d1ae26d8172c1 100755 (executable)
@@ -161,10 +161,13 @@ sub check_or_start($$$)
                        @preargs = split(/ /,$ENV{SAMBA_VALGRIND});
                }
 
+               if (defined($process_model)) {
+                       push @optargs, ("-M", $process_model);
+               }
                close($env_vars->{STDIN_PIPE});
                open STDIN, ">&", $STDIN_READER or die "can't dup STDIN_READER to STDIN: $!";
 
-               exec(@preargs, Samba::bindir_path($self, "samba"), "-M", $process_model, "-i", "--no-process-group", "--maximum-runtime=$self->{server_maxtime}", $env_vars->{CONFIGURATION}, @optargs) or die("Unable to start samba: $!");
+               exec(@preargs, Samba::bindir_path($self, "samba"), "-i", "--no-process-group", "--maximum-runtime=$self->{server_maxtime}", $env_vars->{CONFIGURATION}, @optargs) or die("Unable to start samba: $!");
        }
        $env_vars->{SAMBA_PID} = $pid;
        print "DONE ($pid)\n";