Page MenuHomeFreeBSD

netpfil tests: Improve sniffer.py
ClosedPublic

Authored by vegeta_tuxpowered.net on Jan 19 2023, 4:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 27, 5:19 PM
Unknown Object (File)
Thu, Feb 27, 7:45 AM
Unknown Object (File)
Wed, Feb 26, 1:40 PM
Unknown Object (File)
Feb 4 2025, 2:11 AM
Unknown Object (File)
Feb 1 2025, 5:13 AM
Unknown Object (File)
Jan 26 2025, 9:41 AM
Unknown Object (File)
Jan 24 2025, 5:11 PM
Unknown Object (File)
Jan 22 2025, 3:25 PM

Details

Summary

Part 1 of 5 of tests for D38025

Multiple improvements to sniffer.py:

  • Remove ambiguity of configuring recvif, it must be now explicitly specified.
  • Don't catch exceptions around creating the sniffer, let it properly fail and display the whole stack trace.
  • Count correct packets so that duplicates can be found.

Sponsored by: InnoGames GmbH

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I think we're missing a change of foundCorrectPacket to correctPackets in pft_ping.py here.

Also, minor nit, but can you include the full file for context in future diffs?

No need to update this one, but it does make reviews easier. Mark's git-arc.sh (./tools/tools/git/git-arc.sh) usually does the right thing, and tends to make Phabricator/git interactions a little less painful.

In D38120#866233, @kp wrote:

I think we're missing a change of foundCorrectPacket to correctPackets in pft_ping.py here.

Ineed that part was missing. I've split the changes into separate commits wrongly. I've uploaded the updated patch.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 22 2023, 4:55 AM
This revision was automatically updated to reflect the committed changes.