From: Douglas Bagnall Date: Sat, 7 Dec 2019 09:48:42 +0000 (+1300) Subject: selftest/s4: don't put pcap file in / by default X-Git-Tag: ldb-2.1.1~201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18efb47a8ff8b3e9251f9b2df8ef18b571ee1807;p=thirdparty%2Fsamba.git selftest/s4: don't put pcap file in / by default If the SOCKET_WRAPPER_PCAP_DIR is not defined, let's assume it wasn't wanted rather than choosing /. Signed-off-by: Douglas Bagnall Reviewed-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 91e0878681a..e1e3af16e37 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -323,10 +323,14 @@ sub setup_dns_hub_internal($$$) FULL_CMD => [ @full_cmd ], LOG_FILE => $env->{DNS_HUB_LOG}, TEE_STDOUT => 1, - PCAP_FILE => "$ENV{SOCKET_WRAPPER_PCAP_DIR}/env-$hostname$.pcap", ENV_VARS => {}, }; + my $pcap_dir = $ENV{SOCKET_WRAPPER_PCAP_DIR}; + if (defined $pcap_dir) { + $daemon_ctx->{PCAP_FILE} = "$pcap_dir/env-$hostname$.pcap", + } + # use a pipe for stdin in the child processes. This allows # those processes to monitor the pipe for EOF to ensure they # exit when the test script exits