summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-08 10:48:22 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-08 10:48:22 -0400
commitd626ffe29ce63950db3593e1a3a61e38b844ae31 (patch)
tree921c097b84d0d5d8ffac2f5a0ca2bce1ab5850e1
parent3705ee8fe4771be7b3dce0530cddecf26cff45ce (diff)
downloadtor-d626ffe29ce63950db3593e1a3a61e38b844ae31.tar.gz
tor-d626ffe29ce63950db3593e1a3a61e38b844ae31.zip
Fix a bug in connection/download_status.. tests
-rw-r--r--src/test/test_connection.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/test_connection.c b/src/test/test_connection.c
index bf95b0b59f..92f1f68bcf 100644
--- a/src/test/test_connection.c
+++ b/src/test/test_connection.c
@@ -340,10 +340,7 @@ test_conn_get_rsrc_teardown(const struct testcase_t *tc, void *arg)
static void *
test_conn_download_status_setup(const struct testcase_t *tc)
{
- (void)tc;
-
- /* Don't return NULL, that causes the test to fail */
- return (void*)"ok";
+ return (void*)tc;
}
static int
@@ -655,7 +652,8 @@ test_conn_download_status(void *arg)
dir_connection_t *conn4 = NULL;
connection_t *ap_conn = NULL;
- consensus_flavor_t usable_flavor = (consensus_flavor_t)arg;
+ const struct testcase_t *tc = arg;
+ consensus_flavor_t usable_flavor = (consensus_flavor_t)tc->setup_data;
/* The "other flavor" trick only works if there are two flavors */
tor_assert(N_CONSENSUS_FLAVORS == 2);