Skip to content

network: add tcpdump() function and use it - #687

Open
semarie wants to merge 1 commit into
masterfrom
srt/tcpdump
Open

network: add tcpdump() function and use it#687
semarie wants to merge 1 commit into
masterfrom
srt/tcpdump

Conversation

@semarie

@semarie semarie commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

test_vlan_filtering.py is running tcpdump for various tests. as it something we want to use more in network tests, create a function.

@semarie semarie self-assigned this Sep 1, 2026
@semarie
semarie requested review from a team as code owners September 1, 2026 07:57
Comment thread tests/network/__init__.py Outdated
Comment thread tests/network/__init__.py Outdated
Comment thread tests/network/__init__.py Outdated
@semarie

semarie commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Last push:

  • move tcpdump() to context manager
  • require defer parameter
  • smaller retry_delay_secs
  • simplify cleanup()

@semarie
semarie requested a review from glehmann September 1, 2026 09:05
Comment thread tests/network/__init__.py Outdated
test_vlan_filtering.py is running tcpdump for various tests.
as it something we want to use more in network tests, create
a function.

Signed-off-by: Sebastien Rodot <sebastien.rodot@vates.tech>
Comment thread tests/network/__init__.py
f"echo $! > {pcapfile}.pid; ",
background=True,
)
defer(cleanup)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't defer(cleanup) run after the "yield" ? It seems duplicated no?

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.

3 participants