diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-11 17:13:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-11 17:13:51 -0400 |
commit | a671a1c9d632242662bf9fd8b37b63ccefd8a3bf (patch) | |
tree | 4fba498d3b8bf1ab517ad711c9220867781b67f3 /src/test/test_util.c | |
parent | 9d84a6d998f11ff1667fce8e22c9241756880cf8 (diff) | |
download | tor-a671a1c9d632242662bf9fd8b37b63ccefd8a3bf.tar.gz tor-a671a1c9d632242662bf9fd8b37b63ccefd8a3bf.zip |
Tweak tor_gmtime_r test.
On openbsd64, I'm seeing a warning that the log isn't saying what
I'd expect, but I'm not seeing what the answer actually _is_ here.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r-- | src/test/test_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 224ec7bd55..38f23027c0 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -877,9 +877,11 @@ test_util_time(void *arg) t_res = INT64_MIN; CAPTURE(); tor_gmtime_r(&t_res, &b_time); + if (! (b_time.tm_year == (1970-1900) || + b_time.tm_year == (1-1900))) { + tt_int_op(b_time.tm_year, OP_EQ, 1970-1900); + } CHECK_TIMEGM_WARNING("Rounding up to "); - tt_assert(b_time.tm_year == (1970-1900) || - b_time.tm_year == (1-1900)); } #endif |