tests: match tcpdump RSTs to the data connection port pair - #22305
Closed
GrahamCampbell wants to merge 1 commit into
Closed
tests: match tcpdump RSTs to the data connection port pair#22305GrahamCampbell wants to merge 1 commit into
GrahamCampbell wants to merge 1 commit into
Conversation
GrahamCampbell
force-pushed
the
tcpdump-rst-port-pairs
branch
2 times, most recently
from
July 13, 2026 12:18
c559e8a to
7066f56
Compare
GrahamCampbell
marked this pull request as ready for review
July 15, 2026 21:00
GrahamCampbell
force-pushed
the
tcpdump-rst-port-pairs
branch
from
July 15, 2026 21:05
7066f56 to
f4a48d9
Compare
GrahamCampbell
force-pushed
the
tcpdump-rst-port-pairs
branch
from
July 21, 2026 21:54
f4a48d9 to
032e90e
Compare
Contributor
Author
|
PR rebased. No changes made. Ready for review. :) |
There was a problem hiding this comment.
Pull request overview
This PR tightens the tcpdump-based FTPS/FTP shutdown tests to avoid flakiness from unrelated loopback TCP RSTs by matching RST packets only when they occur between the exact two endpoints (server/client port pair) of the FTP data connection.
Changes:
- Update
VsFTPD.get_data_ports()to return(remote_port, local_port)pairs parsed from curl’s “Established 2nd connection … from … port …” trace line. - Extend
RunTcpDump.get_rsts()to support filtering by exact port pairs (port_pairs) in addition to the existing “either side matches”portsfiltering. - Update vsftpd-related shutdown tests to pass
port_pairsinstead ofports.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/http/testenv/vsftpd.py | Parse and return data-connection port pairs from curl trace lines. |
| tests/http/testenv/curl.py | Add port_pairs filtering to tcpdump RST matching logic. |
| tests/http/test_30_vsftpd.py | Use port_pairs for data-connection-specific RST assertions. |
| tests/http/test_31_vsftpds.py | Use port_pairs for data-connection-specific RST assertions. |
| tests/http/test_32_ftps_vsftpd.py | Use port_pairs for data-connection-specific RST assertions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
icing
approved these changes
Jul 24, 2026
Member
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed this issue while working on #22304. The vsftpd RST checks matched any captured RST involving one port number on either side, but tcpdump sees all of loopback while other pytest workers run — so an unrelated RST on a recycled ephemeral port can fail them (example). The trace line already names both endpoints, so return the pair from
get_data_ports()and haveget_rsts()match only RSTs between exactly those two ports.