Skip to content

Conversation

MateuszGrabuszynski
Copy link
Collaborator

@MateuszGrabuszynski MateuszGrabuszynski commented Aug 13, 2025

Merge only after #1236 and #1234.

Adds automation capabilities for netsniff-ng packet capture instead of tcpdump. As both should not be executed at once, such option was not added.

  • in tests/validation/configs/test_config.yaml added tool in .capture_cfg with following options recognized: tcpdump for tcpdump, netsniff or netsniff-ng for netsniff-ng
  • in tests/validation/create_pcap_file/netsniff.py created NetsniffRecorder class based on TcpDumpRecorder that can serve as netsniff-ng capturing process class
  • added conditional execution of netsniff-ng packet capture in
    • tests/validation/mtl_engine/GstreamerApp.py,
    • tests/validation/mtl_engine/ffmpeg_app.py
    • and tests/validation/mtl_engine/udp_app.py
  • modified comments about configuration collection and modification so they reflect actual situation

TODO:

  • Check whether the interface name is always produced properly in the command and fix if needed, then remove FIXME comment

Postponed for further reconsideration due to priority:

  • Prepare installation automation for seamless execution
  • Eliminate duplication by creating a parent Recorder class interface for capture
  • Think if the capture can be done via a fixture with automated (code-less*) test_name generation

*code-less here means without interfering with the test code

@MateuszGrabuszynski MateuszGrabuszynski changed the title Add: Automation for netsniff-ng packet capture Tests: Automation for netsniff-ng packet capture Aug 14, 2025
@MateuszGrabuszynski MateuszGrabuszynski changed the title Tests: Automation for netsniff-ng packet capture Test: Automation for netsniff-ng packet capture Aug 18, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds automation support for netsniff-ng packet capture alongside existing tcpdump functionality, allowing test configuration to choose between capture tools via a tool parameter. The implementation includes a new NetsniffRecorder class modeled after TcpDumpRecorder and updates test files to support both capture methods.

  • Introduces conditional packet capture execution for netsniff-ng across test execution engines
  • Adds NetsniffRecorder class for netsniff-ng packet capture automation
  • Updates comment consistency to reflect actual configuration behavior rather than just tcpdump

Reviewed Changes

Copilot reviewed 52 out of 53 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/validation/configs/test_config.yaml Adds tool configuration option for capture method selection
tests/validation/create_pcap_file/netsniff.py New NetsniffRecorder class implementation for netsniff-ng automation
tests/validation/mtl_engine/RxTxApp.py Adds netsniff support and fixes dual test interface configuration
tests/validation/mtl_engine/ffmpeg_app.py Integrates netsniff capture in ffmpeg tests and adds new dual test functions
tests/validation/mtl_engine/GstreamerApp.py Adds netsniff capture support to GStreamer tests
tests/validation/mtl_engine/udp_app.py Integrates netsniff capture in UDP application tests
Multiple test files Updates comments to reflect packet capture configuration rather than tcpdump-specific

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants