]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Always teardown capture of logs in CAPTURE().
authorAlexander Færøy <ahf@torproject.org>
Mon, 16 Aug 2021 15:27:38 +0000 (15:27 +0000)
committerAlexander Færøy <ahf@torproject.org>
Mon, 16 Aug 2021 15:27:38 +0000 (15:27 +0000)
This will hopefully solve an issue where our gmtime related tests are
failing on 32-bit builds.

src/test/test_util.c

index fd0e6763e8250f07263f832ba87894e65a6ab2b7..f567a1836783f5b689025bb6dccfa6949a4a3961 100644 (file)
@@ -819,17 +819,16 @@ test_util_time(void *arg)
   /* The below tests will all cause a BUG message, so we capture, suppress,
    * and detect. */
 #define CAPTURE() do {                                          \
+    teardown_capture_of_logs();                                 \
     setup_full_capture_of_logs(LOG_WARN);                       \
   } while (0)
 #define CHECK_TIMEGM_WARNING(msg) do { \
     expect_single_log_msg_containing(msg);                              \
-    teardown_capture_of_logs();                                         \
   } while (0)
 #define CHECK_POSSIBLE_EINVAL() do {                            \
     if (mock_saved_log_n_entries()) {                           \
       expect_single_log_msg_containing("Invalid argument");     \
     }                                                           \
-    teardown_capture_of_logs();                                 \
   } while (0)
 
 #define CHECK_TIMEGM_ARG_OUT_OF_RANGE(msg) \