Merge branch 'ticket28880'

This commit is contained in:
Nick Mathewson 2019-01-03 21:33:40 -05:00
commit 7232f04939
3 changed files with 8 additions and 2 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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",
&current_time);