diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-03-10 10:07:41 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-03-10 10:07:41 -0400 |
commit | d29a8ad564757866dee8d2cbd940c5028a03f2e3 (patch) | |
tree | 23ed85f8b159baee2037d43f0e2571da70f66fd2 /src/test/test_status.c | |
parent | 99b59dee7046b04854ac263a1cf810dceb80df12 (diff) | |
download | tor-d29a8ad564757866dee8d2cbd940c5028a03f2e3.tar.gz tor-d29a8ad564757866dee8d2cbd940c5028a03f2e3.zip |
Add link protocol version counts to the heartbeat message
Closes ticket 15212
Diffstat (limited to 'src/test/test_status.c')
-rw-r--r-- | src/test/test_status.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/test_status.c b/src/test/test_status.c index 0aa82ca087..3888a1b4e6 100644 --- a/src/test/test_status.c +++ b/src/test/test_status.c @@ -337,7 +337,7 @@ NS(test_main)(void *arg) actual = log_heartbeat(0); tt_int_op(actual, OP_EQ, expected); - tt_int_op(CALLED(logv), OP_EQ, 4); + tt_int_op(CALLED(logv), OP_EQ, 5); done: NS_UNMOCK(tls_get_write_overhead_ratio); @@ -430,6 +430,12 @@ NS(logv)(int severity, log_domain_mask_t domain, tt_int_op(va_arg(ap, int), OP_EQ, 1); /* handshakes assigned (NTOR) */ tt_int_op(va_arg(ap, int), OP_EQ, 1); /* handshakes requested (NTOR) */ break; + case 4: + tt_int_op(severity, OP_EQ, LOG_NOTICE); + tt_int_op(domain, OP_EQ, LD_HEARTBEAT); + tt_ptr_op(strstr(funcname, "rep_hist_log_link_protocol_counts"), + OP_NE, NULL); + break; default: tt_abort_msg("unexpected call to logv()"); // TODO: prettyprint args break; |