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, 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
Unknown Object (File)
Sep 27 2024, 9:48 AM
Unknown Object (File)
Sep 27 2024, 9:48 AM
Unknown Object (File)
Sep 27 2024, 9:48 AM
Unknown Object (File)
Sep 24 2024, 2:16 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

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.