aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_dir.c
AgeCommit message (Collapse)Author
2017-09-12Make clients wait to refresh bridges when they have a recent descriptorteor
But when clients are just starting, make them try each bridge a few times before giving up on it. These changes make the bridge download schedules more explicit: before 17750, they relied on undocumented behaviour and specific schedule entries. (And between 17750 and this fix, they were broken.) Fixes 23347, not in any released version of tor.
2017-08-24Ensure that `make check-spaces` is happy.Alexander Færøy
The `test-operator-cleanup` patch, and related coccinelle patches, don't do any checks for line length. This patch fixes the line length issues caused by the previous commits.
2017-08-24apply ahf's test_assert_null.cocciNick Mathewson
2017-08-24apply ahf's test_assert_int.cocciNick Mathewson
2017-08-24apply ahf's test_assert_zero.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-07-14Merge branch 'bug17750_029_squashed'Nick Mathewson
2017-07-14Fix a signed integer overflow in dir/download_status_random_backoffNick Mathewson
Fix for 22924. Bugfix on 0.2.9.1-alpha when the test was introducd -- though it couldn't actually overflow until we fixed 17750. Additionally, this only seems to overflow on 32-bit, and only when the compiler doesn't re-order the (possibly dead) assignment out of the way. We ran into it on a 32-bit ubuntu trusty builder.
2017-07-07Merge branch 'bug17750_029_squashed'Nick Mathewson
2017-07-07Refactor exponential backoff multipliers into macrosteor
There are only so many times you can type "4".
2017-07-07Add regression tests for 17750 and 20534teor
2017-07-07Make clients try fallbacks before authoritiesteor
Make clients wait for 6 seconds before trying to download their consensus from an authority. Fixes bug 17750, bugfix on 0.2.8.1-alpha.
2017-07-07Fix the expected bug warning in dir/param_voting_lookup testsNick Mathewson
2017-04-27Merge branch 'dirreq'Nick Mathewson
2017-04-24Add regression test for #22304Taylor Yu
2017-04-21Remove old directory_initiate_command_*() functions.Nick Mathewson
2017-04-21Have directory_get_from_all_authorities use requests.Nick Mathewson
2017-03-17Merge branch 'ahf_bugs_21641_squashed'Nick Mathewson
2017-03-17Make MIN_ONION_KEY_LIFETIME a consensus parameter defined value.Alexander Færøy
This patch turns `MIN_ONION_KEY_LIFETIME` into a new function `get_onion_key_lifetime()` which gets its value from a network consensus parameter named "onion-key-rotation-days". This allows us to tune the value at a later point in time with no code modifications. We also bump the default onion key lifetime from 7 to 28 days as per proposal #274. See: https://bugs.torproject.org/21641
2017-03-15Run the copyright update script.Nick Mathewson
2017-02-28Merge remote-tracking branch 'teor/test21470-029'Nick Mathewson
2017-02-19Reject versions that have non-numeric prefixesteor
Unit tests #21507. Part of #21470.
2017-02-19Add unit tests that ensure out of range versions are rejectedteor
Unit tests for #21278. Part of #21470.
2017-02-19Add unit tests for version parsing integer size inconsistenciesteor
Unit tests for #21450. Part of #21470.
2017-02-19Add unit tests for current tor version git tagsteor
Related to #21470
2017-02-19Add unit tests for the current range of tor version status tagsteor
Related to #21470.
2016-12-16Merge branch 'ticket20831_v2'Nick Mathewson
2016-12-16Remove UseDirectoryGuardsNick Mathewson
It is obsoleted in an always-on direction by prop271.
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-16Add a wrapper for a common networkstatus param patternNick Mathewson
We frequently want to check a networkstatus parameter only when it isn't overridden from the torrc file.
2016-12-07Capture warning in dir/purpose_needs_anonymity_returns_true_by_defaultNick Mathewson
2016-11-30Use the new guard notification/selection APIs throughout TorNick Mathewson
This patch doesn't cover every case; omitted cases are marked with "XXXX prop271", as usual. It leaves both the old interface and the new interface for guard status notification, since they don't actually work in the same way: the new API wants to be told when a circuit has failed or succeeded, whereas the old API wants to know when a channel has failed or succeeded. I ran into some trouble with directory guard stuff, since when we pick the directory guard, we don't actually have a circuit to associate it with. I solved that by allowing guard states to be associated with directory connections, not just circuits.
2016-11-07Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-07Fix another 20499-broken testNick Mathewson
2016-11-07Fix a unit test (broken by recent 20499 hacking)Nick Mathewson
2016-11-04Fix make check-spacesNick Mathewson
2016-11-04Merge branch 'ticket17238_029_02-resquash'Nick Mathewson
Conflicts: src/or/rendclient.c src/or/rendcommon.c src/or/routerparse.c src/test/test_dir.c src/trunnel/ed25519_cert.h
2016-11-04prop224: Directory support for v3 descriptor publishingDavid Goulet
Closes #19205 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-10-28Hopefully fix int64 comparisons in test_dir_networkstatus_compute_bw_weights_v10Matt Traudt
2016-10-27Resolve memory leaks in test_dir_networkstatus_compute_bw_weights_v10Nick Mathewson
2016-10-27Convert remaining files to smartlist_add_strdupovercaffeinated
The coccinelle script produced errors with these test files so convert the remaining cases of smartlist_add to smartlist_add_strdup by hand.
2016-10-27Automated change to use smartlist_add_strdupovercaffeinated
Use the following coccinelle script to change uses of smartlist_add(sl, tor_strdup(str)) to smartlist_add_strdup(sl, string) (coccinelle script from nickm via bug 20048): @@ expression a; expression b; @@ - smartlist_add + smartlist_add_strdup (a, - tor_strdup( b - ) )
2016-10-26Add historic bwweight tests, comments, line len fixesMatt Traudt
2016-10-26Add consensus weight calculation testsMatt Traudt
2016-10-26Allow asking a bridge's own descriptor over one-hop connectionNick Mathewson
When we refactored purpose_needs_anonymity(), we made it so _all_ bridge requests required anonymity. But that missed the case that we are allowed to ask a bridge for its own descriptor. With this patch, we consider the resource, and allow "authority.z" ("your own descriptor, compressed") for a bridge's server descriptor to be non-anonymous. Fix for bug 20410; bug not in any released Tor.
2016-10-19BUG in purpose_needs_anonymity if switch not matched.Nick Mathewson
I believe that this should never trigger, but if it does, it suggests that there was a gap between is_sensitive_dir_purpose and purpose_needs_anonymity that we need to fill. Related to 20077.
2016-10-19Refactor purpose_needs_anonymity to use switch statementChelsea H. Komlo
2016-10-18Refactor to use purpose_needs_anonymity and remove is_sensitive_dir_purposeChelsea H. Komlo
2016-09-26Merge remote-tracking branch 'public/ticket20001_v2'Nick Mathewson
2016-09-26Merge branch 'protover_v2_squashed'Nick Mathewson