Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-11-04 | Fix unused-argument warnings | Nick Mathewson | |
2014-11-04 | Merge remote-tracking branch 'andrea/ticket6456' | Nick Mathewson | |
Somewhat tricky conflicts: src/or/config.c Also, s/test_assert/tt_assert in test_config.c | |||
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-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-07-28 | Replace all calls to parse_client_transport_line() or ↵ | Andrea Shepard | |
parse_server_transport_line() with new parse_transport_line() stub | |||
2014-07-25 | Add unit test for ClientTransportPlugin/ServerTransportPlugin config line ↵ | Andrea Shepard | |
parsing | |||
2014-06-20 | Remove code for Windows CE support | Nick Mathewson | |
As far as I know, nobody has used this in ages. It would be a pretty big surprise if it had worked. Closes ticket 11446. | |||
2014-05-01 | Fix test_config_write_to_data_subdir | Nick Mathewson | |
Bugfix on aa0eb2022342798fc78b2bde89d393f37c59fe78; bugfix not on any released Tor. | |||
2014-04-29 | Fix leaks in tests related to setting options->DataDirectory | Nick Mathewson | |
We pre-populate that value in main(), and we weren't freeing it before overriding it. | |||
2014-04-26 | Memory leaks in test_config_addressmap | Nick Mathewson | |
2014-04-11 | Add another unit test for parse_bridge_line(). | George Kadianakis | |
2014-02-17 | Restitute a successful stat call to this test case. | dana koch | |
Since the first stat call is made for it to deliberately fail, and we reference st.st_mode without st having valid data, st.st_mode can contain garbage and cause chmod to fail with EINVAL. We rerun stat and ensure it succeeded. Also make use of tt_abort_perror, to properly convey failure reasons to the user. | |||
2014-02-14 | fix a whitespace snafu | Nick Mathewson | |
2014-02-11 | Free leakable values in the unit tests. | Nick Mathewson | |
Thanks, Coverity! (CID 1171414, 1171415, 1171416) | |||
2014-02-03 | test_config.c: log which address should have failed | Nick Mathewson | |
2013-09-03 | Fix warnings in test_config_fix_my_family | Nick Mathewson | |
2013-08-31 | MyFamily option will now fix fingerprints missing their leading instead of ↵ | Kevin Butler | |
complaining. Should fix #4341. | |||
2013-07-18 | Fix memory leaks in test_config_parse_transport_options_line | Nick Mathewson | |
2013-07-18 | Write unit tests for the ServerTransportOptions parsing function. | George Kadianakis | |
2013-06-18 | Check more return values in the unit tests | Nick Mathewson | |
2013-06-18 | Fix a couple of resource leaks in test_config.c | Nick Mathewson | |
Spotted by Coverity Scan. Not in any released Tor. | |||
2013-05-29 | Fix windows compilation warning in test_config.c | Nick Mathewson | |
bugfix on 78cc5833a1da038331186ddf07f4add7f8f1094b; bug not in any released Tor. Spotted by weasel using Jenkins. | |||
2013-05-24 | Tweak 4282 unit tests for style, safety, correctness. | Nick Mathewson | |
We do our filesystem wrangling relative to get_fname() results, so that if we fail or crash, we can always clean up. | |||
2013-05-24 | Unit tests for check_or_create_data_subdir and write_to_data_subdir. | Peter Retzlaff | |
2013-02-11 | Add parse_bridge_line() unittests. | George Kadianakis | |
2013-01-16 | Update the copyright date to 201. | Nick Mathewson | |
2012-12-17 | Implement option to turn off DNS cache use on a client port | Nick Mathewson | |
(This is part 2 of making DNS cache use enabled/disabled on a per-client port basis. This implements the CacheIPv[46]DNS options, but not the UseCachedIPv[46] ones.) | |||
2012-11-14 | Move address map into its own file. | Nick Mathewson | |
2012-09-13 | Split the generic config_fmt_t code into a new confparse.c file | Nick Mathewson | |
This helps us split up one of our larger files, and sets the stage for refactoring the configuration backend a little | |||
2012-06-13 | Merge remote-tracking branch 'public/bug3940_redux' | Nick Mathewson | |
2012-06-04 | Update copyright dates to 2012; add a few missing copyright statements | Nick Mathewson | |
2012-05-11 | An attempt at bug3940 and making AllowDotExit 0 work with MapAddress | Nick Mathewson | |
This time, I follow grarpamp's suggestion and move the check for .exit+AllowDotExit 0 to the top of connection_ap_rewrite_and_attach, before any rewriting occurs. This way, .exit addresses are forbidden as they arrive from a socks connection or a DNSPort request, and not otherwise. It _is_ a little more complicated than that, though. We need to treat any .exit addresses whose source is TrackHostExits as meaning that we can retry without that exit. We also need to treat any .exit address that comes from an AutomapHostsOnResolve operation as user-provided (and thus forbidden if AllowDotExits==0), so that transitioning from AllowDotExits==1 to AllowDotExits==0 will actually turn off automapped .exit addresses. | |||
2011-12-02 | Appease check-spaces | Sebastian Hahn | |
2011-11-30 | Merge branch 'bug933_nm_rebased_v2' | Nick Mathewson | |
Conflicts: src/test/test.c | |||
2011-11-30 | No new "LEGACY" tests allowed. | Nick Mathewson | |
2011-11-30 | Fix compilation: get_options() now returns const | Nick Mathewson | |
2011-11-30 | Address nickm's comments at ↵ | Robert Hogan | |
https://trac.torproject.org/projects/tor/ticket/933#comment:8 1. Only allow '*.' in MapAddress expressions. Ignore '*ample.com' and '.example.com'. This has resulted in a slight refactoring of config_register_addressmaps. 2. Add some more detail to the man page entry for AddressMap. 3. Fix initialization of a pointer to NULL rather than 0. 4. Update the unit tests to cater for the changes in 1 and test more explicitly for recursive mapping. | |||
2011-11-30 | Address nickm's comments at ↵ | Robert Hogan | |
https://trac.torproject.org/projects/tor/ticket/933#comment:4 1. Implement the following mapping rules: MapAddress a.b.c d.e.f # This is what we have now MapAddress .a.b.c d.e.f # Replaces any address ending with .a.b.c with d.e.f MapAddress .a.b.c .d.e.f # Replaces the .a.b.c at the end of any addr with .d.e.f (Note that 'a.b.c .d.e.f' is invalid, and will be rejected.) 2. Add tests for the new rules. 3. Allow proper wildcard annotation, i.e. '*.d.e' '.d.e' will still work. 4. Update addressmap_entry_t with an is_wildcard member. | |||
2011-11-30 | bug933 - Match against super-domains in MapAddress | Robert Hogan | |
Allow MapAddress to handle directives such as: MapAddress .torproject.org .torserver.exit MapAddress .org 1.1.1.1 Add tests for addressmap_rewrite. |