aboutsummaryrefslogtreecommitdiff
path: root/src/test/testing_common.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-17 13:23:11 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-22 07:50:13 -0400
commit98c3b3bb4ca7679a5045f285db7fd30b5d069615 (patch)
treeaf5835737afa7acb612dc1d8fd45634510fb65a1 /src/test/testing_common.c
parente07b19d3055f9ce080efaf2295f1ca096b10db3c (diff)
downloadtor-98c3b3bb4ca7679a5045f285db7fd30b5d069615.tar.gz
tor-98c3b3bb4ca7679a5045f285db7fd30b5d069615.zip
Update tests to handle new interpretation of quiet_level.
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.
Diffstat (limited to 'src/test/testing_common.c')
-rw-r--r--src/test/testing_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index ff6028ddb4..e14a169407 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -272,6 +272,9 @@ main(int c, const char **v)
control_initialize_event_queue();
+ /* Don't add default logs; the tests manage their own. */
+ quiet_level = QUIET_SILENT;
+
for (i_out = i = 1; i < c; ++i) {
if (!strcmp(v[i], "--warn")) {
loglevel = LOG_WARN;