From 4603351544138f64e7c80ebda2eeb126bdd15d94 Mon Sep 17 00:00:00 2001 From: Tim Beale Date: Thu, 31 Jan 2019 13:12:43 +1300 Subject: [PATCH] selftest: Make process_model argument optional in check_or_start() 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 Reviewed-by: Andrew Bartlett --- selftest/target/Samba4.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index d4aa2f232157..b4f3cab3abf9 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -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"; -- 2.34.1