#21266 closed enhancement (fixed)

test: Improve hs intropoints unit test with expected msg log.

Reported by: dgoulet Owned by: ahf
Priority: Medium Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: test, tor-hs, prop224, easy
Cc: Actual Points:
Parent ID: #12424 Points:
Reviewer: Sponsor: SponsorR-must

Description

Now that #20029 has been merged, during review there has been a request for improving the unit tests for the failure cases to expect a log message.

Child Tickets

Change History (7)

comment:1 Changed 11 months ago by nickm

Status: newassigned

comment:2 Changed 11 months ago by nickm

Owner: changed from dgoulet to ahf

comment:3 Changed 11 months ago by asn

The idea of this ticket is to enrich the tests at src/test/test_hs_intropoint.c by making them test more failure cases. Also, in the failure case tests we should use the expect_log_msg() test utility function to make sure that we actually fail in the right codepath.

To get an idea of which failure cases are not handled, run the tests with code coverage enabled (see doc/HACKING/HelpfulTools.md) and see which code paths are never taken.

Finally, let's not spend too much time here. We can probably surive without testing 100% of all the failure cases.

comment:4 Changed 11 months ago by ahf

Added additional checks for expected log messages in some of the error cases in my branch 'ahf/bugs/21266' on Gitlab:

https://gitlab.com/ahf/tor/tree/ahf/bugs/21266

comment:5 Changed 11 months ago by ahf

Status: assignedneeds_review

comment:6 Changed 11 months ago by dgoulet

Status: needs_reviewmerge_ready

lgtm;

comment:7 Changed 11 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

great, merged!

Note: See TracTickets for help on using tickets.