#35292 test: Add coverage for Tor control `HASHEDPASSWORD` authentication
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #35292 test: Add coverage for Tor control `HASHEDPASSWORD` authentication | Ready | 0 | Crickets | 0 + 100 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 the Tor control HASHEDPASSWORD authentication method in test/functional/feature_torcontrol.py. A subclassed mock Tor control server simulates METHODS=HASHEDPASSWORD responses to test four scenarios: sending properly quoted passwords on success, handling failure on an incorrect password, skipping authentication when -torpassword is omitted, and ignoring -torpassword when the Tor daemon does not advertise HASHEDPASSWORD support.
Problem: The functional test suite lacks test coverage for Tor control HASHEDPASSWORD authentication, leaving potential regressions in Tor authentication command formatting, credential handling, or fallback behavior undetected by CI.
Evidence of importance:
- Author description: 'currently, the functional test suite does not explicitly explore this authentication path, which means regressions in tor authentication handling could go unnoticed. for instance incorrectly formatted AUTHENTICATE commands, broken fallback behavior, or authentication attempts being made when no password is configured.'
Risk of a mistake: low (tests). Touches only functional test mock server logic and test assertions for Tor control authentication.
Changed since the previous assessment: No substantive changes to the patch content or approach; rebased or reformatted.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- nothing: no pending requests or questions 2026-10-03
Agreement
Crickets
no substantive comment either way
Thread notes: Reviewed winterrdog's edited statement c:5970759968, which details test structure coordination with #36374; claims and statuses remain unchanged.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| davidgumberg (member) | question, scope | what the bad-password test validates separately from the correct-password test | answered · author explained that it verifies Bitcoin Core logs the error and stops sending commands | answered | yes | 2026-05-14: 'What is this testing separately from the correct password test?' Status from: 2026-05-15: winterrdog: 'the key difference here is that the wrong password test verifies Bitcoin Core logs and stops trying to do anything else ' |
| 0xShadowX (none) | suggestion, scope | add an escaping test case for -torpassword with backslashes to resolve overlap with #36374 | accepted · author and reviewer agreed to keep the PRs separate and rebase whichever merges first | answered | yes | 2026-09-28: 'Would you like to add an escaping case (e.g. `pa\ss"word\`) here, and I'll drop the test from #36374 and keep just the fix?' Status from: 2026-10-03: 0xShadowX: 'Option 1 sounds good to me, keeping them separate makes each one easier to review.' |
Participants:
- davidgumberg (member, question, 1 statements 2026-05-14 to 2026-05-14): asked what the bad-password test validated separately from the good-password test
- sedited (member, neutral, 1 statements 2026-05-14 to 2026-05-14): asked the author to rewrite the description without an LLM format
- 0xShadowX (none, question, 2 statements 2026-09-28 to 2026-10-03): asked whether to add an escaping test case here or rebase #36374 later
Files
100 lines under test/bench/ci.
- test/functional/feature_torcontrol.py +100/-0
Card
The short text the ranking pass compares across PRs.
This test-only PR adds functional test coverage for Tor control HASHEDPASSWORD authentication in test/functional/feature_torcontrol.py. The functional test suite previously omitted coverage for this authentication path, leaving regressions in Tor control command formatting or credential handling unmonitored. It introduces a mock Tor control server that advertises HASHEDPASSWORD to test correct password quoting, rejected bad passwords, behavior with an unset -torpassword, and unadvertised authentication methods. It has no dependencies.
Data
thread read through 2026-10-05 (12 statements), head 5ba52aef59
labels: Tests