Opened 9 months ago

Closed 9 months ago

#32451 closed enhancement (implemented)

test/parseconf: Add support for required log messages on success

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: network-team-roadmap-november
Cc: nickm Actual Points: 1.1
Parent ID: #29211 Points: 0.5
Reviewer: nickm Sponsor: Sponsor31-can


We want to test that the "obsolete" log message includes the name of the option. But doesn't check for log content on success.

Similarly, our lzma, zstd, and nss tests should also test for logs from a successful launch. At the moment, they force a failure, then check the logs.

Child Tickets

#32468defectclosedteortest/parseconf: Actually detect --dump-config errors

Change History (5)

comment:1 Changed 9 months ago by teor

Actual Points: 0.3
Status: assignedneeds_revision

Here's my draft pull request, I discovered #32468 while writing it.

I still need to:

  • refactor the script to remove duplicate code
  • make most tests use expected_log
  • write a changes file

comment:2 Changed 9 months ago by teor

Actual Points: 0.30.6

Another update, refactoring is finished.

Still need to do tests and a changes file.

comment:3 Changed 9 months ago by teor

Actual Points: 0.61.1
Reviewer: nickm
Status: needs_revisionneeds_review

See my PR:

It contains:

  • expected_log support, for checking log messages when the config is successful
  • better diagnostics
  • common failure cases, in a separate conf_failures directory
  • refactoring to remove duplicate code

comment:4 Changed 9 months ago by nickm

I've looked the branch over, and it seems good to me. I especially like the fact that you included conf_failures to verify that test_parseconf really tests things.

comment:5 Changed 9 months ago by nickm

Resolution: implemented
Status: needs_reviewclosed

Merged to master.

Note: See TracTickets for help on using tickets.