]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Run the test that fails on OpenBSD only if we're not on OpenBSD.
authorGuy Harris <[email protected]>
Sun, 30 Jan 2022 08:00:33 +0000 (00:00 -0800)
committerGuy Harris <[email protected]>
Sun, 30 Jan 2022 08:00:33 +0000 (00:00 -0800)
Don't test whether we have net/if_pflog.h, test whether we're on
OpenBSD; we no longer check for net/if_pflog.h in the configure script,
and that's not a valid "is this OpenBSD?" check in any case, as other
*BSDs have it as well.

tests/TESTrun
tests/non-bsd.tests

index cca46e63084b1234d5d0570fa20618d08ff01be8..1843bc5826239d39cb427f230b196d58862412c6 100755 (executable)
@@ -371,6 +371,13 @@ sub loadconfighash {
     }
     $main::confighhash->{$have_fptype} = 1;
 
+    # and check whether this is OpenBSD, as one test fails in OpenBSD
+    # due to the sad hellscape of low-numbered DLT_ values, due to
+    # 12 meaning "OpenBSD loopback" rather than "raw IP" on OpenBSD
+    if($^O eq "openbsd") {
+        $main::confighhash->{"IS_OPENBSD"} = 1;
+    }
+
     return $main::confighhash;
 }
 
index e18bace01c57fa0279a320b0a2780aa4afdfd826..f44610eb4f66717542ddca5d85c6d63f85418e7d 100644 (file)
@@ -2,9 +2,9 @@
 
 $testlist = [
     # This specific test fails on OpenBSD because the .pcap file uses DLT_RAW,
-    # which OpenBSD treats as DLT_LOOP. The macro is set on all three BSDs.
+    # which OpenBSD treats as DLT_LOOP.
     {
-        config_unset => 'HAVE_NET_IF_PFLOG_H',
+        config_unset => 'IS_OPENBSD',
         name => 'heap-overflow-1',
         input => 'heap-overflow-1.pcap',
         output => 'heap-overflow-1.out',