1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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 <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2019-12-07 22:48:42 +13:00 committed by Andrew Bartlett
parent 7a65a26a2f
commit 18efb47a8f

View File

@ -323,10 +323,14 @@ sub setup_dns_hub_internal($$$)
FULL_CMD => [ @full_cmd ], FULL_CMD => [ @full_cmd ],
LOG_FILE => $env->{DNS_HUB_LOG}, LOG_FILE => $env->{DNS_HUB_LOG},
TEE_STDOUT => 1, TEE_STDOUT => 1,
PCAP_FILE => "$ENV{SOCKET_WRAPPER_PCAP_DIR}/env-$hostname$.pcap",
ENV_VARS => {}, 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 # use a pipe for stdin in the child processes. This allows
# those processes to monitor the pipe for EOF to ensure they # those processes to monitor the pipe for EOF to ensure they
# exit when the test script exits # exit when the test script exits