[tor-commits] [tor/maint-0.4.5] Always teardown capture of logs in CAPTURE().

ahf at torproject.org ahf at torproject.org
Mon Aug 16 15:28:37 UTC 2021


commit 903c5781192d7902c01ab6b0d4b2aec91da44890
Author: Alexander Færøy <ahf at torproject.org>
Date:   Mon Aug 16 15:27:38 2021 +0000

    Always teardown capture of logs in CAPTURE().
    
    This will hopefully solve an issue where our gmtime related tests are
    failing on 32-bit builds.
---
 src/test/test_util.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/test/test_util.c b/src/test/test_util.c
index fd0e6763e8..f567a18367 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -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) \



More information about the tor-commits mailing list