#35292 test: Add coverage for Tor control `HASHEDPASSWORD` authentication

ReviewabilityReviewsAgreementSize
#35292 winterrdog test: Add coverage for Tor control `HASHEDPASSWORD` authenticationReady0Crickets0 + 100 tests
  • Add functional test coverage for Tor control HASHEDPASSWORD authentication
  • Prevents regressions in Tor authentication command formatting, credential handling, and fallback behavior
  • Ready for review
  • No review verdicts recorded
  • No substantive review comments or approvals yet
  • Asked what the bad-password test validates separately from the successful case (davidgumberg)
  • Discussed coordinating overlapping test cases with #36374 and agreed to keep them separate (0xShadowX)
  • 0 lines added or modified outside tests
  • 100 lines added or modified in tests
  • 0 lines removed in total
  • 1 files, 1 commits
Uncategorized15 PRs, unranked
1 rejected
  • Test infrastructure: not a member. Carries the 'Tests' label and touches test/functional/feature_torcontrol.py, but the category explicitly excludes tests that pin the behavior of a specific functional area rather than test machinery or framework.
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:

ReviewerTypeHarm, request, or questionStatusMust beAuthor repliedQuote
davidgumberg (member)question, scopewhat the bad-password test validates separately from the correct-password testanswered · author explained that it verifies Bitcoin Core logs the error and stops sending commandsansweredyes2026-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, scopeadd an escaping test case for -torpassword with backslashes to resolve overlap with #36374accepted · author and reviewer agreed to keep the PRs separate and rebase whichever merges firstansweredyes2026-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

dossier JSON · extract JSON · model ledger, generated 2026-10-07T01:12, confidence high, input hash a95a393e6562893e
thread read through 2026-10-05 (12 statements), head 5ba52aef59
labels: Tests