Browse Source

Always log [bug] warnings from the unit tests.

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.
Nick Mathewson 7 years ago
parent
commit
273290d4fe
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/test/testing_common.c

+ 2 - 0
src/test/testing_common.c

@@ -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));
   }