components/tcpdump/patches/system-test.patch
author Rich Burridge <rich.burridge@oracle.com>
Fri, 17 Feb 2017 12:07:20 -0800
changeset 7674 e5be4a3b0c32
parent 7383 93f1d98a66f9
permissions -rw-r--r--
25466336 Update tcpdump to version 4.9.0 25466334 problem in UTILITY/TCPDUMP
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7383
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
Patch to allow us to specify an alternate tcpdump binary when running tests.
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
This patch should be sent upstream.
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
7674
e5be4a3b0c32 25466336 Update tcpdump to version 4.9.0
Rich Burridge <rich.burridge@oracle.com>
parents: 7383
diff changeset
     5
--- tcpdump-4.9.0/tests/TESTonce.orig	2017-01-29 12:52:49.752631716 +0000
e5be4a3b0c32 25466336 Update tcpdump to version 4.9.0
Rich Burridge <rich.burridge@oracle.com>
parents: 7383
diff changeset
     6
+++ tcpdump-4.9.0/tests/TESTonce	2017-01-29 14:48:33.249452168 +0000
7383
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
@@ -1,5 +1,7 @@
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
 #!/usr/bin/env perl
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
 
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
+$TCPDUMP = "../tcpdump" if (!($TCPDUMP = $ENV{TCPDUMP_BIN}));
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
+
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
 system("mkdir -p NEW DIFF");
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
 
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
 if(@ARGV != 4) {
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
@@ -21,7 +23,7 @@
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
 else {
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
     # we used to do this as a nice pipeline, but the problem is that $r fails to
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
     # to be set properly if the tcpdump core dumps.
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
-    $r = system "../tcpdump 2>/dev/null -n -r $input $options >NEW/$output";
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
+    $r = system "$TCPDUMP 2>/dev/null -n -r $input $options >NEW/$output";
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
     if($r == 0x100) {
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
         # this means tcpdump exited with code 1.
93f1d98a66f9 19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
         open(OUTPUT, ">>"."NEW/$output") || die "fail to open $output\n";