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)
Sat, Nov 9, 2:50 AM
Unknown Object (File)
Fri, Nov 8, 7:39 PM
Unknown Object (File)
Fri, Nov 8, 7:22 PM
Unknown Object (File)
Fri, Nov 8, 6:58 PM
Unknown Object (File)
Mon, Oct 28, 5:07 AM
Unknown Object (File)
Sun, Oct 20, 10:10 AM
Unknown Object (File)
Sat, Oct 19, 11:25 PM
Unknown Object (File)
Oct 5 2024, 2:30 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 Not Applicable
Unit
Tests Not Applicable

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.