Age | Commit message (Collapse) | Author | |
---|---|---|---|
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-09-15 | Don't pass invalid memory regions to digestmap_set/get in test_routerlist | Nick Mathewson | |
Fixes bug in c887e20e6a5a2c17c65; bug in no released Tor version. | |||
2014-09-15 | Clean up a clangalyzer warning in directory_remove_invalid | Nick Mathewson | |
"At this point in the code, msg has been set to a string constant. But the tor code checks that msg is not NULL, and the redundant NULL check confuses the analyser[...] To avoid this spurious warning, the patch initialises msg to NULL." Patch from teor. another part of 13157. | |||
2014-09-15 | Clear up another clangalyzer issue | Nick Mathewson | |
"The NULL pointer warnings on the return value of tor_addr_to_in6_addr32() are incorrect. But clang can't work this out itself due to limited analysis depth. To teach the analyser that the return value is safe to dereference, I applied tor_assert to the return value." Patch from teor. Part of 13157. | |||
2014-09-13 | fix typo in comment | Roger Dingledine | |
2014-09-11 | One more whitespace fix | Nick Mathewson | |
2014-09-11 | Whitespace cleanups in test_util | Nick Mathewson | |
2014-09-11 | Whitespace cleanups in transports/test_pt | Nick Mathewson | |
2014-09-11 | Use tor_malloc_zero() in pt tests | Nick Mathewson | |
Fixes for PT tests merged with 8402; patch from Yawning. | |||
2014-09-11 | Merge remote-tracking branch 'origin/maint-0.2.5' | Nick Mathewson | |
2014-09-11 | Merge remote-tracking branch 'public/bug13104_025' | Nick Mathewson | |
2014-09-11 | Fix "comparison is always false" warnings in new test_util_di_ops | Nick Mathewson | |
Having a constant zero means that unsigned < 0 is always false. | |||
2014-09-11 | Reduce log severity for unused ClientTransportPlugin lines | Roger Dingledine | |
Tor Browser includes several ClientTransportPlugin lines in its torrc-defaults file, leading every Tor Browser user who looks at her logs to see these notices and wonder if they're dangerous. Resolves bug 13124; bugfix on 0.2.5.3-alpha. | |||
2014-09-11 | Merge remote-tracking branch 'public/bug13104_025' | Nick Mathewson | |
2014-09-11 | C90 compliance for #13104 fixes | Nick Mathewson | |
2014-09-11 | Avoid an overflow on negation in format_helper_exit_status | Nick Mathewson | |
Part of 13104; patch from teor. | |||
2014-09-10 | Avoid divide by zero and NaNs in scale_array_elements_to_u64 | Nick Mathewson | |
Patch from teor; part of 13104 | |||
2014-09-10 | Extra tests for tor_memeq and memcmp | Nick Mathewson | |
(Patch from teor; part of 13104) | |||
2014-09-10 | Avoid overflows and underflows in sscanf and friends | Nick Mathewson | |
(Patch from teor on 13104) | |||
2014-09-10 | Merge remote-tracking branch 'origin/maint-0.2.5' | Nick Mathewson | |
2014-09-10 | In routerlist_assert_ok(), check r2 before taking &(r2->cache_info) | Nick Mathewson | |
Technically, we're not allowed to take the address of a member can't exist relative to the null pointer. That makes me wonder how any sane compliant system implements the offsetof macro, but let's let sleeping balrogs lie. Fixes 13096; patch on 0.1.1.9-alpha; patch from "teor", who was using clang -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv | |||
2014-09-10 | Merge remote-tracking branch 'yawning/bug_8402' | Nick Mathewson | |
2014-09-10 | Merge remote-tracking branch 'public/torrc_minimal' | Nick Mathewson | |
2014-09-10 | Merge remote-tracking branch 'public/bug12908_025' into maint-0.2.5 | Nick Mathewson | |
2014-09-10 | Mark StrictE{ntry,xit}Nodes as obsolete. | Nick Mathewson | |
2014-09-09 | Fix issues brought up in nickm's review. | Yawning Angel | |
* Update pt_get_proxy_uri() documentation. * proxy_supported is now unsigned. * Added a changes file. | |||
2014-09-09 | Add unittests for finding the third quartile of a set. | George Kadianakis | |
2014-09-09 | Merge remote-tracking branch 'asn/bug13064' | Nick Mathewson | |
2014-09-09 | Remove now-pointless SIZE_MAX stanza from OpenBSD_malloc_linux | Nick Mathewson | |
2014-09-09 | Use S?SIZE_MAX, not S?SIZE_T_MAX | Nick Mathewson | |
This fixes bug 13102 (not on any released Tor) where using the standard SSIZE_MAX name broke mingw64, and we didn't realize. I did this with perl -i -pe 's/SIZE_T_MAX/SIZE_MAX/' src/*/*.[ch] src/*/*/*.[ch] | |||
2014-09-09 | Remove client-side bad directory logic | Sebastian Hahn | |
Implements the second half of #13060. | |||
2014-09-09 | Remove dirauth support for the BadDirectory flag | Sebastian Hahn | |
Implements the first half of #13060. The second half will be to remove client support, too. | |||
2014-09-09 | Merge branch 'bug12899_squashed' | Nick Mathewson | |
2014-09-09 | Remove support for naming directory authorities | Sebastian Hahn | |
This implements the meat of #12899. This commit should simply remove the parts of Tor dirauths used to check whether a relay was supposed to be named or not, it doesn't yet convert to a new mechanism for reject/invalid/baddir/badexiting relays. | |||
2014-09-09 | Merge remote-tracking branch 'origin/maint-0.2.5' | Nick Mathewson | |
2014-09-09 | Merge remote-tracking branch 'andrea/bug12160_025' into maint-0.2.5 | Nick Mathewson | |
2014-09-09 | Merge remote-tracking branch 'public/bug12700_024' into maint-0.2.5 | Nick Mathewson | |
2014-09-09 | Merge remote-tracking branch 'origin/maint-0.2.5' | Nick Mathewson | |
2014-09-09 | Clean up the MVSC nmake files so they work again. | Nick Mathewson | |
Fixes bug 13081; bugfix on 0.2.5.1-alpha. Patch from "NewEraCracker." | |||
2014-09-09 | Merge remote-tracking branch 'origin/maint-0.2.5' | Nick Mathewson | |
2014-09-09 | Add more escaped() calls in directory.c | Nick Mathewson | |
Patch from teor to fix 13071. | |||
2014-09-08 | Merge remote-tracking branch 'origin/maint-0.2.5' | Nick Mathewson | |
2014-09-08 | Expand the event_mask field in controller conns to 64 bits | Nick Mathewson | |
Back in 078d6bcd, we added an event number 0x20, but we didn't make the event_mask field big enough to compensate. Patch by "teor". Fixes 13085; bugfix on 0.2.5.1-alpha. | |||
2014-09-06 | Evaluate TestingDirAuthVoteGuard only after filling all rs elements. | George Kadianakis | |
2014-09-05 | Correctly update channel local mark when address of incoming connection ↵ | Andrea Shepard | |
changes after handshake; fixes bug #12160 | |||
2014-09-04 | Fix add_fingerprint_to_dir() doc and signature | Sebastian Hahn | |
This function never returns non-null, but its usage doesn't reflect that. Let's make it explicit. This will be mostly overridden by later commits, so no changes file here. | |||
2014-09-04 | Remove the AuthDirRejectUnlisted config option | Sebastian Hahn | |
This is in preparation for a big patch series removing the entire Naming system from Tor. In its wake, the approved-routers file is being deprecated, and a replacement option to allow only pre-approved routers is not being implemented. | |||
2014-09-03 | Fix a couple of small memory leaks on failure cases. | Nick Mathewson | |
[CID 1234702, 1234703] | |||
2014-09-03 | Fix some 'dereference-before-null-check' warnings in test_circuitlist.c | Nick Mathewson | |
Found by Coverity Scan. [CID 1234704, 1234705, 1234706] |