[tor-bugs] #18039 [Tor]: Test for log_heartbeat fails in timezones with non-integer offsets

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jan 12 12:03:26 UTC 2016


#18039: Test for log_heartbeat fails in timezones with non-integer offsets
--------------------------+--------------------------
     Reporter:  fergus    |      Owner:
         Type:  defect    |     Status:  new
     Priority:  Very Low  |  Milestone:
    Component:  Tor       |    Version:  Tor: 0.2.7.6
     Severity:  Trivial   |   Keywords:  testing
Actual Points:            |  Parent ID:
       Points:            |    Sponsor:
--------------------------+--------------------------
 The test for log_heartbeat contains the check
 {{{
 /* format_local_iso_time uses local tz, just check mins and secs. */
 tt_ptr_op(strstr(va_arg(ap, char *), ":01:00"),
           OP_NE, NULL); /* end_buf */
 }}}
 which assumes that the timezone will only affect the hours. In timezones
 with half-hour or 15 minute offsets this test will always (incorrectly)
 fail.

 I have a fix at https://github.com/fergus-dall/tor/tree/log_heartbeat_test
 which calls format_local_iso_time to figure out what to compare against.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18039>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list