Age | Commit message (Collapse) | Author | |
---|---|---|---|
2017-09-15 | Merge branch 'scan-build-032' | Nick Mathewson | |
2017-09-15 | Run our #else/#endif annotator on our source code. | Nick Mathewson | |
2017-09-12 | Clear up dead-assignment warnings from scan-build | Nick Mathewson | |
2017-08-24 | apply ahf's test_assert_int.cocci | Nick Mathewson | |
2017-07-05 | Merge branch 'maint-0.3.0' into maint-0.3.1 | Nick Mathewson | |
2017-07-05 | Merge branch 'maint-0.2.8' into maint-0.2.9 | Nick Mathewson | |
2017-07-05 | Merge branch 'maint-0.2.7-redux' into maint-0.2.8 | Nick Mathewson | |
2017-07-05 | Merge branch 'maint-0.2.5' into maint-0.2.6 | Nick Mathewson | |
2017-07-05 | Merge branch 'maint-0.2.4' into maint-0.2.5 | Nick Mathewson | |
2017-07-03 | Fix assertion failure related to openbsd strtol(). | Nick Mathewson | |
Fixes bug 22789; bugfix on 0.2.3.8-alpha. | |||
2017-05-26 | Mock tor_addr_lookup() during part of addr/basic test. | Nick Mathewson | |
If this function isn't mocked, then our unit tests break on stupid networks where localhost is broken or absent. Fixes bug 6298; bugfix on 0.0.9pre2. | |||
2017-03-15 | Run the copyright update script. | Nick Mathewson | |
2016-10-11 | Fix a bug in displaying IPv6 addrs in test_op_ipv6_ with --verbose | Nick Mathewson | |
The test code, if it failed, or if it was run in verbose mode, would use the wrong variable for its loop. Patch from rubiate uploaded to 19999. | |||
2016-09-06 | checkSpace.pl now forbids more identifiers. | Nick Mathewson | |
The functions it warns about are: assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc, strdup, strndup, calloc. Also, fix a few lingering instances of these in the code. Use other conventions to indicate _intended_ use of assert and malloc/realloc/etc. | |||
2016-07-28 | Fix all -Wshadow warnings on Linux | Nick Mathewson | |
This is a partial fix for 18902. | |||
2016-02-27 | Update the copyright year. | Nick Mathewson | |
2016-01-03 | Test another codepath in inet_ntop | Nick Mathewson | |
2015-01-02 | Bump copyright dates to 2015, in case someday this matters. | Nick Mathewson | |
2014-11-12 | Merge remote-tracking branch 'public/bug7484' | Nick Mathewson | |
Conflicts: src/test/test_addr.c | |||
2014-11-12 | Fix wide lines (from 13172) | Nick Mathewson | |
2014-11-12 | Replace operators used as macro arguments with OP_XX macros | Nick Mathewson | |
Part of fix for 13172 | |||
2014-10-28 | Add another year to our copyright dates. | Nick Mathewson | |
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right? | |||
2014-09-16 | clean up eol whitespace from coccinelle-generated patches | Nick Mathewson | |
2014-09-16 | Remove the legacy_test_helper and legacy_setup wrappers | Nick Mathewson | |
These wrappers went into place when the default type for our unit test functions changed from "void fn(void)" to "void fn(void *arg)". To generate this patch, I did the same hokey-pokey as before with replacing all operators used as macro arguments, then I ran a coccinelle script, then I ran perl script to fix up everything that used legacy_test_helper, then I manually removed the legacy_test_helper functions, then I ran a final perl script to put the operators back how they were. ============================== #!/usr/bin/perl -w -i -p s/==,/_X_EQ_,/g; s/!=,/_X_NE_,/g; s/<,/_X_LT_,/g; s/>,/_X_GT_,/g; s/>=,/_X_GEQ_,/g; s/<=,/_X_LEQ_,/g; -------------------- @@ identifier func =~ "test_.*$"; statement S, S2; @@ static void func ( -void +void *arg ) { ... when != S2 +(void) arg; S ... } -------------------- #!/usr/bin/perl -w -i -p s/, *legacy_test_helper, *([^,]+), *\&legacy_setup, *([^\}]+) *}/, $2, $1, NULL, NULL }/g; -------------------- #!/usr/bin/perl -w -i -p s/_X_NEQ_/!=/g; s/_X_NE_/!=/g; s/_X_EQ_/==/g; s/_X_GT_/>/g; s/_X_LT_/</g; s/_X_GEQ_/>=/g; s/_X_LEQ_/<=/g; -------------------- | |||
2014-09-15 | Replace all uses of test_{str,}eq | Nick Mathewson | |
2014-09-15 | Replace the remaining test_assert instances | Nick Mathewson | |
2014-09-15 | Make not even macros use test_fail_msg. | Nick Mathewson | |
2014-09-15 | Use coccinelle scripts to clean up our unit tests | Nick Mathewson | |
This should get rid of most of the users of the old test_* functions. Some are in macros and will need manual cleanup, though. This patch is for 13119, and was automatically generated with these scripts. The perl scripts are there because coccinelle hates operators as macro arguments. ------------------------------ s/==,/_X_EQ_,/g; s/!=,/_X_NE_,/g; s/<,/_X_LT_,/g; s/>,/_X_GT_,/g; s/>=,/_X_GEQ_,/g; s/<=,/_X_LEQ_,/g; ------------------------------ @@ expression a; identifier func; @@ func (...) { <... -test_fail_msg +TT_DIE ( +( a +) ) ...> } @@ identifier func; @@ func (...) { <... -test_fail() +TT_DIE(("Assertion failed.")) ...> } @@ expression a; identifier func; @@ func (...) { <... -test_assert +tt_assert (a) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_eq +tt_int_op (a, +_X_EQ_, b) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_neq +tt_int_op (a, +_X_NEQ_, b) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_streq +tt_str_op (a, +_X_EQ_, b) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_strneq +tt_str_op (a, +_X_NEQ_, b) ...> } @@ expression a, b; identifier func; @@ func (...) { <... -test_eq_ptr +tt_ptr_op (a, +_X_EQ_, b) ...> } @@ expression a, b; identifier func; @@ func() { <... -test_neq_ptr +tt_ptr_op (a, +_X_NEQ_, b) ...> } @@ expression a, b, len; identifier func; @@ func (...) { <... -test_memeq +tt_mem_op (a, +_X_EQ_, b, len) ...> } @@ expression a, b, len; identifier func; @@ func (...) { <... -test_memneq +tt_mem_op (a, +_X_NEQ_, b, len) ...> } ------------------------------ @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a == b +a, _X_EQ_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a == b +a, _X_EQ_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a == b +a, _X_EQ_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a == b +a, _X_EQ_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a == b +a, _X_EQ_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a != b +a, _X_NEQ_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a >= b +a, _X_GEQ_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a <= b +a, _X_LEQ_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a > b +a, _X_GT_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a > b +a, _X_GT_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a > b +a, _X_GT_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a > b +a, _X_GT_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a > b +a, _X_GT_, b ) ...> } @@ char a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a < b +a, _X_LT_, b ) ...> } @@ int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a < b +a, _X_LT_, b ) ...> } @@ long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_int_op ( -a < b +a, _X_LT_, b ) ...> } @@ unsigned int a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a < b +a, _X_LT_, b ) ...> } @@ unsigned long a, b; identifier func; @@ func (...) { <... -tt_assert +tt_uint_op ( -a < b +a, _X_LT_, b ) ...> } ------------------------------ s/_X_NEQ_/!=/g; s/_X_NE_/!=/g; s/_X_EQ_/==/g; s/_X_GT_/>/g; s/_X_LT_/</g; s/_X_GEQ_/>=/g; s/_X_LEQ_/<=/g; s/test_mem_op\(/tt_mem_op\(/g; | |||
2014-04-19 | scan-build: avoid undef behaior in tor_inet_pton | Nick Mathewson | |
If we had an address of the form "1.2.3.4" and we tried to pass it to tor_inet_pton with AF_INET6, it was possible for our 'eow' pointer to briefly move backwards to the point before the start of the string, before we moved it right back to the start of the string. C doesn't allow that, and though we haven't yet hit a compiler that decided to nuke us in response, it's best to fix. So, be more explicit about requiring there to be a : before any IPv4 address part of the IPv6 address. We would have rejected addresses without a : for not being IPv6 later on anyway. | |||
2014-04-07 | Fix some harmless/untriggerable memory leaks found by coverity | Nick Mathewson | |
2014-04-05 | Merge remote-tracking branch 'public/bug10801_024' | Nick Mathewson | |
Conflicts: src/common/address.c src/or/config.c | |||
2014-04-05 | Make tor_addr_port_parse handle portless IPv6 addresses correctly. | Nick Mathewson | |
(Not a bugfix on any Tor release; before 10801_024, it didn't handle portless addresses at all.) | |||
2014-04-05 | Add a test for default/port conflicts in tor_addr_port_parse | Nick Mathewson | |
2014-04-01 | Merge remote-tracking branch 'public/bug4645' | Nick Mathewson | |
Conflicts: src/or/dirserv.c | |||
2014-03-27 | Don't do a DNS lookup on a bridge line address | Nick Mathewson | |
Fixes bug 10801; bugfix on 07bf274d in 0.2.0.1-alpha. | |||
2014-03-03 | Fix compilation warnings in tor_addr_make_null patch | Nick Mathewson | |
There was one "missing prototype" warning because the test function wasn't static, and one "unused parameter" warning about the "data" parameter. Also, I added a couple of tests to make sure that the "make_null" addresses really were the addresses we expected, by formatting them as strings. | |||
2014-03-03 | add test for tor_addr_make_null | Kevin Murray | |
Signed-off-by: Kevin Murray <spam@kdmurray.id.au> | |||
2014-02-12 | Disallow "*/maskbits" as an address pattern. | Nick Mathewson | |
Fixes bug 7484. We've had this bug back in a8eaa79e031ee04d44 in 0.0.2pre14, when we first started allowing address masks. | |||
2014-02-06 | Rename sun to s_un in test_addr.c | Nick Mathewson | |
Apparently the compiler on solaris 9 didn't like "sun" as an identifier. Fix for bug 10565; bugfix on 0.2.5.1-alpha. | |||
2014-02-03 | Removing is_internal_IP() function. Resolves ticket 4645. | rl1987 | |
2013-03-18 | Fix a double-newline | Nick Mathewson | |
2013-03-18 | Merge remote-tracking branch 'origin/maint-0.2.4' | Nick Mathewson | |
Conflicts: src/test/test_addr.c | |||
2013-03-18 | Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4 | Nick Mathewson | |
Conflicts: src/test/test_addr.c | |||
2013-03-01 | Unit tests for a few more functions and cases in address.c | Nick Mathewson | |
This brings address's coverage up over 80%. | |||
2013-03-01 | Add unit test for tor_addr_is_loopback | Nick Mathewson | |
2013-01-16 | Update the copyright date to 201. | Nick Mathewson | |
2012-12-17 | Build and test most of the machinery needed for IPv6 virtualaddrmaps | Nick Mathewson | |
With an IPv6 virtual address map, we can basically hand out a new IPv6 address for _every_ address we connect to. That'll be cool, and will let us maybe get around prop205 issues. This uses some fancy logic to try to make the code paths in the ipv4 and the ipv6 case as close as possible, and moves to randomly generated addresses so we don't need to maintain those stupid counters that will collide if Tor restarts but apps don't. Also has some XXXX items to fix to make this useful. More design needed. | |||
2012-12-07 | Merge branch 'win64-7260' | Nick Mathewson | |
Conflicts: src/or/dns.c | |||
2012-11-27 | Merge branch 'bug7013_take2_squashed' | Nick Mathewson | |
2012-11-27 | Introduce tor_addr_port_parse() and use it to parse ServerTransportListenAddr. | George Kadianakis | |