diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-18 21:38:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-18 21:38:28 -0400 |
commit | afe1af7de6787e1f63dadde798b7f806be0c138b (patch) | |
tree | 7b29473970e79f0403e48d0a583f8c59eaa5b0cf /src | |
parent | eeb266c1395e582f1480f49316a5014ac77e8f50 (diff) | |
parent | 0c39cefc5207cabcd648201f69899574b6844007 (diff) | |
download | tor-afe1af7de6787e1f63dadde798b7f806be0c138b.tar.gz tor-afe1af7de6787e1f63dadde798b7f806be0c138b.zip |
Merge remote-tracking branch 'asn/bug21971'
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_circuitlist.c | 16 | ||||
-rw-r--r-- | src/test/test_hs_intropoint.c | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/test/test_circuitlist.c b/src/test/test_circuitlist.c index 520aaf3c59..344ab27921 100644 --- a/src/test/test_circuitlist.c +++ b/src/test/test_circuitlist.c @@ -388,6 +388,7 @@ test_hs_circuitmap_isolation(void *arg) const uint8_t tok1[REND_TOKEN_LEN] = "bet i got some of th"; circ1 = or_circuit_new(0, NULL); + tt_assert(circ1); circ1->base_.purpose = CIRCUIT_PURPOSE_REND_POINT_WAITING; /* check that circuitmap is empty right? */ @@ -408,10 +409,13 @@ test_hs_circuitmap_isolation(void *arg) const uint8_t tok2[REND_TOKEN_LEN] = "you dont know anythi"; circ2 = origin_circuit_new(); + tt_assert(circ2); circ2->base_.purpose = CIRCUIT_PURPOSE_S_ESTABLISH_INTRO; circ3 = or_circuit_new(0, NULL); + tt_assert(circ3); circ3->base_.purpose = CIRCUIT_PURPOSE_INTRO_POINT; circ4 = origin_circuit_new(); + tt_assert(circ4); circ4->base_.purpose = CIRCUIT_PURPOSE_S_ESTABLISH_INTRO; /* Register circ2 with tok2 as service-side intro v2 circ */ @@ -437,14 +441,10 @@ test_hs_circuitmap_isolation(void *arg) } done: - if (circ1) - circuit_free(TO_CIRCUIT(circ1)); - if (circ2) - circuit_free(TO_CIRCUIT(circ2)); - if (circ3) - circuit_free(TO_CIRCUIT(circ3)); - if (circ4) - circuit_free(TO_CIRCUIT(circ4)); + circuit_free(TO_CIRCUIT(circ1)); + circuit_free(TO_CIRCUIT(circ2)); + circuit_free(TO_CIRCUIT(circ3)); + circuit_free(TO_CIRCUIT(circ4)); } struct testcase_t circuitlist_tests[] = { diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c index 7bcd5685c3..ef5cb46567 100644 --- a/src/test/test_hs_intropoint.c +++ b/src/test/test_hs_intropoint.c @@ -777,11 +777,11 @@ test_received_introduce1_handling(void *arg) { cell = helper_create_introduce1_cell(); ssize_t request_len = trn_cell_introduce1_encoded_len(cell); - tt_size_op(request_len, OP_GT, 0); + tt_int_op((int)request_len, OP_GT, 0); request = tor_malloc_zero(request_len); ssize_t encoded_len = trn_cell_introduce1_encode(request, request_len, cell); - tt_size_op(encoded_len, OP_GT, 0); + tt_int_op((int)encoded_len, OP_GT, 0); circ = helper_create_intro_circuit(); or_circuit_t *service_circ = helper_create_intro_circuit(); @@ -812,7 +812,7 @@ test_received_introduce1_handling(void *arg) request = tor_malloc_zero(request_len + 256); ssize_t encoded_len = trn_cell_introduce1_encode(request, request_len, cell); - tt_size_op(encoded_len, OP_GT, 0); + tt_int_op((int)encoded_len, OP_GT, 0); circ = helper_create_intro_circuit(); or_circuit_t *service_circ = helper_create_intro_circuit(); |