[tor-commits] [tor/maint-0.3.4] Merge branch 'maint-0.3.1' into maint-0.3.2

nickm at torproject.org nickm at torproject.org
Fri Jun 29 17:50:44 UTC 2018


commit ed84dab8b4cd691dcdc0fecfb9c451bb0ffd930a
Merge: 6e9d5fc4e a3ec89a4f
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Jun 29 13:49:43 2018 -0400

    Merge branch 'maint-0.3.1' into maint-0.3.2

 src/test/test_channelpadding.c | 1 +
 src/test/test_hs_descriptor.c  | 3 +++
 src/test/test_shared_random.c  | 1 +
 3 files changed, 5 insertions(+)

diff --cc src/test/test_hs_descriptor.c
index a5e9b9667,a40616c61..897b44188
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@@ -196,18 -195,19 +196,19 @@@ test_link_specifier(void *arg
  
      /* Decode it and validate the format. */
      ret = base64_decode(buf, sizeof(buf), b64, strlen(b64));
 -    tt_int_op(ret, >, 0);
 +    tt_int_op(ret, OP_GT, 0);
      /* First byte is the number of link specifier. */
 -    tt_int_op(get_uint8(buf), ==, 1);
 +    tt_int_op(get_uint8(buf), OP_EQ, 1);
      ret = link_specifier_parse(&ls, (uint8_t *) buf + 1, ret - 1);
 -    tt_int_op(ret, ==, 8);
 +    tt_int_op(ret, OP_EQ, 8);
      /* Should be 2 bytes for port and 4 bytes for IPv4. */
 -    tt_int_op(link_specifier_get_ls_len(ls), ==, 6);
 +    tt_int_op(link_specifier_get_ls_len(ls), OP_EQ, 6);
      ipv4 = link_specifier_get_un_ipv4_addr(ls);
 -    tt_int_op(tor_addr_to_ipv4h(&spec.u.ap.addr), ==, ipv4);
 -    tt_int_op(link_specifier_get_un_ipv4_port(ls), ==, spec.u.ap.port);
 +    tt_int_op(tor_addr_to_ipv4h(&spec.u.ap.addr), OP_EQ, ipv4);
 +    tt_int_op(link_specifier_get_un_ipv4_port(ls), OP_EQ, spec.u.ap.port);
  
      link_specifier_free(ls);
+     ls = NULL;
      tor_free(b64);
    }
  
@@@ -233,11 -233,11 +234,12 @@@
      for (unsigned int i = 0; i < sizeof(ipv6); i++) {
        ipv6[i] = link_specifier_get_un_ipv6_addr(ls, i);
      }
 -    tt_mem_op(tor_addr_to_in6_addr8(&spec.u.ap.addr), ==, ipv6, sizeof(ipv6));
 -    tt_int_op(link_specifier_get_un_ipv6_port(ls), ==, spec.u.ap.port);
 +    tt_mem_op(tor_addr_to_in6_addr8(&spec.u.ap.addr), OP_EQ, ipv6,
 +              sizeof(ipv6));
 +    tt_int_op(link_specifier_get_un_ipv6_port(ls), OP_EQ, spec.u.ap.port);
  
      link_specifier_free(ls);
+     ls = NULL;
      tor_free(b64);
    }
  





More information about the tor-commits mailing list