From 18efb47a8ff8b3e9251f9b2df8ef18b571ee1807 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sat, 7 Dec 2019 22:48:42 +1300 Subject: [PATCH] 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 --- selftest/target/Samba4.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.47.2