[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #6226 [Tor Client]: pt unit tests do dns lookup on "abcd"
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs