[tor-bugs] #6226 [Tor Client]: pt unit tests do dns lookup on "abcd"

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Jun 23 20:05:58 UTC 2012


#6226: pt unit tests do dns lookup on "abcd"
------------------------+---------------------------------------------------
 Reporter:  arma        |          Owner:                  
     Type:  defect      |         Status:  new             
 Priority:  normal      |      Milestone:  Tor: unspecified
Component:  Tor Client  |        Version:                  
 Keywords:              |         Parent:                  
   Points:              |   Actualpoints:                  
------------------------+---------------------------------------------------
 Unplug your ethernet (but leave the interface up), and then run tor's
 'make test'. It will stall at "pt/parsing" for a minute or so.

 It has to do with these two tests in src/test/test_pt.c:
 {{{
   /* wrong addrport */
   strcpy(line,"CMETHOD trebuchet socks4 abcd");
   test_assert(parse_cmethod_line(line, mp) < 0);
 [...]
   /* wrong addr type */
   strcpy(line,"SMETHOD trebuchet abcd");
   test_assert(parse_smethod_line(line, mp) < 0);
 }}}

 parse_cmethod_line() calls tor_addr_port_lookup() which calls
 tor_addr_lookup() which triggers the dns lookup.

 I haven't explored whether having my resolver *answer* the dns query can
 change the behavior of the unit tests.

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


More information about the tor-bugs mailing list