aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_dir.c
AgeCommit message (Collapse)Author
2018-07-18Merge branch 'maint-0.2.9' into maint-0.3.2Nick Mathewson
2018-07-18Add a test for format_recommended_version_list.Nick Mathewson
2018-05-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-10Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-09Test read bandwidth measurements with empty filejuga0
2017-12-12Make sure bridges are definitely running before delaying directory fetchesteor
Retry directory downloads when we get our first bridge descriptor during bootstrap or while reconnecting to the network. Keep retrying every time we get a bridge descriptor, until we have a reachable bridge. Stop delaying bridge descriptor fetches when we have cached bridge descriptors. Instead, only delay bridge descriptor fetches when we have at least one reachable bridge. Fixes bug 24367; bugfix on 0.2.0.3-alpha.
2017-12-11Run the download_status_increment test in a forked process.Nick Mathewson
It messes with global state somehow in a way that makes several of the entryconn tests fail now.
2017-11-22Stop checking cached bridge descriptors for usable bridgesteor
Stop checking for bridge descriptors when we actually want to know if any bridges are usable. This avoids potential bootstrapping issues. Fixes bug 24367; bugfix on 0.2.0.3-alpha. Stop stalling when bridges are changed at runtime. Stop stalling when old bridge descriptors are cached, but they are not in use. Fixes bug 24367; bugfix on 23347 in 0.3.2.1-alpha.
2017-11-08Merge branch 'bug23816_029_squashed' into maint-0.3.2Nick Mathewson
2017-11-08Replace our random-exponential-delay algorithm.Nick Mathewson
This patch has implementations of the "decorrelated" and "full" algorithms from https://www.awsarchitectureblog.com/2015/03/backoff.html
2017-10-31test: Initialize the voting schedule in test_dir.cDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-20Unit test to make sure that our platform string is parseableNick Mathewson
Closes 22109.
2017-09-15Merge branch 'scan-build-032'Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-12Fix warnings about passing uninitialized buffers into functionsNick Mathewson
Most of these buffers were never actually inspected, but it's still bad style.
2017-09-12Clear up dead-assignment warnings from scan-buildNick Mathewson
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