Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#25997 closed defect (fixed)

Solve nondeterminism in testing of hs_get_responsible_hsdirs

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-ci, tor-tests-coverage, tor-tests-unit
Cc: dgoulet, asn Actual Points:
Parent ID: #25908 Points:
Reviewer: Sponsor: Sponsor3-can


Only sometimes do our tests call the case of hs_get_responsible_hsdirs where it "wraps around":

    /* Getting the length of the list if no member is greater than the key we
     * are looking for so start at the first element. */
    if (idx == smartlist_len(sorted_nodes)) {
      start = idx = 0;

We should make this consistent.

I plan to do this, but dgoulet or asn should steal it if they'd rather. :)

Child Tickets

Change History (5)

comment:1 Changed 2 years ago by nickm

Status: assignedneeds_review

That was easy; see branch ticket25997. PR at

comment:2 Changed 2 years ago by asn

Status: needs_reviewmerge_ready


comment:3 Changed 2 years ago by nickm

thanks for the fast review -- merged to master!

comment:4 Changed 2 years ago by nickm

Resolution: fixed
Status: merge_readyclosed

comment:5 Changed 2 years ago by nickm

Sponsor: Sponsor3-can
Note: See TracTickets for help on using tickets.