[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.3.2] Add an extra check in test_entrynodes



commit d45bf0c65caa98b6e41046c22fbecf76cd8e1f8d
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Sat Nov 18 10:26:45 2017 -0500

    Add an extra check in test_entrynodes
    
    This check makes it so we can reach "done" without setting "conn",
    and so the "if (conn)" check will not be redundant, and so coverity
    won't complain.  Fixes CID 1422205.  Not actually a bug.
---
 src/test/test_entrynodes.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 43cc39488..80ebebe3f 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -2721,6 +2721,8 @@ test_entry_guard_outdated_dirserver_exclusion(void *arg)
     smartlist_add(digests, (char*)prose);
   }
 
+  tt_int_op(smartlist_len(digests), OP_EQ, 20);
+
   /* ... now mock some functions */
   mock_ns_val = tor_malloc_zero(sizeof(networkstatus_t));
   MOCK(networkstatus_get_latest_consensus_by_flavor, mock_ns_get_by_flavor);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits