Opened 5 months ago

Closed 8 weeks ago

#22497 closed enhancement (implemented)

Clean-up tt_assert() usage in our tests

Reported by: ahf Owned by: ahf
Priority: Low Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: review-group-18
Cc: Actual Points:
Parent ID: Points:
Reviewer: nickm Sponsor:

Description

Often when refactoring code I stumble upon places in our test code where we use tt_assert() instead of the tt_$type_op equivalent function to do the various checks. It would be nice to clean this somewhat up to get better test case failure messages.

This should ideally be done using Coccinelle with semantical patches.

Child Tickets

Change History (6)

comment:1 Changed 5 months ago by ahf

Owner: set to ahf
Status: newassigned

comment:2 Changed 5 months ago by nickm

Milestone: Tor: 0.3.1.x-finalTor: 0.3.2.x-final

comment:3 Changed 5 months ago by ahf

Status: assignedneeds_review

Very low priority, but slightly large patch, can be found here: https://gitlab.com/ahf/tor/merge_requests/16

Please keep this ticket open if this lands, since I have a couple of more things I'd like to clean up when I have some spare time for it.

comment:4 Changed 4 months ago by nickm

Keywords: review-group-18 added

comment:5 Changed 4 months ago by nickm

Reviewer: nickm
Status: needs_reviewmerge_ready

lgtm, but has some conflicts, and probably will have more as more stuff is merged. I'll take this at the end of review-group-18, either resolving conflicts or reapplying patch tools as needed.

comment:6 Changed 8 weeks ago by nickm

Resolution: implemented
Status: merge_readyclosed

Okay. Now that the hidden service patches are in, I'm no longer scared to merge this. I split this branch up a little, in a new branch called ahf_bug22497_redux. It has the same patches and scripts as the previous version, but I regenerated the C changes based on the latest master.

Thanks, ahf!

Note: See TracTickets for help on using tickets.