[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #21039 [Core Tor/Tor]: Refactor and simplify guard code of circuit_send_next_onion_skin()



#21039: Refactor and simplify guard code of circuit_send_next_onion_skin()
-------------------------------------------------+-------------------------
 Reporter:  asn                                  |          Owner:  asn
     Type:  defect                               |         Status:
                                                 |  assigned
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.1.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-guard, refactor, review-         |  Actual Points:
  group-16                                       |
Parent ID:  #20822                               |         Points:  0.3
 Reviewer:  asn                                  |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by ordex):

 * owner:  ordex => asn
 * status:  needs_revision => assigned


Comment:

 A new set of changes has been pushed in the same branch at
 https://github.com/ordex/tor/commits/ticket21039 . The "move & restyle"
 patch has been split as much as possible hoping this could help the
 review.

 About the last comment: although the two objects "have nothing in common",
 I used this hack-ish trick to make the mock function work as expected in
 the unit-test. In a nutshell, instead of having
 mock_entry_guard_succeeded() compute the return value, I force it to
 return the same value that was passed as argument.

 This way, the unit-test can pass any value it wants and "force" the return
 of the wanted state.

 This is helpful to test the behaviour of circuit_send_next_onion_skin()
 for every possible value returned by entry_guard_succeeded()

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21039#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs