print test case name and speedup under MSAN

This commit is contained in:
Jan Tattermusch 2019-11-26 08:53:36 -05:00
parent 674b1f6f52
commit 649e706a12
1 changed files with 30 additions and 0 deletions

View File

@ -457,6 +457,7 @@ static tsi_test_fixture* ssl_tsi_test_fixture_create() {
}
void ssl_tsi_test_do_handshake_tiny_handshake_buffer() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_tiny_handshake_buffer");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
fixture->handshake_buffer_size = TSI_TEST_TINY_HANDSHAKE_BUFFER_SIZE;
tsi_test_do_handshake(fixture);
@ -464,6 +465,7 @@ void ssl_tsi_test_do_handshake_tiny_handshake_buffer() {
}
void ssl_tsi_test_do_handshake_small_handshake_buffer() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_small_handshake_buffer");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
fixture->handshake_buffer_size = TSI_TEST_SMALL_HANDSHAKE_BUFFER_SIZE;
tsi_test_do_handshake(fixture);
@ -471,12 +473,14 @@ void ssl_tsi_test_do_handshake_small_handshake_buffer() {
}
void ssl_tsi_test_do_handshake() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
tsi_test_do_handshake(fixture);
tsi_test_fixture_destroy(fixture);
}
void ssl_tsi_test_do_handshake_with_root_store() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_with_root_store");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -486,6 +490,7 @@ void ssl_tsi_test_do_handshake_with_root_store() {
}
void ssl_tsi_test_do_handshake_with_client_authentication() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_with_client_authentication");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -495,6 +500,9 @@ void ssl_tsi_test_do_handshake_with_client_authentication() {
}
void ssl_tsi_test_do_handshake_with_client_authentication_and_root_store() {
gpr_log(
GPR_INFO,
"ssl_tsi_test_do_handshake_with_client_authentication_and_root_store");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -505,6 +513,8 @@ void ssl_tsi_test_do_handshake_with_client_authentication_and_root_store() {
}
void ssl_tsi_test_do_handshake_with_server_name_indication_exact_domain() {
gpr_log(GPR_INFO,
"ssl_tsi_test_do_handshake_with_server_name_indication_exact_domain");
/* server1 cert contains "waterzooi.test.google.be" in SAN. */
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
@ -516,6 +526,9 @@ void ssl_tsi_test_do_handshake_with_server_name_indication_exact_domain() {
}
void ssl_tsi_test_do_handshake_with_server_name_indication_wild_star_domain() {
gpr_log(
GPR_INFO,
"ssl_tsi_test_do_handshake_with_server_name_indication_wild_star_domain");
/* server1 cert contains "*.test.google.fr" in SAN. */
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
@ -527,6 +540,7 @@ void ssl_tsi_test_do_handshake_with_server_name_indication_wild_star_domain() {
}
void ssl_tsi_test_do_handshake_with_bad_server_cert() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_with_bad_server_cert");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -536,6 +550,7 @@ void ssl_tsi_test_do_handshake_with_bad_server_cert() {
}
void ssl_tsi_test_do_handshake_with_bad_client_cert() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_with_bad_client_cert");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -546,6 +561,7 @@ void ssl_tsi_test_do_handshake_with_bad_client_cert() {
}
void ssl_tsi_test_do_handshake_alpn_client_no_server() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_alpn_client_no_server");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -555,6 +571,7 @@ void ssl_tsi_test_do_handshake_alpn_client_no_server() {
}
void ssl_tsi_test_do_handshake_alpn_server_no_client() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_alpn_server_no_client");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -564,6 +581,7 @@ void ssl_tsi_test_do_handshake_alpn_server_no_client() {
}
void ssl_tsi_test_do_handshake_alpn_client_server_mismatch() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_alpn_server_no_client");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -573,6 +591,7 @@ void ssl_tsi_test_do_handshake_alpn_client_server_mismatch() {
}
void ssl_tsi_test_do_handshake_alpn_client_server_ok() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_alpn_client_server_ok");
tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
ssl_tsi_test_fixture* ssl_fixture =
reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
@ -582,6 +601,7 @@ void ssl_tsi_test_do_handshake_alpn_client_server_ok() {
}
void ssl_tsi_test_do_round_trip_for_all_configs() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_round_trip_for_all_configs");
unsigned int* bit_array = static_cast<unsigned int*>(
gpr_zalloc(sizeof(unsigned int) * TSI_TEST_NUM_OF_ARGUMENTS));
const unsigned int mask = 1U << (TSI_TEST_NUM_OF_ARGUMENTS - 1);
@ -605,7 +625,13 @@ void ssl_tsi_test_do_round_trip_for_all_configs() {
}
void ssl_tsi_test_do_round_trip_odd_buffer_size() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_round_trip_odd_buffer_size");
#ifndef MEMORY_SANITIZER
const size_t odd_sizes[] = {1025, 2051, 4103, 8207, 16409};
#else
// avoid test being extremely slow under MSAN
const size_t odd_sizes[] = {1025};
#endif
const size_t size = sizeof(odd_sizes) / sizeof(size_t);
for (size_t ind1 = 0; ind1 < size; ind1++) {
for (size_t ind2 = 0; ind2 < size; ind2++) {
@ -628,6 +654,7 @@ void ssl_tsi_test_do_round_trip_odd_buffer_size() {
}
void ssl_tsi_test_do_handshake_session_cache() {
gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_session_cache");
tsi_ssl_session_cache* session_cache = tsi_ssl_session_cache_create_lru(16);
char session_ticket_key[kSessionTicketEncryptionKeySize];
auto do_handshake = [&session_ticket_key,
@ -770,12 +797,14 @@ void test_tsi_ssl_client_handshaker_factory_bad_params() {
}
void ssl_tsi_test_handshaker_factory_internals() {
gpr_log(GPR_INFO, "ssl_tsi_test_handshaker_factory_internals");
test_tsi_ssl_client_handshaker_factory_refcounting();
test_tsi_ssl_server_handshaker_factory_refcounting();
test_tsi_ssl_client_handshaker_factory_bad_params();
}
void ssl_tsi_test_duplicate_root_certificates() {
gpr_log(GPR_INFO, "ssl_tsi_test_duplicate_root_certificates");
char* root_cert = load_file(SSL_TSI_TEST_CREDENTIALS_DIR, "ca.pem");
char* dup_root_cert = static_cast<char*>(
gpr_zalloc(sizeof(char) * (strlen(root_cert) * 2 + 1)));
@ -791,6 +820,7 @@ void ssl_tsi_test_duplicate_root_certificates() {
}
void ssl_tsi_test_extract_x509_subject_names() {
gpr_log(GPR_INFO, "ssl_tsi_test_extract_x509_subject_names");
char* cert = load_file(SSL_TSI_TEST_CREDENTIALS_DIR, "multi-domain.pem");
tsi_peer peer;
GPR_ASSERT(tsi_ssl_extract_x509_subject_names_from_pem_cert(cert, &peer) ==