[tor-bugs] #19987 [Core Tor/Tor]: Unit Test Middle, Exit, Intro, and Rend node choices

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Aug 26 00:41:09 UTC 2016


#19987: Unit Test Middle, Exit, Intro, and Rend node choices
-------------------------------------+------------------------------
 Reporter:  teor                     |          Owner:
     Type:  enhancement              |         Status:  new
 Priority:  Medium                   |      Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor             |        Version:
 Severity:  Normal                   |     Resolution:
 Keywords:  path-selection, testing  |  Actual Points:
Parent ID:                           |         Points:  2
 Reviewer:                           |        Sponsor:
-------------------------------------+------------------------------

Old description:

> I'd like to unit test the #19973 fix to the 0.2.8.6 path selection issue
> by copying the code from test_choose_random_entry_no_guards,
> but running it on:
> * choose_good_middle_server
> * choose_good_exit_server_general
> * router_choose_random_node (used by rend_consider_services_intro_points)
> * pick_rendezvous_node
>
> The tests should make sure these functions return any node at random.
> In 0.2.8.6, these functions chose nodes using the direct connection
> reachability rules, which was wrong.
>
> We could make these tests simpler and more reliable by setting up a node
> list with a single node that 0.2.8.6 wouldn't choose, but 0.2.8.7 would.
> For example:
> * an IPv4-only node with ClientUseIPv4 0
> * a node on 9001/9030 with FascistFirewall 1
> * a node on 1.1.1.1 with ReachableAddresses 2.0.0.0/8

New description:

 We could unit test the #19973 fix to the 0.2.8.6 path selection issue by
 copying the code from test_choose_random_entry_no_guards,
 but running it on:
 * choose_good_middle_server
 * choose_good_exit_server_general
 * router_choose_random_node (used by rend_consider_services_intro_points)
 * pick_rendezvous_node

 The tests should make sure these functions return any node at random.
 In 0.2.8.6, these functions chose nodes using the direct connection
 reachability rules, which was wrong.

 We could make these tests simpler and more reliable by setting up a node
 list with a single node that 0.2.8.6 wouldn't choose, but 0.2.8.7 would.
 For example:
 * an IPv4-only node with ClientUseIPv4 0
 * a node on 9001/9030 with FascistFirewall 1
 * a node on 1.1.1.1 with ReachableAddresses 2.0.0.0/8

--

Comment (by teor):

 I'm not sure if I will get time to write this test, so I modified the
 description so it didn't look like I was volunteering.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19987#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list