commit 7232f04939f44146254c21086178c62cce1d3392
parent a7cbbf279ef8ab727ff3603940575c6d948985dc
Author: Nick Mathewson <nickm@torproject.org>
Date: Thu, 3 Jan 2019 21:33:40 -0500
Merge branch 'ticket28880'
Diffstat:
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/test/test_config.c b/src/test/test_config.c
@@ -5783,6 +5783,7 @@ test_config_extended_fmt(void *arg)
tt_str_op(lp->value, OP_EQ, "is back here");
tt_int_op(lp->command, OP_EQ, CONFIG_LINE_NORMAL);
lp = lp->next;
+ tt_assert(!lp);
config_free_lines(lines);
/* Try with the "extended" flag enabled. */
@@ -5809,6 +5810,7 @@ test_config_extended_fmt(void *arg)
tt_str_op(lp->value, OP_EQ, "");
tt_int_op(lp->command, OP_EQ, CONFIG_LINE_CLEAR);
lp = lp->next;
+ tt_assert(!lp);
done:
config_free_lines(lines);
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
@@ -1396,7 +1396,6 @@ static void
test_build_update_descriptors(void *arg)
{
int ret;
- time_t now = time(NULL);
node_t *node;
hs_service_t *service;
hs_service_intro_point_t *ip_cur, *ip_next;
@@ -1422,7 +1421,8 @@ test_build_update_descriptors(void *arg)
voting_schedule_recalculate_timing(get_options(), mock_ns.valid_after);
update_approx_time(mock_ns.valid_after+1);
- now = mock_ns.valid_after+1;
+
+ time_t now = mock_ns.valid_after+1;
/* Create a service without a current descriptor to trigger a build. */
service = helper_create_service();
@@ -1654,6 +1654,9 @@ test_build_descriptors(void *arg)
service->desc_current = NULL;
build_all_descriptors(now);
+ tt_assert(service->desc_current);
+ tt_assert(service->desc_current->desc);
+
hs_desc_superencrypted_data_t *superencrypted;
superencrypted = &service->desc_current->desc->superencrypted_data;
tt_int_op(smartlist_len(superencrypted->clients), OP_EQ, 16);
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
@@ -309,6 +309,7 @@ test_get_start_time_of_current_run(void *arg)
retval = parse_rfc1123_time("Mon, 19 Apr 2015 23:00:00 UTC",
&mock_consensus.valid_after);
+ tt_int_op(retval, OP_EQ, 0);
retval = parse_rfc1123_time("Mon, 20 Apr 2015 00:08:00 UTC",
¤t_time);