#36497 test: Add coverage for TorControl `SAFECOOKIE` authentication
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36497 test: Add coverage for TorControl `SAFECOOKIE` authentication | Ready | 1 | Strong | 0 + 206 tests | |||
|
|
|
| ||||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Adds functional test coverage for TorControl SAFECOOKIE authentication in feature_torcontrol.py. A mock Tor control server tests successful authentication handshakes as well as error handling for challenge failures, invalid server nonces, mismatched server hashes, and missing or short cookie files.
Problem: TorControl SAFECOOKIE authentication has no automated functional test coverage, allowing protocol regressions or errors in Tor controller communication to go undetected.
Evidence of importance:
- Author note in description: 'while working on #35292, i realised we did not have coverage for SAFECOOKIE authentication either, so i added it here'
Risk of a mistake: low (tests). Only modifies functional test code in test/functional/feature_torcontrol.py.
Changed since the previous assessment: None; the diff matches the previous description.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- nothing: no pending items
Agreement
Strong
substantive support, no open objection (mercie-ux)
Thread notes: Added Concept ACK from mercie-ux who tested the functional test changes against intentionally mutated torcontrol.cpp code.
Objections, suggestions, and questions: none recorded.
Support:
- jpk68 (contributor) (ACK, 2026-10-20): (no reason given) [not substantive]
- mercie-ux (contributor) (Concept ACK, 2026-10-21) [tested: torcontrol.cpp]: verified the new tests catch mutations in torcontrol.cpp that pass on master
Participants:
- jpk68 (contributor, support, 1 statements 2026-10-20 to 2026-10-20): ACKed commit hash
- mercie-ux (contributor, support, 1 statements 2026-10-21 to 2026-10-21): Concept ACK with mutation testing
Files
206 lines under test/bench/ci.
- test/functional/feature_torcontrol.py +206/-0
Card
The short text the ranking pass compares across PRs.
Adds functional test coverage for TorControl SAFECOOKIE authentication in feature_torcontrol.py. The node's SAFECOOKIE authentication handling previously lacked functional test coverage, risking undetected regressions in Tor control connection management. Tests exercise both successful authentication flows and failure handling for invalid nonces, corrupted server hashes, failed challenge responses, and invalid cookie files.
Data
thread read through 2026-10-21 (3 statements), head 6827006f4f
labels: Tests