summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2020-04-15 10:07:26 +1000
committerteor <teor@torproject.org>2020-04-29 22:43:09 +1000
commit7cef02ec1fa76f593dfb9bd53f76922225696934 (patch)
treef66780605e29843473289cbc122acf3460c1df3a
parent44f71e08c414f6c7aad6304e24be90d5d320c95b (diff)
downloadtor-7cef02ec1fa76f593dfb9bd53f76922225696934.tar.gz
tor-7cef02ec1fa76f593dfb9bd53f76922225696934.zip
test/circuitbuild: Show bad addresses in some logs
Disable SafeLogging for some extend tests, so we can check the actual addresses. Part of 33817.
-rw-r--r--src/test/test_circuitbuild.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/test_circuitbuild.c b/src/test/test_circuitbuild.c
index ab5c9c9938..9322480844 100644
--- a/src/test/test_circuitbuild.c
+++ b/src/test/test_circuitbuild.c
@@ -525,17 +525,19 @@ test_circuit_extend_lspec_valid(void *arg)
"or unspecified address '[scrubbed]'.\n");
mock_clean_saved_logs();
+ /* Now ask for the actual address in the logs */
+ fake_options->SafeLogging_ = SAFELOG_SCRUB_NONE;
tor_addr_parse(&ec->orport_ipv4.addr, PUBLIC_IPV4);
tt_int_op(circuit_extend_lspec_valid_helper(ec, circ), OP_EQ, -1);
expect_log_msg("Client asked me to extend to a zero destination port "
- "or IPv4 address '[scrubbed]'.\n");
+ "or IPv4 address '1.2.3.4:0'.\n");
mock_clean_saved_logs();
tor_addr_make_null(&ec->orport_ipv4.addr, AF_INET);
ec->orport_ipv4.port = VALID_PORT;
tt_int_op(circuit_extend_lspec_valid_helper(ec, circ), OP_EQ, -1);
expect_log_msg("Client asked me to extend to a zero destination port "
- "or IPv4 address '[scrubbed]'.\n");
+ "or IPv4 address '0.0.0.0:4660'.\n");
mock_clean_saved_logs();
ec->orport_ipv4.port = 0;
@@ -547,7 +549,7 @@ test_circuit_extend_lspec_valid(void *arg)
fake_options->ExtendAllowPrivateAddresses = 0;
tt_int_op(circuit_extend_lspec_valid_helper(ec, circ), OP_EQ, -1);
expect_log_msg("Client asked me to extend "
- "to a private IPv4 address '[scrubbed]'.\n");
+ "to a private IPv4 address '0.0.0.1'.\n");
mock_clean_saved_logs();
fake_options->ExtendAllowPrivateAddresses = 0;