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)
Fri, Dec 13, 5:20 PM
Unknown Object (File)
Sun, Dec 8, 4:22 PM
Unknown Object (File)
Fri, Dec 6, 1:36 AM
Unknown Object (File)
Tue, Dec 3, 6:45 AM
Unknown Object (File)
Tue, Dec 3, 4:30 AM
Unknown Object (File)
Nov 21 2024, 6:49 AM
Unknown Object (File)
Nov 9 2024, 2:50 AM
Unknown Object (File)
Nov 8 2024, 7:39 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.