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)
Mon, May 27, 10:08 AM
Unknown Object (File)
Fri, May 17, 2:24 AM
Unknown Object (File)
Wed, May 15, 1:25 PM
Unknown Object (File)
Wed, May 15, 1:25 PM
Unknown Object (File)
Wed, May 15, 1:25 PM
Unknown Object (File)
Wed, May 15, 1:25 PM
Unknown Object (File)
Wed, May 15, 1:11 PM
Unknown Object (File)
Sun, May 5, 4:13 AM

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.