aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_addr.c
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-07-09test: Add IPv6 inet_pton double "::" testDavid Goulet
Unclear but that somehow failed on Windows once (?) according to ticket #33768 but we are not seeing that failure. Nevertheless, add a simple unit test. Closes #33768 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-09Make sure that we free 'addr' at the end of a pair of addr testsNick Mathewson
Fixes a couple of Coverity warnings about possible memory leaks. Bug not in any released Tor.
2020-04-08Merge branch 'maint-0.4.3'David Goulet
2020-04-08Correct 'was not internal' to 'was internal' in test_external_ip()Mrigyen Sawant
2020-04-07Added tests for tor_addr_is_null/valid()MrSquanchee
Added tests for tor_addr_is_valid(), and added tests for tor_addr_is_null(), which is not modfied. Ticket 33679
2020-02-11Merge branch 'ticket32362_squashed'Nick Mathewson
2020-02-11Check for leading zeros in tor_inet_aton()Neel Chauhan
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-10-22Re-run make autostyle.Nick Mathewson
2019-10-22Merge branch 'ticket31705_v2' into ticket31705_v2_mergedNick Mathewson
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
2019-10-22test_addr.c: use COCCI to suppress macros coccinelle cannot parse.Nick Mathewson
2019-10-22test: Hide some test-declaration macro definitions to COCCI.Nick Mathewson
(These ones cause parsing failures.)
2019-10-04Use {mock,unmock}_hostname_resolver() in relevant testsNick Mathewson
These tests all invoke the hostname resolver in one way or another, and therefore potentially block if our DNS server is missing, absent, or extremely slow. Closes ticket 31841.
2019-09-12Workaround for GCC "note" about "variable tracking size limit"Nick Mathewson
GCC complains that we are using too many variables here, probably because of the sheer number of locals used for our tinytest macros. Eventually we should fix that (see 30968), but this commit just makes the "note" go away by splitting the test function into two.
2019-09-12Remove variable declarations from macros in test_addr_parse()Nick Mathewson
Instead, put them in the function itself. This is an attempt to fix the gcc warning about the "variable tracking size limit exceeded".
2019-06-26test/addr: test that tor_addr_port_lookup() handles IP addresses and portsteor
And that it does something sensible with host and host:port. Also reorder the tests into valid, invalid, and ambiguous. And add some missing cases. Note: tor_addr_port_lookup() handles ip, ip:port, host, and host:port. Tests for 30721.
2019-06-26test/addr: test that tor_addr_lookup() handles IP addressesteor
And that it fails on IP:port and host:port, and does something sensible with host. Tests for 30721.
2019-06-26test/addr: test that tor_lookup_hostname() handles IPv4 addressesteor
And that it fails on IPv6 and host:port, and does something sensible with host. Tests for 30721.
2019-06-26test/addr: Add some ambiguous IPv6 cases to test_addr_parse()teor
Test some strings which could be parsed as IPv6 addresses, or as IPv6:port strings. Additional tests for 30721.
2019-06-26test/addr: Increase coverage in test_addr_parse()teor
Do as many tests as possible for each input string. Then remove some redundant test cases. Cleanup after 30721.
2019-06-26test/addr: Stop repeating so much code in test_addr_parse()teor
Cleanup after 30721.
2019-06-26test/addr: Add unit tests for the fixes in 30721teor
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-30Use prefilled_rng in test_addr.c in place of existing code.Nick Mathewson
2019-03-12Merge branch 'tor-github/pr/763' into maint-0.4.0George Kadianakis
2019-03-08Merge remote-tracking branch 'bug28525_029' into maint-0.3.5teor
2019-03-08Make tor_addr_is_internal_() RFC6598 (Carrier Grade NAT) awareNeel Chauhan
Fixes 28525.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-08-31Add tests for tor_addr_parse, separate from tor_addr_port_parse.David Fifield
2018-07-10Isolate resolve.h usage in the modules that really need it.Nick Mathewson
(Almost none of Tor should actually need to touch the platform resolver.)
2018-07-10Remove all users of addr_port_lookup outside of address.cNick Mathewson
This function has a nasty API, since whether or not it invokes the resolver depends on whether one of its arguments is NULL. That's a good way for accidents to happen. This patch incidentally makes tor-resolve support socks hosts on IPv6.
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Remove system headers from or.hNick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-05-08Fix compilation of test_addr.cNick Mathewson
This needs to include crypto_rand.h (which it didn't before it was merged).
2018-05-08More unit tests for addressmap_get_virtual_address().Nick Mathewson
Previously the coverage on this function was mostly accidental, coming as it did from test_entryconn.c. These new tests use mocking to ensure that we actually hit the different failure and retry cases of addressmap_get_virtual_address(), and make our test coverage a bit more deterministic. Closes ticket 25993.
2017-09-15Merge branch 'scan-build-032'Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-12Clear up dead-assignment warnings from scan-buildNick Mathewson
2017-08-24apply ahf's test_assert_int.cocciNick Mathewson
2017-07-05Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-07-05Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-07-05Merge branch 'maint-0.2.7-redux' into maint-0.2.8Nick Mathewson
2017-07-05Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2017-07-05Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2017-07-03Fix assertion failure related to openbsd strtol().Nick Mathewson
Fixes bug 22789; bugfix on 0.2.3.8-alpha.