From: Guy Harris Date: Sun, 30 Jan 2022 08:00:33 +0000 (-0800) Subject: Run the test that fails on OpenBSD only if we're not on OpenBSD. X-Git-Tag: tcpdump-4.99.2~137 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/8f9a8c908885c47da31afca632ae59c62ec09035 Run the test that fails on OpenBSD only if we're not on OpenBSD. 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. (cherry picked from commit 1e368720c0d85de68c205b9458e4d8c6f257faf1) --- diff --git a/tests/TESTrun b/tests/TESTrun index cca46e63..1843bc58 100755 --- a/tests/TESTrun +++ b/tests/TESTrun @@ -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; } diff --git a/tests/non-bsd.tests b/tests/non-bsd.tests index e18bace0..f44610eb 100644 --- a/tests/non-bsd.tests +++ b/tests/non-bsd.tests @@ -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',