diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-08 10:56:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-08 10:56:51 -0400 |
commit | f64f293c48e2293e18d9e183938b21add0643745 (patch) | |
tree | 4e786c796f6b208f9319c5e550922e486fdee127 /src/test/test_connection.c | |
parent | d626ffe29ce63950db3593e1a3a61e38b844ae31 (diff) | |
download | tor-f64f293c48e2293e18d9e183938b21add0643745.tar.gz tor-f64f293c48e2293e18d9e183938b21add0643745.zip |
Suppress a really impressive pile of warnings in conection/.. tests
Diffstat (limited to 'src/test/test_connection.c')
-rw-r--r-- | src/test/test_connection.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/test_connection.c b/src/test/test_connection.c index 92f1f68bcf..bf2cf18b96 100644 --- a/src/test/test_connection.c +++ b/src/test/test_connection.c @@ -192,6 +192,15 @@ test_conn_get_basic_teardown(const struct testcase_t *tc, void *arg) if (!conn->linked_conn->marked_for_close) { connection_close_immediate(conn->linked_conn); + if (CONN_IS_EDGE(conn->linked_conn)) { + /* Suppress warnings about all the stuff we didn't do */ + TO_EDGE_CONN(conn->linked_conn)->edge_has_sent_end = 1; + TO_EDGE_CONN(conn->linked_conn)->end_reason = + END_STREAM_REASON_INTERNAL; + if (conn->linked_conn->type == CONN_TYPE_AP) { + TO_ENTRY_CONN(conn->linked_conn)->socks_request->has_finished = 1; + } + } connection_mark_for_close(conn->linked_conn); } @@ -212,6 +221,14 @@ test_conn_get_basic_teardown(const struct testcase_t *tc, void *arg) if (!conn->marked_for_close) { connection_close_immediate(conn); + if (CONN_IS_EDGE(conn)) { + /* Suppress warnings about all the stuff we didn't do */ + TO_EDGE_CONN(conn)->edge_has_sent_end = 1; + TO_EDGE_CONN(conn)->end_reason = END_STREAM_REASON_INTERNAL; + if (conn->type == CONN_TYPE_AP) { + TO_ENTRY_CONN(conn)->socks_request->has_finished = 1; + } + } connection_mark_for_close(conn); } |