aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_address.c
AgeCommit message (Collapse)Author
2019-02-19Downgrade some LOG_ERR messages in the address/* tests to warningsNick Mathewson
Fixes bug 29530, where the LOG_ERR messages were occurring when we had no configured network, and so we were failing the unit tests because of the recently-merged #28668. Bug not in any released Tor.
2019-01-23Merge branch 'ticket28668_035' into ticket28668_040Nick Mathewson
2019-01-23If address/get_if_addrs6 can't findipv6, log WARN, not ERRNick Mathewson
Fixes 29160, and allows 28668 (treating ERR logs as test failures) to procede.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-11-02Update address tests to avoid offending coverity.Nick Mathewson
2018-10-31Add test for nodes_in_same_family()Neel Chauhan
2018-08-21Remove duplicate include in src/test/test_address.cNeel Chauhan
2018-08-17In addrs_in_same_network_family(), choose IP subnet size based on IP typeNeel Chauhan
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-06-27rectify include paths (automatic) for address.hNick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-02-21Revert 4438ef32's changes to test_address.cNick Mathewson
Apparently some versions of the mac sdk care about the ordering of net/if.h wrt other headers. Fixes bug 25319; bug not in any released tor.
2018-02-20Remove a bunch of other redundant #includesNick Mathewson
Folks have found two in the past week or so; we may as well fix the others. Found with: \#!/usr/bin/python3 import re def findMulti(fname): includes = set() with open(fname) as f: for line in f: m = re.match(r'^\s*#\s*include\s+["<](\S+)[>"]', line) if m: inc = m.group(1) if inc in includes: print("{}: {}".format(fname, inc)) includes.add(m.group(1)) import sys for fname in sys.argv[1:]: findMulti(fname)
2017-12-08Convert the rest of src/common's headers to use FREE_AND_NULLNick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-08-24apply ahf's test_assert_null.cocciNick Mathewson
2017-08-24apply ahf's test_assert_int.cocciNick Mathewson
2017-08-24Fix operator usage in src/test/*.cAlexander Færøy
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]
2017-03-15Run the copyright update script.Nick Mathewson
2016-11-16fixup! Add expect_log_msg_containing_either3() and ↵teor
expect_log_msg_containing_either4() Fix typos: * extra '(' * use assert_log_predicate (without 3 or 4 at the end) Tidy whitespace. Wrap long lines.
2016-11-16Add all four error messages to test_address_get_if_addrs6_list_no_internal()Neel Chauhan
2016-11-16Add all four error messages to test_address_get_if_addrs6_list_internal()Neel Chauhan
2016-09-09make check-spacesNick Mathewson
2016-09-09Fix cases where the tests were doing closesocket() on a non-socketNick Mathewson
These seem to have caused warnings on windows. Hmmm.
2016-09-08Placate "make check-spaces"Nick Mathewson
2016-09-08Simplify log_test_helpers interfaceNick Mathewson
Previously, you needed to store the previous log severity in a local variable, and it wasn't clear if you were allowed to call these functions more than once.
2016-09-08Tolerate another failure mode of get_if_addres6_list in testsNick Mathewson
2016-08-31Use setup_full_capture_of_logs() where appropriate.Nick Mathewson
2016-07-28Fix a huge pile of -Wshadow warnings.Nick Mathewson
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
2016-07-17Keep make check-spaces happyAndrea Shepard
2016-07-06Capture the LOG_ERR messages in our tests that had logged errors.Nick Mathewson
(It's confusing for the test to write an expected error to stdout, and then tell the user "OK".)
2016-02-27Update the copyright year.Nick Mathewson
2016-02-23Add missing check to test_address_get_if_addrs_ifaddrs. Bug 18378Nick Mathewson
2016-02-01Merge branch 'maint-0.2.7'Nick Mathewson
(We already had a fix for the address test freebsd issues)
2016-02-01Try to fix address tests on FreeBSDNick Mathewson
In jails, there is not always a localhost. Bugfix not on any released Tor.
2016-01-03Add family argument to get_interface_addresses_raw (and subfunctions).rl1987
2015-11-18Fix unit tests on systems without IPv4 or localhost addressesteor (Tim Wilson-Brown)
Make unit tests pass on IPv6-only systems, and systems without localhost addresses (like some FreeBSD jails). Fixes: * get_if_addrs_ifaddrs: systems without localhost * get_if_addrs_ioctl: only works on IPv4 systems * socket: check IPv4 and IPv6, skip on EPROTONOSUPPORT * socketpair_ersatz: uses IPv4, skip on EPROTONOSUPPORT Fixes bug #17632; bugfix on unit tests in 0.2.7.3-rc. c464a367728d was a partial fix for this issue in #17255; it was released in unit tests in 0.2.7.4-rc. Patch by "teor".
2015-10-21Fix a number of unit-test memory leaks, found by valgrind.Nick Mathewson
2015-10-15blank line at eof for test_address.cNick Mathewson
2015-10-15Merge remote-tracking branch 'twstrike/address_tests'Nick Mathewson
2015-10-07Merge remote-tracking branch 'origin/maint-0.2.7'Nick Mathewson
2015-10-07Make get_ifaddrs tests more tolerant of unusual network configsteor (Tim Wilson-Brown)
* Don't assume that every test box has an IPv4 address * Don't assume that every test box has a non-local address Resolves issue #17255 released in unit tests in 0.2.7.3-rc.
2015-10-05Fix spacesOla Bini
2015-10-05Test full IP addresses instead of just one nibbleOla Bini
2015-10-02Fix check-spaces complaintsNick Mathewson
2015-09-29fix compilation; mark test fns staticNick Mathewson
2015-09-29Add checks and unit tests for get_interface_address* failureteor (Tim Wilson-Brown)
Ensure that either a valid address is returned in address pointers, or that the address data is zeroed on error. Ensure that free_interface_address6_list handles NULL lists. Add unit tests for get_interface_address* failure cases. Fixes bug #17173. Patch by fk/teor, not in any released version of tor.
2015-09-16ExitPolicyRejectPrivate rejects local IPv6 address and interface addressesteor (Tim Wilson-Brown)
ExitPolicyRejectPrivate now rejects more local addresses by default: * the relay's published IPv6 address (if any), and * any publicly routable IPv4 or IPv6 addresses on any local interfaces. This resolves a security issue for IPv6 Exits and multihomed Exits that trust connections originating from localhost. Resolves ticket 17027. Patch by "teor". Patch on 42b8fb5a1523 (11 Nov 2007), released in 0.2.0.11-alpha.