aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_options.c
AgeCommit message (Collapse)Author
2016-12-08Use the correct preprocessor macro for Linuxcypherpunks
Also combine all of the checks into one if-tree as only one of them should actually succeed.
2016-12-07Netbsd doesn't have ipfw, only the regular pf transport stuff.Nick Mathewson
Attempted fix for 19960. Also, fixes a typo.
2016-12-07Increase verbosity on options/validate__transproxyNick Mathewson
This is an attempt to figure out what's up with #19960
2016-11-01Attempt to fix unit tests on netbsdNick Mathewson
2016-09-13Fix a memory leak in options/validate__single_onionNick Mathewson
2016-09-13options/validate__single_onion test: use new log capture apiNick Mathewson
I changed the API here in deb294ff532d074a7d4, to be less annoying to use.
2016-09-13Merge branch 'feature-17178-v7-squashed-v2'Nick Mathewson
2016-09-13Replace OnionService* with HiddenService* in option namesteor
And make consequential line-length adjustments.
2016-09-13Refactor Single Onion code to improve consistencyteor
* Check consistency between the two single onion torrc options * Use the more relevant option each time we check for single onion mode * Clarify log messages * Clarify comments * Otherwise, no behaviour change
2016-09-13Implement Prop #260: Single Onion Servicesteor (Tim Wilson-Brown)
Add experimental OnionServiceSingleHopMode and OnionServiceNonAnonymousMode options. When both are set to 1, every hidden service on a tor instance becomes a non-anonymous Single Onion Service. Single Onions make one-hop (direct) connections to their introduction and renzedvous points. One-hop circuits make Single Onion servers easily locatable, but clients remain location-anonymous. This is compatible with the existing hidden service implementation, and works on the current tor network without any changes to older relays or clients. Implements proposal #260, completes ticket #17178. Patch by teor & asn. squash! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement Prop #260: Single Onion Services Redesign single onion service poisoning. When in OnionServiceSingleHopMode, each hidden service key is poisoned (marked as non-anonymous) on creation by creating a poison file in the hidden service directory. Existing keys are considered non-anonymous if this file exists, and anonymous if it does not. Tor refuses to launch in OnionServiceSingleHopMode if any existing keys are anonymous. Similarly, it refuses to launch in anonymous client mode if any existing keys are non-anonymous. Rewrite the unit tests to match and be more comprehensive. Adds a bonus unit test for rend_service_load_all_keys().
2016-09-08Simplify log_test_helpers interfaceNick Mathewson
Previously, you needed to store the previous log severity in a local variable, and it wasn't clear if you were allowed to call these functions more than once.
2016-09-08Remove redundant definitions of expect_{no_,}log_msg()Nick Mathewson
2016-08-03Add new warn_deprecated option to config_assign*().Nick Mathewson
Also, collapse all the config_assign*() options into a flags argument, since having two boolean arguments was already confusing.
2016-06-11Add -Wmissing-variable-declarations, with attendant fixesNick Mathewson
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
2016-04-12Merge branch 'maint-0.2.8'Nick Mathewson
2016-04-07Turn TestingClientBootstrap* into non-testing optionsDavid Goulet
This changes simply renames them by removing "Testing" in front of them and they do not require TestingTorNetwork to be enabled anymore. Fixes #18481 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2016-04-07When we get a bad nickname, explain what a good one is.Nick Mathewson
Closes #18300; patch from "icanhasaccount".
2016-03-21test_options.c: assert that TransProxyType is testedSteven Chamberlain
If a new platform defines USE_TRANSPARENT, ensure that a test runs for its TransProxyType.
2016-03-17test_options.c: NULL a pointer after free #18447Steven Chamberlain
tdata will be double-freed if none of linux, __FreeBSD__, DARWIN or __OpenBSD__ are defined. (For example, FreeBSD derivatives).
2016-03-11Add changes file for 18448; refactorNick Mathewson
(I've made it so FreeBSD || FreeBSD_kernel is enough to ensure that we think you might have ipfw, and so that the logic is all in one place.)
2016-03-11enable and test transproxy on FreeBSD derivatives #18448Steven Chamberlain
The transproxy feature is only enabled when __FreeBSD__ is defined, and only regular FreeBSD does that. Change this to __FreeBSD_kernel__ which is defined on derivatives as well. This enables the relevant options/validate__transproxy test on FreeBSD derivatives.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-24Fix a leak in test_have_enough_mem_for_dircacheNick Mathewson
2016-02-24Remove the freelist from memarea.cNick Mathewson
This is in accordance with our usual policy against freelists, now that working allocators are everywhere. It should also make memarea.c's coverage higher. I also doubt that this code ever helped performance.
2016-02-22Another memory leak in the testsNick Mathewson
2016-02-22Fix a bunch of memory leaks in the unit testsNick Mathewson
2016-02-11Merge branch 'feature17840-v11-tests_truncated'Nick Mathewson
2016-02-01Fix warnings from check-spacesNick Mathewson
2016-02-01Make all unit tests independent of log message order and countteor (Tim Wilson-Brown)
2016-02-01Report malformed options in options_validate unit teststeor (Tim Wilson-Brown)
2016-02-01Add a helper to search for strings in the log, and change option tests to ↵Ola Bini
use this helper instead of looking at specific indices in the log list
2016-02-01Add unit tests for ClientUseIPv[4,6] and ClientPreferIPv6[OR,Dir]Portteor (Tim Wilson-Brown)
2016-02-01Report malformed options in options_validate unit teststeor (Tim Wilson-Brown)
2016-02-01Fix existing options_validate unit tests for ClientUseIPv4teor (Tim Wilson-Brown)
2016-02-01Add a helper to search for strings in the log, and change option tests to ↵Ola Bini
use this helper instead of looking at specific indices in the log list
2016-01-27attempt to fix crashes in unit testsNick Mathewson
2016-01-19Merge remote-tracking branch 'twstrike/options_test'Nick Mathewson
2016-01-19Make sure that tests for domain sockets only run on OSes with domain socketsOla Bini
2016-01-19Use correct u64 int ops instead of regular int ops, in order to avoid ↵Ola Bini
warnings on 32bit clang
2016-01-15Whitespace cleanupNick Mathewson
2016-01-13Update tests to match current changes to options_validateOla Bini
2016-01-13Move clearing of log messages on advice from @cypherpunks, in order to ↵Ola Bini
minimize risk of race conditions leading to another memory leak
2016-01-13Revert my addition of callback cleaner and instead use existing ↵Ola Bini
functionality for temporary log files
2016-01-13Remove a small memory leak in log callback setupOla Bini
2016-01-13Fix memory leaksOla Bini
2016-01-13Fix all white space issuesOla Bini
2016-01-13Fix some issues in gcc warningsOla Bini
2016-01-13Add tests for options_actOla Bini
2015-12-18Add new DirCache configuration optionMatthew Finkel
This will give relay operators the ability of disabling the caching of directory data. In general, this should not be necessary, but on some lower-resource systems it may beneficial.
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson