From c54c5729a77f7f6f3e52c174d7b428740c3dd9e0 Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Fri, 16 Feb 2024 10:01:31 -0500 Subject: [PATCH] [#3230] Added UT to BPF filter modified: tests/pkt_filter_bpf_unittest.cc --- src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc b/src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc index 123976055e..83edf9ace4 100644 --- a/src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc +++ b/src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc @@ -47,6 +47,14 @@ TEST_F(PktFilterBPFTest, isDirectResponseSupported) { EXPECT_TRUE(pkt_filter.isDirectResponseSupported()); } +// This test verifies that the PktFilterBPF class reports its capability +// to create SOCKET_RECEIVED events. +TEST_F(PktFilterBPFTest, isSocketReceivedTimeSupported) { + // Create object under test. + PktFilterBPF pkt_filter; + EXPECT_TRUE(pkt_filter.isSocketReceivedTimeSupported()); +} + // All tests below require root privileges to execute successfully. If they // are run as non-root they will be skipped via SKIP_IF(notRoot()).