Page MenuHomeFreeBSD

Move pft_ping.py and sniffer.py to the common test directory
ClosedPublic

Authored by ahsanb on Aug 15 2019, 4:43 PM.

Details

Summary

The pft_ping.py and sniffer.py tool is moved from/tests/sys/netpfil/pf to /tests/sys/netpfil/common directory because these tools are to be used in common for all the firewalls.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ahsanb created this revision.Aug 15 2019, 4:43 PM
ahsanb updated this revision to Diff 60873.Aug 16 2019, 7:36 AM
  • Make the pf tests use the sniffer and pft_ping tools from the common directory and hence ensure only one installation of these tools.

This probably also wants this:

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 19adf066b1b..1725b06fa69 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -38,6 +38,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done

+# 20190816: move common netpfil test files
+OLD_FILES+=usr/tests/sys/netpfil/pf/sniffer.py
+OLD_FILES+=usr/tests/sys/netpfil/pf/pft_ping.py
 # 20190729: gzip'ed a.out support removed
 OLD_FILES+=usr/include/sys/inflate.h
 # 20190722: cap_random(3) removed

That'll allow people to clean up the old version of sniffer.py and pft_ping.py.

tests/sys/netpfil/pf/forward.sh
48 ↗(On Diff #60873)

I'd do ${common_dir}/pft_ping.py, if only for consistency.

ahsanb updated this revision to Diff 60879.Aug 16 2019, 10:37 AM
  • Add old pft_ping and sniffer.py to ObsoleteFiles.inc
ahsanb updated this revision to Diff 60880.Aug 16 2019, 10:40 AM
  • replace $common_dir with ${common_dir} for consistency
ahsanb updated this revision to Diff 60885.Aug 16 2019, 12:49 PM
  • Fix “replace $common_dir with ${common_dir} for consistency”
kristof accepted this revision.Aug 16 2019, 2:03 PM
This revision is now accepted and ready to land.Aug 16 2019, 2:03 PM
ahsanb updated this revision to Diff 60939.Aug 17 2019, 2:08 PM
  • Since the NAT tests landed before this diff the merge wouldn't be possible because the NAT tests changed the common/Makefile. Created an updated diff from the new upstream.
This revision now requires review to proceed.Aug 17 2019, 2:08 PM
thj accepted this revision.Aug 18 2019, 5:57 PM
This revision is now accepted and ready to land.Aug 18 2019, 5:57 PM