mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
Merge branch 'tor-github/pr/915' into maint-0.4.0
This commit is contained in:
commit
c7cf49dc3c
2 changed files with 13 additions and 0 deletions
4
changes/bug29922
Normal file
4
changes/bug29922
Normal file
|
@ -0,0 +1,4 @@
|
|||
o Minor bugfixes (testing, windows):
|
||||
- Fix a test failure caused by an unexpected bug warning in
|
||||
our test for tor_gmtime_r(-1). Fixes bug 29922;
|
||||
bugfix on 0.2.9.3-alpha.
|
|
@ -728,6 +728,13 @@ test_util_time(void *arg)
|
|||
|
||||
#define CHECK_TIMEGM_ARG_OUT_OF_RANGE(msg) \
|
||||
CHECK_TIMEGM_WARNING("Out-of-range argument to tor_timegm")
|
||||
#define CHECK_POSSIBLE_TIMEGM_ARG_OUT_OF_RANGE(msg) \
|
||||
do { \
|
||||
if (mock_saved_log_n_entries()) { \
|
||||
expect_single_log_msg_containing("Out-of-range argument");\
|
||||
} \
|
||||
teardown_capture_of_logs(); \
|
||||
} while (0)
|
||||
|
||||
/* year */
|
||||
|
||||
|
@ -914,7 +921,9 @@ test_util_time(void *arg)
|
|||
* depending on whether the implementation of the system gmtime(_r)
|
||||
* sets struct tm (1) or not (1970) */
|
||||
t_res = -1;
|
||||
CAPTURE();
|
||||
tor_gmtime_r(&t_res, &b_time);
|
||||
CHECK_POSSIBLE_TIMEGM_ARG_OUT_OF_RANGE();
|
||||
tt_assert(b_time.tm_year == (1970-1900) ||
|
||||
b_time.tm_year == (1969-1900));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue