]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Always log [bug] warnings from the unit tests.
authorNick Mathewson <nickm@torproject.org>
Wed, 31 Aug 2016 17:22:07 +0000 (13:22 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 31 Aug 2016 17:22:07 +0000 (13:22 -0400)
We should consider them bugs.  If they are happening intentionally,
we should use the log_test_helpers code to capture and suppress
them.  But having them off-by-default has potential to cause
programming errors.

src/test/testing_common.c

index ea9366305cdef06b773407c9365f056a6fe328aa..e3fe87cb4352904fd4a7eb35d42b215f38ee6da1 100644 (file)
@@ -272,6 +272,8 @@ main(int c, const char **v)
     log_severity_list_t s;
     memset(&s, 0, sizeof(s));
     set_log_severity_config(loglevel, LOG_ERR, &s);
+    /* ALWAYS log bug warnings. */
+    s.masks[LOG_WARN-LOG_ERR] |= LD_BUG;
     add_stream_log(&s, "", fileno(stdout));
   }