Opened 7 months ago

Closed 7 months ago

Last modified 7 months 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

Description

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 7 months ago by nickm

Status: assignedneeds_review

That was easy; see branch ticket25997. PR at https://github.com/torproject/tor/pull/79

comment:2 Changed 7 months ago by asn

Status: needs_reviewmerge_ready

LGTM!

comment:3 Changed 7 months ago by nickm

thanks for the fast review -- merged to master!

comment:4 Changed 7 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

comment:5 Changed 7 months ago by nickm

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