Page MenuHomeFreeBSD

tests: Guard against testing without scapy
Needs ReviewPublic

Authored by jlduran on Sat, Feb 8, 5:49 PM.

Details

Reviewers
emaste
kp
vegeta_tuxpowered.net
Group Reviewers
tests
Summary

Add a guard that checks if a system has scapy installed, to avoid
reporting false positives in the testing framework.

This guard is added in the utilities subroutine instead of the
traditional:

atf_set "require.progs" "python3" "scapy"

in the header of each test using pft_ping.py.

The trade-off is that the test takes a little longer to be skipped.

Reported by: Jenkins

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62316
Build 59200: arc lint + arc unit

Event Timeline

Current false positives (on architechtures other than amd64 or i386 [^1]):

  • sys.netpfil.pf.fragmentation_pass.dummynet_fragmented
  • sys.netpfil.pf.src_track.max_src_states_rule
  • sys.netpfil.pf.src_track.max_src_conn_rule
  • sys.netpfil.pf.max_states.max_states
  • sys.netpfil.pf.route_to.ifbound_reply_to_rdr_dummynet
  • sys.netpfil.pf.route_to.ifbound_reply_to
  • sys.netpfil.pf.route_to.ifbound_reply_to_v6
  • sys.netpfil.pf.fragmentation_pass.no_df
  • sys.netpfil.pf.fragmentation_pass.reassemble_slowpath

If tests strongly prefers to add atf_set "require.progs" "python3" "scapy", I'll change the revision. However, this review aims to avoid having this issue recurrently.

[^1]: See https://github.com/freebsd/freebsd-ci/blob/476c8808803a47344a47adfe9573345cceb14fce/scripts/build/build-test_image-head.sh#L63-L64 for more info.