expect_log_msg("Got an extend cell, but running as a client. Closing.\n");
mock_clean_saved_logs();
+#ifndef ALL_BUGS_ARE_FATAL
/* Circuit must be non-NULL */
tor_capture_bugs_(1);
server = 1;
"!(ASSERT_PREDICT_UNLIKELY_(!circ))");
tor_end_capture_bugs_();
mock_clean_saved_logs();
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* n_chan and n_hop are NULL, this should succeed */
server = 1;
setup_full_capture_of_logs(LOG_INFO);
+#ifndef ALL_BUGS_ARE_FATAL
/* The extend cell must be non-NULL */
tor_capture_bugs_(1);
tt_int_op(circuit_extend_add_ed25519_helper(NULL), OP_EQ, -1);
"!(ASSERT_PREDICT_UNLIKELY_(!ec))");
tor_end_capture_bugs_();
mock_clean_saved_logs();
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* The node id must be non-zero */
memcpy(old_ec, ec, sizeof(extend_cell_t));
setup_full_capture_of_logs(LOG_INFO);
+#ifndef ALL_BUGS_ARE_FATAL
/* Extend cell must be non-NULL */
tor_capture_bugs_(1);
tt_int_op(circuit_extend_lspec_valid_helper(NULL, circ), OP_EQ, -1);
tt_int_op(smartlist_len(tor_get_captured_bug_log_()), OP_LE, 2);
tor_end_capture_bugs_();
mock_clean_saved_logs();
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* IPv4 and IPv6 addr and port are all zero, this should fail */
tt_int_op(circuit_extend_lspec_valid_helper(ec, circ), OP_EQ, -1);
tor_addr_port_make_null_ap(&ec->orport_ipv4, AF_INET);
tor_addr_port_make_null_ap(&ec->orport_ipv6, AF_INET6);
+#ifndef ALL_BUGS_ARE_FATAL
/* If we pass the private address check, but don't have the right
* OR circuit magic number, we trigger another bug */
tor_addr_parse(&ec->orport_ipv4.addr, INTERNAL_IPV4);
tor_end_capture_bugs_();
mock_clean_saved_logs();
fake_options->ExtendAllowPrivateAddresses = 0;
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* Now set the right magic */
or_circ->base_.magic = OR_CIRCUIT_MAGIC;
+#ifndef ALL_BUGS_ARE_FATAL
/* If we pass the OR circuit magic check, but don't have p_chan,
* we trigger another bug */
fake_options->ExtendAllowPrivateAddresses = 1;
tor_addr_make_null(&ec->orport_ipv4.addr, AF_INET);
ec->orport_ipv4.port = 0x0000;
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* Now let's fake a p_chan and the addresses */
tor_addr_parse(&ec->orport_ipv4.addr, PUBLIC_IPV4);
setup_full_capture_of_logs(LOG_INFO);
+#ifndef ALL_BUGS_ARE_FATAL
/* Circuit must be non-NULL */
mock_circuit_close_calls = 0;
mock_channel_connect_calls = 0;
tt_int_op(smartlist_len(tor_get_captured_bug_log_()), OP_LE, 2);
tor_end_capture_bugs_();
mock_clean_saved_logs();
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* Succeed, but don't try to open a connection */
mock_circuit_close_calls = 0;
setup_full_capture_of_logs(LOG_INFO);
+#ifndef ALL_BUGS_ARE_FATAL
/* Circuit must be non-NULL */
tor_capture_bugs_(1);
tt_int_op(circuit_extend(cell, NULL), OP_EQ, -1);
tt_int_op(smartlist_len(tor_get_captured_bug_log_()), OP_LE, 2);
tor_end_capture_bugs_();
mock_clean_saved_logs();
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* Clients can't extend */
server = 0;
PUBLIC_IPV4);
mock_extend_cell_parse_cell_out.orport_ipv4.port = VALID_PORT;
+#ifndef ALL_BUGS_ARE_FATAL
tor_capture_bugs_(1);
tt_int_op(circuit_extend(cell, circ), OP_EQ, -1);
tt_int_op(mock_extend_cell_parse_calls, OP_EQ, 1);
tor_end_capture_bugs_();
mock_clean_saved_logs();
mock_extend_cell_parse_calls = 0;
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* Now add the right magic and a p_chan. */
or_circ->base_.magic = OR_CIRCUIT_MAGIC;
setup_full_capture_of_logs(LOG_INFO);
+#ifndef ALL_BUGS_ARE_FATAL
/* Circuit must be non-NULL */
tor_capture_bugs_(1);
tt_int_op(onionskin_answer(NULL, created_cell,
"!(ASSERT_PREDICT_UNLIKELY_(!rend_circ_nonce))");
tor_end_capture_bugs_();
mock_clean_saved_logs();
+#endif /* !defined(ALL_BUGS_ARE_FATAL) */
/* Also, the keys length must be CPATH_KEY_MATERIAL_LEN, but we can't catch
* asserts in unit tests. */