summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-22Merge remote-tracking branch 'tor-github/pr/1417'Nick Mathewson
2019-10-22Merge branch 'bug32175'Nick Mathewson
2019-10-22Merge branch 'from_setconf_removal_squashed'Nick Mathewson
2019-10-22changes file for 31999Nick Mathewson
2019-10-22Extract log-granularity code into its own function.Nick Mathewson
This pleases practracker.
2019-10-22Add tests for options_init_logs()Nick Mathewson
2019-10-22Make a pair of add_*_log() functions mockable.Nick Mathewson
2019-10-22Make options_init_logs STATIC for testing.Nick Mathewson
2019-10-22Update tests to handle new interpretation of quiet_level.Nick Mathewson
Two things needed to be changed. First, we used to set quiet_level to the default (QUIET_NONE) when running tests, since we would not call anything that acted based upon it. But since we sometimes call options_init_logs(), we need to pre-set quiet_level to QUIET_SILENT in the logs so that we don't add the default logs. This did not cause test failure: just unwanted logs. Second, we had a test that checked whether options_validate was messing with options->Logs correctly. Since options_validate no longer messes with the logs, we no longer want a test for this.
2019-10-22Rationalize handling of quiet_level in config.cNick Mathewson
Formerly, we would use quiet_level as an excuse to rewrite the log configuration, adding a default log line if none existed, and if RunAsDaemon was not set, and if we were not being invoked via setconf (!). This is against our best practices for several reasons: * We should not be changing configured options except when the user tells us to do so. * We should especially not be changing options in the options_validate function. * Distinguishing whether we are being called from setconf adds a risky special-case. Instead, this patch take a simpler approach: it changes the interpretation of having no logging lines set to mean: If there is a stdout, add a default log based on quiet_level. Solves ticket 31999.
2019-10-22Merge branch 'maint-0.4.2'teor
2019-10-22Merge branch 'maint-0.4.1' into maint-0.4.2teor
2019-10-22Merge branch 'maint-0.4.0' into maint-0.4.1teor
2019-10-22Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-10-22Merge remote-tracking branch 'origin/maint-0.3.5' into maint-0.3.5teor
2019-10-22Merge branch 'ticket32177_041' into ticket32177_042teor
Merge RUST_VERSION from maint-0.4.2 into disabled macOS rust build from ticket32177_041.
2019-10-22Merge branch 'ticket32177_040' into ticket32177_041teor
2019-10-22Merge branch 'ticket32177_035' into ticket32177_040teor
2019-10-22Merge branch 'maint-0.3.5' into ticket32177_035teor
2019-10-22Travis: Disable the Rust macOS buildteor
This build was added in 0.3.5. We need to mitigate slow scheduling of Travis macOS jobs. Closes ticket 32177.
2019-10-22Merge branch 'ticket32177_029' into ticket32177_035teor
Stem from maint-0.3.5, disabled macOS chutney from ticket32177_029.
2019-10-22Travis: Disable all but one macOS buildteor
We need to mitigate slow scheduling of Travis macOS jobs. Closes ticket 32177.
2019-10-21Merge remote-tracking branch 'tor-github/pr/1420'Nick Mathewson
2019-10-21Merge branch 'maint-0.4.0' into maint-0.4.1Nick Mathewson
2019-10-21Merge branch 'maint-0.3.5' into maint-0.4.0Nick Mathewson
2019-10-21Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2019-10-21Merge branch 'maint-0.4.2'Nick Mathewson
2019-10-21Fix a memory leak introduced by the changes to test_options.cNick Mathewson
Since this code passes the same options to options_validate() more than once, options_validate() needs to be prepared for that. (This previously worked by accident, since the smartlist of schedulers wasn't initialized.)
2019-10-21Fix a memory leak introduced by changes to test_options.cNick Mathewson
Since the FirewallPorts smartlist is now initialized, we can't just overwrite it.
2019-10-21Fix up some Windows CI issues.Nick Mathewson
2019-10-21Changes file for 32175 (test_options.c cleanup)Nick Mathewson
2019-10-21test_options.c: Remove TEST_OPTIONS_DEFAULT_VALUESNick Mathewson
This finally became the empty string, since we no longer have to do anything in individual test_options.c tests to make "" be a valid set of options. Now we can remove it at last.
2019-10-21Stop overriding ConnLimit in tests.Nick Mathewson
Now that ConnLimit is set to the default value in the testing helper functions, the individual tests don't all need to make sure it is set to something valid.
2019-10-21test_options.c: remove weird usage of ConnLimitNick Mathewson
Several of our tests assumed that ConnLimit would be set to 0 by default, causing the default options not to be parseable. These tests had nothing to do with ConnLimit.
2019-10-21Stop overriding MaxClientCircuitsPending in tests.Nick Mathewson
Now that MaxClientCircuitsPending is set to the default value in the testing helper functions, the individual tests don't all need to make sure it is set to something valid.
2019-10-21test_options.c: remove weird usage of MaxClientCircuitsPendingNick Mathewson
Several of our tests assumed that MaxClientCircuitsPending would be set to 0 by default, causing the default options not to be parseable. These tests had nothing to do with MaxClientCircuitsPending.
2019-10-21Stop overriding KeepalivePeriod in tests.Nick Mathewson
Now that KeepalivePeriod is set to the default value in the testing helper functions, the individual tests don't all need to make sure it is set to something valid.
2019-10-21test_options.c: remove weird usage of KeepalivePeriod.Nick Mathewson
Several of our tests assumed that KeepalivePeriod would be set to 0 by default, causing the default options not to be parseable. These tests had nothing to do with KeepalivePeriod.
2019-10-21Remove a lot of cruft from TEST_OPTIONS_DEFAULT_VALUES.Nick Mathewson
This macro used to have a big list of "default" values that we needed to set in the test_options tests in order to have reasonable behavior. But now that we initialize options objects to the default settings in these tests, we no longer need such a long list of things to replace.
2019-10-21test_options: use testing options with (almost) real defaults.Nick Mathewson
Previously, we just used options set to all 0s, but this causes some pretty severe workarounds throughout the code, as our options fail to validate, or count as "default" for the wrong reasons. Note that in some places, we stop getting spurious warnings or failures which the tests previously demanded. In these cases, I've changed the test behavior. Fixes 32175.
2019-10-21routermode.h: turn a comment into a doxygen comment.Nick Mathewson
2019-10-21Merge remote-tracking branch 'tor-github/pr/1430'Nick Mathewson
2019-10-21Merge remote-tracking branch 'tor-github/pr/1434'teor
2019-10-21test/getinfo: Remove unnecessary test codeteor
Fix for 31684.
2019-10-21control/getinfo: Use standard error handlingteor
Use BUG() for coding errors, and `< 0` for error checks. Fix to 31684.
2019-10-21Fix changes file and string typosteor
Part of 31684.
2019-10-21control: Add GETINFO support for dumping microdesc consensusAmreshVenugopal
- Allows control port to read microdesc consensus using: GETINFO dir/status-vote/microdesc/consensus add: Helper function `getinfo_helper_current_consensus` test: check if GETINFO commands return expected consensus data. Resolves 31684.
2019-10-21Merge branch 'maint-0.4.2'teor
2019-10-21Merge remote-tracking branch 'tor-github/pr/1168'teor
2019-10-21Merge remote-tracking branch 'tor-github/pr/1422' into maint-0.4.2teor