author | Vladimir Marek <Vladimir.Marek@oracle.com> |
Tue, 17 Jan 2017 11:53:18 +0100 | |
changeset 7596 | 83b4091f7969 |
parent 7383 | 93f1d98a66f9 |
child 7674 | e5be4a3b0c32 |
permissions | -rw-r--r-- |
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 |
|
93f1d98a66f9
19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
--- tcpdump-4.7.4/tests/TESTonce.orig 2016-11-22 07:54:46.080609871 +0000 |
93f1d98a66f9
19921541 "gmake test" failures for tcpdump
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
+++ tcpdump-4.7.4/tests/TESTonce 2016-11-22 09:51:15.439509866 +0000 |
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"; |