diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-08-07 08:05:56 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-07 08:05:56 -0400 |
commit | 5e86a2868319f8aa55d2858fdb4d83e6f9f69120 (patch) | |
tree | 5a7401b6ff2c81ee0e59164f57cf98c32bc0f293 /src/test/test_periodic_event.c | |
parent | abf88af4887782f6952d90755d64f946d4958e6d (diff) | |
parent | 882b2ad0aa46702e8420ef0d4bd788daff6f3ffd (diff) | |
download | tor-5e86a2868319f8aa55d2858fdb4d83e6f9f69120.tar.gz tor-5e86a2868319f8aa55d2858fdb4d83e6f9f69120.zip |
Merge branch 'maint-0.3.4'
Diffstat (limited to 'src/test/test_periodic_event.c')
-rw-r--r-- | src/test/test_periodic_event.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/test/test_periodic_event.c b/src/test/test_periodic_event.c index 03ba3df793..b447ae8888 100644 --- a/src/test/test_periodic_event.c +++ b/src/test/test_periodic_event.c @@ -106,11 +106,11 @@ test_pe_launch(void *arg) periodic_event_item_t *item = &periodic_events[i]; if (item->roles & PERIODIC_EVENT_ROLE_CLIENT) { tt_int_op(periodic_event_is_enabled(item), OP_EQ, 1); - tt_u64_op(item->last_action_time, OP_NE, 0); } else { tt_int_op(periodic_event_is_enabled(item), OP_EQ, 0); - tt_u64_op(item->last_action_time, OP_EQ, 0); } + // enabled or not, the event has not yet been run. + tt_u64_op(item->last_action_time, OP_EQ, 0); } /* Remove Client but become a Relay. */ @@ -127,12 +127,9 @@ test_pe_launch(void *arg) /* Only Client role should be disabled. */ if (item->roles == PERIODIC_EVENT_ROLE_CLIENT) { tt_int_op(periodic_event_is_enabled(item), OP_EQ, 0); - /* Was previously enabled so they should never be to 0. */ - tt_u64_op(item->last_action_time, OP_NE, 0); } if (item->roles & PERIODIC_EVENT_ROLE_RELAY) { tt_int_op(periodic_event_is_enabled(item), OP_EQ, 1); - tt_u64_op(item->last_action_time, OP_NE, 0); } /* Non Relay role should be disabled, except for Dirserver. */ if (!(item->roles & roles)) { @@ -330,4 +327,3 @@ struct testcase_t periodic_event_tests[] = { END_OF_TESTCASES }; - |