Skip to content

Generalize client packet mark test#13384

Open
JosiahWI wants to merge 3 commits into
apache:masterfrom
JosiahWI:feat/fwmark-mask
Open

Generalize client packet mark test#13384
JosiahWI wants to merge 3 commits into
apache:masterfrom
JosiahWI:feat/fwmark-mask

Conversation

@JosiahWI

Copy link
Copy Markdown
Contributor

This makes adding the server packet mark test a much simpler change.

JosiahWI added 2 commits July 15, 2026 07:25
This introduces common utilities to make it easy to add a
server-side packet mark test.
@JosiahWI JosiahWI self-assigned this Jul 15, 2026
Copilot AI review requested due to automatic review settings July 15, 2026 12:31
@JosiahWI JosiahWI added the Tests label Jul 15, 2026

Copilot AI left a comment

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.

Pull request overview

This PR refactors the existing client packet mark test plugin by extracting shared logic into a reusable helper module, making it easier to add additional packet-mark plugins (e.g., server-side) with minimal duplication.

Changes:

  • Added packet_mark_common.{h,cc} with shared helpers to parse a mark from request headers, apply it via TS API, read back SO_MARK, and echo it in response headers.
  • Refactored client_packet_mark plugin to use the shared helpers and updated plugin build sources accordingly.
  • Added a new AuTest (packet_mark.test.py) that validates TSHttpTxnClientPacketMarkSet behavior and skips cleanly when SO_MARK can’t be set/read.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/tools/plugins/packet_mark_common.h New shared helper API for packet-mark test plugins.
tests/tools/plugins/packet_mark_common.cc New shared implementation for mark parsing, setting, and echoing.
tests/tools/plugins/CMakeLists.txt Builds client_packet_mark plugin with the new shared helper source.
tests/tools/plugins/client_packet_mark.cc Simplified plugin implementation by delegating to the shared helper module.
tests/gold_tests/pluginTest/packet_mark/packet_mark.test.py New AuTest verifying TSHttpTxnClientPacketMarkSet with capability-based skipping.

Comment thread tests/tools/plugins/packet_mark_common.cc
Comment thread tests/tools/plugins/packet_mark_common.cc
Copilot AI review requested due to automatic review settings July 15, 2026 12:50

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

@JosiahWI JosiahWI requested a review from ezelkow1 July 15, 2026 14:02
@JosiahWI JosiahWI added this to the 11.0.0 milestone Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants