aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-09-26 13:37:06 +1000
committerteor <teor@torproject.org>2019-09-30 22:05:00 +1000
commitdb329522ef6f0d0971111cbd07f35d54e0c7eced (patch)
tree2050fd94481605344e1e58d77535f56575b20bf7 /src/test
parent25c5322dfe228178391b37fffd3333abdf57baa5 (diff)
downloadtor-db329522ef6f0d0971111cbd07f35d54e0c7eced.tar.gz
tor-db329522ef6f0d0971111cbd07f35d54e0c7eced.zip
log: When initialising log domain masks, only set known log domains
And add a runtime test that checks for unknown domains and flags. Fixes bug 31854; bugfix on 0.2.1.1-alpha.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_options.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_options.c b/src/test/test_options.c
index b3654ede7d..9eb5a43924 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -54,9 +54,9 @@ setup_log_callback(void)
{
log_severity_list_t lst;
memset(&lst, 0, sizeof(lst));
- lst.masks[SEVERITY_MASK_IDX(LOG_ERR)] = ~0;
- lst.masks[SEVERITY_MASK_IDX(LOG_WARN)] = ~0;
- lst.masks[SEVERITY_MASK_IDX(LOG_NOTICE)] = ~0;
+ lst.masks[SEVERITY_MASK_IDX(LOG_ERR)] = LD_ALL_DOMAINS;
+ lst.masks[SEVERITY_MASK_IDX(LOG_WARN)] = LD_ALL_DOMAINS;
+ lst.masks[SEVERITY_MASK_IDX(LOG_NOTICE)] = LD_ALL_DOMAINS;
add_callback_log(&lst, log_cback);
mark_logs_temp();
}