mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
Use setup_full_capture_of_logs for 21800
setup_capture_of_logs() doesn't actually suppress warnings :p
This commit is contained in:
parent
ac3fdb74c2
commit
230a336798
1 changed files with 3 additions and 4 deletions
|
@ -635,7 +635,7 @@ test_util_time(void *arg)
|
||||||
* time_t */
|
* time_t */
|
||||||
a_time.tm_year = 2039-1900;
|
a_time.tm_year = 2039-1900;
|
||||||
#if SIZEOF_TIME_T == 4
|
#if SIZEOF_TIME_T == 4
|
||||||
setup_capture_of_logs(LOG_WARN);
|
setup_full_capture_of_logs(LOG_WARN);
|
||||||
tt_int_op((time_t) -1,OP_EQ, tor_timegm(&a_time));
|
tt_int_op((time_t) -1,OP_EQ, tor_timegm(&a_time));
|
||||||
expect_single_log_msg_containing("Result does not fit in tor_timegm");
|
expect_single_log_msg_containing("Result does not fit in tor_timegm");
|
||||||
teardown_capture_of_logs();
|
teardown_capture_of_logs();
|
||||||
|
@ -654,8 +654,7 @@ test_util_time(void *arg)
|
||||||
setup_full_capture_of_logs(LOG_WARN); \
|
setup_full_capture_of_logs(LOG_WARN); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define CHECK_TIMEGM_WARNING(msg) do { \
|
#define CHECK_TIMEGM_WARNING(msg) do { \
|
||||||
expect_log_msg_containing(msg); \
|
expect_single_log_msg_containing(msg); \
|
||||||
tt_int_op(1, OP_EQ, smartlist_len(mock_saved_logs())); \
|
|
||||||
teardown_capture_of_logs(); \
|
teardown_capture_of_logs(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -1226,7 +1225,7 @@ test_util_parse_http_time(void *arg)
|
||||||
#if SIZEOF_TIME_T == 4
|
#if SIZEOF_TIME_T == 4
|
||||||
/* parse_http_time should indicate failure on overflow, but it doesn't yet.
|
/* parse_http_time should indicate failure on overflow, but it doesn't yet.
|
||||||
* Hopefully #18480 will improve the failure semantics in this case. */
|
* Hopefully #18480 will improve the failure semantics in this case. */
|
||||||
setup_capture_of_logs(LOG_WARN);
|
setup_full_capture_of_logs(LOG_WARN);
|
||||||
tt_int_op(0,OP_EQ,parse_http_time("Wed, 17 Feb 2038 06:13:20 GMT", &a_time));
|
tt_int_op(0,OP_EQ,parse_http_time("Wed, 17 Feb 2038 06:13:20 GMT", &a_time));
|
||||||
tt_int_op((time_t)-1,OP_EQ, tor_timegm(&a_time));
|
tt_int_op((time_t)-1,OP_EQ, tor_timegm(&a_time));
|
||||||
expect_single_log_msg_containing("does not fit in tor_timegm");
|
expect_single_log_msg_containing("does not fit in tor_timegm");
|
||||||
|
|
Loading…
Add table
Reference in a new issue