[tor-commits] [tor/master] Test for circuit_set_rend_token(., ., NULL)

nickm at torproject.org nickm at torproject.org
Tue Apr 8 16:07:50 UTC 2014


commit d22ce149c82c257398555d35cf76cab4973a8cf9
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Apr 4 12:06:54 2014 -0400

    Test for circuit_set_rend_token(.,.,NULL)
---
 src/test/test_circuitlist.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/test/test_circuitlist.c b/src/test/test_circuitlist.c
index ee62cd2..2cfe556 100644
--- a/src/test/test_circuitlist.c
+++ b/src/test/test_circuitlist.c
@@ -238,6 +238,11 @@ test_rend_token_maps(void *arg)
   tt_ptr_op(c4->rendinfo, !=, NULL);
   test_mem_op(c4->rendinfo, ==, tok3, REND_TOKEN_LEN);
 
+  /* Now clear c4's cookie. */
+  circuit_set_intro_point_digest(c4, NULL);
+  tt_ptr_op(c4->rendinfo, ==, NULL);
+  tt_ptr_op(NULL, ==, circuit_get_intro_point(tok3));
+
  done:
   circuit_free(TO_CIRCUIT(c1));
   circuit_free(TO_CIRCUIT(c2));





More information about the tor-commits mailing list