Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BPFTcFilterTests failing on AL2 x64 and aarch64 #34

Open
fntlnz opened this issue Nov 8, 2021 · 1 comment
Open

BPFTcFilterTests failing on AL2 x64 and aarch64 #34

fntlnz opened this issue Nov 8, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@fntlnz
Copy link
Contributor

fntlnz commented Nov 8, 2021

While working on the CMake porting I noticed that the prog_test_run tests ( BPFTcFilterTests ) for AL2 both on ARM and are having failures.

Initially the failures I noticed were related to the BPF filesystem not being mounted, after solving that there was the problem with map names solved in #33 - 5 tests are still failing, I'm not sure yet if it's a problem related to the tests themselves or if it is related to the program. This needs investigation.

Here's a dump of the test output when it fails.

Running main() from /var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/contrib/googletest/googletest/src/gtest_main.cc
[==========] Running 14 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 14 tests from BPFTcFilterTests
[ RUN      ] BPFTcFilterTests.TestAllowArpPacket
/var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/GPL/HostIsolation/TcFilter/BPFTcFilterTests.cpp:150: Failure
Value of: bpf_prog_test_run_xattr(&tattr)
  Actual: true
Expected: false
[  FAILED  ] BPFTcFilterTests.TestAllowArpPacket (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropUnsupportedPackets
/var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/GPL/HostIsolation/TcFilter/BPFTcFilterTests.cpp:189: Failure
Value of: bpf_prog_test_run_xattr(&tattr)
  Actual: true
Expected: false
[  FAILED  ] BPFTcFilterTests.TestDropUnsupportedPackets (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropIPV6Packets
/var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/GPL/HostIsolation/TcFilter/BPFTcFilterTests.cpp:229: Failure
Value of: bpf_prog_test_run_xattr(&tattr)
  Actual: true
Expected: false
[  FAILED  ] BPFTcFilterTests.TestDropIPV6Packets (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropInvalidHeaderLength
[       OK ] BPFTcFilterTests.TestDropInvalidHeaderLength (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropFragmentedPacket
[       OK ] BPFTcFilterTests.TestDropFragmentedPacket (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowUDPPacketDNSPortSource
[       OK ] BPFTcFilterTests.TestAllowUDPPacketDNSPortSource (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowUDPPacketDNSPortDest
[       OK ] BPFTcFilterTests.TestAllowUDPPacketDNSPortDest (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowUDPPacketDHCPClient
[       OK ] BPFTcFilterTests.TestAllowUDPPacketDHCPClient (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowUDPPacketDHCPServer
[       OK ] BPFTcFilterTests.TestAllowUDPPacketDHCPServer (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropUnknownUDPPackets
[       OK ] BPFTcFilterTests.TestDropUnknownUDPPackets (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropUnknownTCPDestination
[       OK ] BPFTcFilterTests.TestDropUnknownTCPDestination (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowTCPAddressInAllowedIPs
/var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/GPL/HostIsolation/TcFilter/BPFTcFilterTests.cpp:517: Failure
Expected equality of these values:
  ret
    Which is: -1
  0
[  FAILED  ] BPFTcFilterTests.TestAllowTCPAddressInAllowedIPs (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropUnknownICMPDestination
[       OK ] BPFTcFilterTests.TestDropUnknownICMPDestination (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowICMPAddressInAllowedIPs
/var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/GPL/HostIsolation/TcFilter/BPFTcFilterTests.cpp:589: Failure
Expected equality of these values:
  ret
    Which is: -1
  0
[  FAILED  ] BPFTcFilterTests.TestAllowICMPAddressInAllowedIPs (0 ms)
[----------] 14 tests from BPFTcFilterTests (2 ms total)

[----------] Global test environment tear-down
[==========] 14 tests from 1 test suite ran. (2 ms total)
[  PASSED  ] 9 tests.
[  FAILED  ] 5 tests, listed below:
[  FAILED  ] BPFTcFilterTests.TestAllowArpPacket
[  FAILED  ] BPFTcFilterTests.TestDropUnsupportedPackets
[  FAILED  ] BPFTcFilterTests.TestDropIPV6Packets
[  FAILED  ] BPFTcFilterTests.TestAllowTCPAddressInAllowedIPs
[  FAILED  ] BPFTcFilterTests.TestAllowICMPAddressInAllowedIPs

 5 FAILED TESTS
@fntlnz fntlnz added the bug Something isn't working label Nov 8, 2021
@fntlnz
Copy link
Contributor Author

fntlnz commented Nov 8, 2021

Fixed 2 out of 5 broken tests by unpinning the maps before the next execution (was a bug in BPFTcFilterTests).

Still three to go.

Running main() from /var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/contrib/googletest/googletest/src/gtest_main.cc
[==========] Running 14 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 14 tests from BPFTcFilterTests
[ RUN      ] BPFTcFilterTests.TestAllowArpPacket
/var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/GPL/HostIsolation/TcFilter/BPFTcFilterTests.cpp:158: Failure
Value of: bpf_prog_test_run_xattr(&tattr)
  Actual: true
Expected: false
[  FAILED  ] BPFTcFilterTests.TestAllowArpPacket (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropUnsupportedPackets
/var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/GPL/HostIsolation/TcFilter/BPFTcFilterTests.cpp:197: Failure
Value of: bpf_prog_test_run_xattr(&tattr)
  Actual: true
Expected: false
[  FAILED  ] BPFTcFilterTests.TestDropUnsupportedPackets (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropIPV6Packets
/var/lib/jenkins/workspace/pf_multibranch_pipeline_lf_cmake/GPL/HostIsolation/TcFilter/BPFTcFilterTests.cpp:237: Failure
Value of: bpf_prog_test_run_xattr(&tattr)
  Actual: true
Expected: false
[  FAILED  ] BPFTcFilterTests.TestDropIPV6Packets (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropInvalidHeaderLength
[       OK ] BPFTcFilterTests.TestDropInvalidHeaderLength (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropFragmentedPacket
[       OK ] BPFTcFilterTests.TestDropFragmentedPacket (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowUDPPacketDNSPortSource
[       OK ] BPFTcFilterTests.TestAllowUDPPacketDNSPortSource (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowUDPPacketDNSPortDest
[       OK ] BPFTcFilterTests.TestAllowUDPPacketDNSPortDest (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowUDPPacketDHCPClient
[       OK ] BPFTcFilterTests.TestAllowUDPPacketDHCPClient (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowUDPPacketDHCPServer
[       OK ] BPFTcFilterTests.TestAllowUDPPacketDHCPServer (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropUnknownUDPPackets
[       OK ] BPFTcFilterTests.TestDropUnknownUDPPackets (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropUnknownTCPDestination
[       OK ] BPFTcFilterTests.TestDropUnknownTCPDestination (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowTCPAddressInAllowedIPs
[       OK ] BPFTcFilterTests.TestAllowTCPAddressInAllowedIPs (0 ms)
[ RUN      ] BPFTcFilterTests.TestDropUnknownICMPDestination
[       OK ] BPFTcFilterTests.TestDropUnknownICMPDestination (0 ms)
[ RUN      ] BPFTcFilterTests.TestAllowICMPAddressInAllowedIPs
[       OK ] BPFTcFilterTests.TestAllowICMPAddressInAllowedIPs (0 ms)
[----------] 14 tests from BPFTcFilterTests (3 ms total)

[----------] Global test environment tear-down
[==========] 14 tests from 1 test suite ran. (3 ms total)
[  PASSED  ] 11 tests.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] BPFTcFilterTests.TestAllowArpPacket
[  FAILED  ] BPFTcFilterTests.TestDropUnsupportedPackets
[  FAILED  ] BPFTcFilterTests.TestDropIPV6Packets

 3 FAILED TESTS

Those two tests are fixed by #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants