summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Richardson <mcr@sandelman.ca>2020-02-11 18:34:21 +0100
committerMichael Richardson <mcr@sandelman.ca>2020-02-11 18:39:48 +0100
commit8cb2735a6eb294f71748956551a58395867b6376 (patch)
treecf1322cab91e2c843ef7dc1d23ef3e6eb795b55c
parent3818ac5579db061dce4c8c573044c9929617f0f9 (diff)
downloadtcpdump-add-program-name-option.tar.gz
set -# -n standard arguments for default tcpdump program onlyadd-program-name-option
-rwxr-xr-xtests/TESTrun7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/TESTrun b/tests/TESTrun
index c5591c5d..b668ac83 100755
--- a/tests/TESTrun
+++ b/tests/TESTrun
@@ -63,6 +63,9 @@ sub runtest {
if(defined($opt->{'program'})) {
$program= $opt->{'program'};
+ } else {
+ # setup default arguments for tcpdump
+ $args = $args . " -# -n"
}
if(defined($opt->{'input'})) {
@@ -80,13 +83,13 @@ sub runtest {
my $errdiffstat = 0;
if ($^O eq 'MSWin32') {
- $r = system "${program} -# -n -r $input $args 2>NUL | sed 's/\\r//' | tee tests/NEW/$outputbase | diff $output - >tests/DIFF/$outputbase.diff";
+ $r = system "${program} $args 2>NUL | sed 's/\\r//' | tee tests/NEW/$outputbase | diff $output - >tests/DIFF/$outputbase.diff";
# need to do same as below for Cygwin.
}
else {
# we used to do this as a nice pipeline, but the problem is that $r fails to
# to be set properly if the tcpdump core dumps.
- $r = system "${program} 2>${rawstderrlog} -# -n $args >tests/NEW/${outputbase}";
+ $r = system "${program} 2>${rawstderrlog} $args >tests/NEW/${outputbase}";
if($r == -1) {
# failed to start due to error.
$status = $!;