From 7c9a154803c0293a8c0b51bbec65dc00a950989e Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 26 Mar 2016 01:33:34 +0100 Subject: [PATCH 01/93] Sanitize mallocs and frees. --- src/core/iomgr/tcp_server_posix.c | 2 +- src/core/iomgr/tcp_server_windows.c | 2 +- src/core/iomgr/udp_server.c | 2 +- src/core/profiling/basic_timers.c | 4 +- src/core/support/thd_posix.c | 1 + src/core/surface/byte_buffer.c | 6 +- src/core/tsi/fake_transport_security.c | 12 ++-- src/core/tsi/ssl_transport_security.c | 65 +++++++++---------- src/core/tsi/transport_security.c | 16 ++--- test/core/iomgr/endpoint_tests.c | 4 +- test/core/iomgr/tcp_posix_test.c | 4 +- .../network_benchmarks/low_level_ping_pong.c | 19 +++--- test/core/support/alloc_test.c | 4 +- 13 files changed, 65 insertions(+), 76 deletions(-) diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c index 74ee68a6f11..413f7867be2 100644 --- a/src/core/iomgr/tcp_server_posix.c +++ b/src/core/iomgr/tcp_server_posix.c @@ -451,7 +451,7 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, &sockname_len)) { port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); if (port > 0) { - allocated_addr = malloc(addr_len); + allocated_addr = gpr_malloc(addr_len); memcpy(allocated_addr, addr, addr_len); grpc_sockaddr_set_port(allocated_addr, port); addr = allocated_addr; diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c index a4abc5b9743..f9def9a19bb 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/iomgr/tcp_server_windows.c @@ -467,7 +467,7 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, (struct sockaddr *)&sockname_temp, &sockname_len)) { port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); if (port > 0) { - allocated_addr = malloc(addr_len); + allocated_addr = gpr_malloc(addr_len); memcpy(allocated_addr, addr, addr_len); grpc_sockaddr_set_port(allocated_addr, port); addr = allocated_addr; diff --git a/src/core/iomgr/udp_server.c b/src/core/iomgr/udp_server.c index 174159170f3..15f3802dddc 100644 --- a/src/core/iomgr/udp_server.c +++ b/src/core/iomgr/udp_server.c @@ -337,7 +337,7 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, &sockname_len)) { port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); if (port > 0) { - allocated_addr = malloc(addr_len); + allocated_addr = gpr_malloc(addr_len); memcpy(allocated_addr, addr, addr_len); grpc_sockaddr_set_port(allocated_addr, port); addr = allocated_addr; diff --git a/src/core/profiling/basic_timers.c b/src/core/profiling/basic_timers.c index 3067f52c219..3c9557ab895 100644 --- a/src/core/profiling/basic_timers.c +++ b/src/core/profiling/basic_timers.c @@ -173,7 +173,7 @@ static void flush_logs(gpr_timer_log_list *list) { gpr_timer_log *log; while ((log = timer_log_pop_front(list)) != NULL) { write_log(log); - free(log); + gpr_free(log); } } @@ -208,7 +208,7 @@ static void init_output() { } static void rotate_log() { - gpr_timer_log *new = malloc(sizeof(*new)); + gpr_timer_log *new = gpr_malloc(sizeof(*new)); gpr_once_init(&g_once_init, init_output); new->num_entries = 0; pthread_mutex_lock(&g_mu); diff --git a/src/core/support/thd_posix.c b/src/core/support/thd_posix.c index 4d874d36566..1c703844b4d 100644 --- a/src/core/support/thd_posix.c +++ b/src/core/support/thd_posix.c @@ -81,6 +81,7 @@ int gpr_thd_new(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg, thread_started = (pthread_create(&p, &attr, &thread_body, a) == 0); GPR_ASSERT(pthread_attr_destroy(&attr) == 0); if (!thread_started) { + /* don't use gpr_free, as this was allocated using malloc (see above) */ free(a); } *t = (gpr_thd_id)p; diff --git a/src/core/surface/byte_buffer.c b/src/core/surface/byte_buffer.c index fb39c4531d9..a093a37af32 100644 --- a/src/core/surface/byte_buffer.c +++ b/src/core/surface/byte_buffer.c @@ -44,7 +44,7 @@ grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression) { size_t i; - grpc_byte_buffer *bb = malloc(sizeof(grpc_byte_buffer)); + grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer)); bb->type = GRPC_BB_RAW; bb->data.raw.compression = compression; gpr_slice_buffer_init(&bb->data.raw.slice_buffer); @@ -57,7 +57,7 @@ grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( grpc_byte_buffer *grpc_raw_byte_buffer_from_reader( grpc_byte_buffer_reader *reader) { - grpc_byte_buffer *bb = malloc(sizeof(grpc_byte_buffer)); + grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer)); gpr_slice slice; bb->type = GRPC_BB_RAW; bb->data.raw.compression = GRPC_COMPRESS_NONE; @@ -85,7 +85,7 @@ void grpc_byte_buffer_destroy(grpc_byte_buffer *bb) { gpr_slice_buffer_destroy(&bb->data.raw.slice_buffer); break; } - free(bb); + gpr_free(bb); } size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) { diff --git a/src/core/tsi/fake_transport_security.c b/src/core/tsi/fake_transport_security.c index c0106f7a33c..86ffa6b83be 100644 --- a/src/core/tsi/fake_transport_security.c +++ b/src/core/tsi/fake_transport_security.c @@ -134,12 +134,12 @@ static void tsi_fake_frame_reset(tsi_fake_frame *frame, int needs_draining) { static int tsi_fake_frame_ensure_size(tsi_fake_frame *frame) { if (frame->data == NULL) { frame->allocated_size = frame->size; - frame->data = malloc(frame->allocated_size); + frame->data = gpr_malloc(frame->allocated_size); if (frame->data == NULL) return 0; } else if (frame->size > frame->allocated_size) { unsigned char *new_data = realloc(frame->data, frame->size); if (new_data == NULL) { - free(frame->data); + gpr_free(frame->data); frame->data = NULL; return 0; } @@ -160,7 +160,7 @@ static tsi_result fill_frame_from_bytes(const unsigned char *incoming_bytes, if (frame->needs_draining) return TSI_INTERNAL_ERROR; if (frame->data == NULL) { frame->allocated_size = TSI_FAKE_FRAME_INITIAL_ALLOCATED_SIZE; - frame->data = malloc(frame->allocated_size); + frame->data = gpr_malloc(frame->allocated_size); if (frame->data == NULL) return TSI_OUT_OF_RESOURCES; } @@ -226,7 +226,7 @@ static tsi_result bytes_to_frame(unsigned char *bytes, size_t bytes_size, } static void tsi_fake_frame_destruct(tsi_fake_frame *frame) { - if (frame->data != NULL) free(frame->data); + if (frame->data != NULL) gpr_free(frame->data); } /* --- tsi_frame_protector methods implementation. ---*/ @@ -366,7 +366,7 @@ static void fake_protector_destroy(tsi_frame_protector *self) { tsi_fake_frame_protector *impl = (tsi_fake_frame_protector *)self; tsi_fake_frame_destruct(&impl->protect_frame); tsi_fake_frame_destruct(&impl->unprotect_frame); - free(self); + gpr_free(self); } static const tsi_frame_protector_vtable frame_protector_vtable = { @@ -488,7 +488,7 @@ static void fake_handshaker_destroy(tsi_handshaker *self) { tsi_fake_handshaker *impl = (tsi_fake_handshaker *)self; tsi_fake_frame_destruct(&impl->incoming); tsi_fake_frame_destruct(&impl->outgoing); - free(self); + gpr_free(self); } static const tsi_handshaker_vtable handshaker_vtable = { diff --git a/src/core/tsi/ssl_transport_security.c b/src/core/tsi/ssl_transport_security.c index 8df582609b9..acf1b0e3c1d 100644 --- a/src/core/tsi/ssl_transport_security.c +++ b/src/core/tsi/ssl_transport_security.c @@ -148,8 +148,7 @@ static void init_openssl(void) { OpenSSL_add_all_algorithms(); num_locks = CRYPTO_num_locks(); GPR_ASSERT(num_locks > 0); - openssl_mutexes = malloc((size_t)num_locks * sizeof(gpr_mu)); - GPR_ASSERT(openssl_mutexes != NULL); + openssl_mutexes = gpr_malloc((size_t)num_locks * sizeof(gpr_mu)); for (i = 0; i < CRYPTO_num_locks(); i++) { gpr_mu_init(&openssl_mutexes[i]); } @@ -701,7 +700,7 @@ static tsi_result build_alpn_protocol_name_list( } *protocol_name_list_length += (size_t)alpn_protocols_lengths[i] + 1; } - *protocol_name_list = malloc(*protocol_name_list_length); + *protocol_name_list = gpr_malloc(*protocol_name_list_length); if (*protocol_name_list == NULL) return TSI_OUT_OF_RESOURCES; current = *protocol_name_list; for (i = 0; i < num_alpn_protocols; i++) { @@ -852,9 +851,9 @@ static tsi_result ssl_protector_unprotect( static void ssl_protector_destroy(tsi_frame_protector *self) { tsi_ssl_frame_protector *impl = (tsi_ssl_frame_protector *)self; - if (impl->buffer != NULL) free(impl->buffer); + if (impl->buffer != NULL) gpr_free(impl->buffer); if (impl->ssl != NULL) SSL_free(impl->ssl); - free(self); + gpr_free(self); } static const tsi_frame_protector_vtable frame_protector_vtable = { @@ -966,8 +965,8 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker *self, if (alpn_selected != NULL) { size_t i; tsi_peer_property *new_properties = - calloc(1, sizeof(tsi_peer_property) * (peer->property_count + 1)); - if (new_properties == NULL) return TSI_OUT_OF_RESOURCES; + gpr_malloc(sizeof(*new_properties) * (peer->property_count + 1)); + memset(new_properties, 0, sizeof(*new_properties) * (peer->property_count + 1)); for (i = 0; i < peer->property_count; i++) { new_properties[i] = peer->properties[i]; } @@ -975,10 +974,10 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker *self, TSI_SSL_ALPN_SELECTED_PROTOCOL, (const char *)alpn_selected, alpn_selected_len, &new_properties[peer->property_count]); if (result != TSI_OK) { - free(new_properties); + gpr_free(new_properties); return result; } - if (peer->properties != NULL) free(peer->properties); + if (peer->properties != NULL) gpr_free(peer->properties); peer->property_count++; peer->properties = new_properties; } @@ -992,10 +991,8 @@ static tsi_result ssl_handshaker_create_frame_protector( TSI_SSL_MAX_PROTECTED_FRAME_SIZE_UPPER_BOUND; tsi_ssl_handshaker *impl = (tsi_ssl_handshaker *)self; tsi_ssl_frame_protector *protector_impl = - calloc(1, sizeof(tsi_ssl_frame_protector)); - if (protector_impl == NULL) { - return TSI_OUT_OF_RESOURCES; - } + gpr_malloc(sizeof(*protector_impl)); + memset(protector_impl, 0, sizeof(*protector_impl)); if (max_output_protected_frame_size != NULL) { if (*max_output_protected_frame_size > @@ -1011,11 +1008,11 @@ static tsi_result ssl_handshaker_create_frame_protector( } protector_impl->buffer_size = actual_max_output_protected_frame_size - TSI_SSL_MAX_PROTECTION_OVERHEAD; - protector_impl->buffer = malloc(protector_impl->buffer_size); + protector_impl->buffer = gpr_malloc(protector_impl->buffer_size); if (protector_impl->buffer == NULL) { gpr_log(GPR_ERROR, "Could not allocated buffer for tsi_ssl_frame_protector."); - free(protector_impl); + gpr_free(protector_impl); return TSI_INTERNAL_ERROR; } @@ -1034,7 +1031,7 @@ static tsi_result ssl_handshaker_create_frame_protector( static void ssl_handshaker_destroy(tsi_handshaker *self) { tsi_ssl_handshaker *impl = (tsi_ssl_handshaker *)self; SSL_free(impl->ssl); /* The BIO objects are owned by ssl */ - free(impl); + gpr_free(impl); } static const tsi_handshaker_vtable handshaker_vtable = { @@ -1111,11 +1108,8 @@ static tsi_result create_tsi_ssl_handshaker(SSL_CTX *ctx, int is_client, SSL_set_accept_state(ssl); } - impl = calloc(1, sizeof(tsi_ssl_handshaker)); - if (impl == NULL) { - SSL_free(ssl); - return TSI_OUT_OF_RESOURCES; - } + impl = gpr_malloc(sizeof(*impl)); + memset(impl, 0, sizeof(*impl)); impl->ssl = ssl; impl->into_ssl = into_ssl; impl->from_ssl = from_ssl; @@ -1167,8 +1161,8 @@ static void ssl_client_handshaker_factory_destroy( tsi_ssl_client_handshaker_factory *impl = (tsi_ssl_client_handshaker_factory *)self; if (impl->ssl_context != NULL) SSL_CTX_free(impl->ssl_context); - if (impl->alpn_protocol_list != NULL) free(impl->alpn_protocol_list); - free(impl); + if (impl->alpn_protocol_list != NULL) gpr_free(impl->alpn_protocol_list); + gpr_free(impl); } static int client_handshaker_factory_npn_callback(SSL *ssl, unsigned char **out, @@ -1209,12 +1203,12 @@ static void ssl_server_handshaker_factory_destroy( tsi_peer_destruct(&impl->ssl_context_x509_subject_names[i]); } } - if (impl->ssl_contexts != NULL) free(impl->ssl_contexts); + if (impl->ssl_contexts != NULL) gpr_free(impl->ssl_contexts); if (impl->ssl_context_x509_subject_names != NULL) { - free(impl->ssl_context_x509_subject_names); + gpr_free(impl->ssl_context_x509_subject_names); } - if (impl->alpn_protocol_list != NULL) free(impl->alpn_protocol_list); - free(impl); + if (impl->alpn_protocol_list != NULL) gpr_free(impl->alpn_protocol_list); + gpr_free(impl); } static int does_entry_match_name(const char *entry, size_t entry_length, @@ -1333,11 +1327,8 @@ tsi_result tsi_create_ssl_client_handshaker_factory( return TSI_INVALID_ARGUMENT; } - impl = calloc(1, sizeof(tsi_ssl_client_handshaker_factory)); - if (impl == NULL) { - SSL_CTX_free(ssl_context); - return TSI_OUT_OF_RESOURCES; - } + impl = gpr_malloc(sizeof(*impl)); + memset(impl, 0, sizeof(*impl)); impl->ssl_context = ssl_context; do { @@ -1411,14 +1402,16 @@ tsi_result tsi_create_ssl_server_handshaker_factory( return TSI_INVALID_ARGUMENT; } - impl = calloc(1, sizeof(tsi_ssl_server_handshaker_factory)); - if (impl == NULL) return TSI_OUT_OF_RESOURCES; + impl = gpr_malloc(sizeof(*impl)); + memset(impl, 0, sizeof(*impl)); impl->base.create_handshaker = ssl_server_handshaker_factory_create_handshaker; impl->base.destroy = ssl_server_handshaker_factory_destroy; - impl->ssl_contexts = calloc(key_cert_pair_count, sizeof(SSL_CTX *)); + impl->ssl_contexts = gpr_malloc(key_cert_pair_count * sizeof(SSL_CTX *)); + memset(impl->ssl_contexts, 0, key_cert_pair_count * sizeof(SSL_CTX *)); impl->ssl_context_x509_subject_names = - calloc(key_cert_pair_count, sizeof(tsi_peer)); + gpr_malloc(key_cert_pair_count * sizeof(tsi_peer)); + memset(impl->ssl_context_x509_subject_names, 0, key_cert_pair_count * sizeof(tsi_peer)); if (impl->ssl_contexts == NULL || impl->ssl_context_x509_subject_names == NULL) { tsi_ssl_handshaker_factory_destroy(&impl->base); diff --git a/src/core/tsi/transport_security.c b/src/core/tsi/transport_security.c index db219a50a67..e17749d871a 100644 --- a/src/core/tsi/transport_security.c +++ b/src/core/tsi/transport_security.c @@ -239,16 +239,10 @@ void tsi_peer_destruct(tsi_peer *self) { tsi_result tsi_construct_allocated_string_peer_property( const char *name, size_t value_length, tsi_peer_property *property) { *property = tsi_init_peer_property(); - if (name != NULL) { - property->name = tsi_strdup(name); - if (property->name == NULL) return TSI_OUT_OF_RESOURCES; - } + if (name != NULL) property->name = gpr_strdup(name); if (value_length > 0) { - property->value.data = calloc(1, value_length); - if (property->value.data == NULL) { - tsi_peer_property_destruct(property); - return TSI_OUT_OF_RESOURCES; - } + property->value.data = gpr_malloc(value_length); + memset(value.data, 0, value_length); property->value.length = value_length; } return TSI_OK; @@ -276,8 +270,8 @@ tsi_result tsi_construct_string_peer_property(const char *name, tsi_result tsi_construct_peer(size_t property_count, tsi_peer *peer) { memset(peer, 0, sizeof(tsi_peer)); if (property_count > 0) { - peer->properties = calloc(property_count, sizeof(tsi_peer_property)); - if (peer->properties == NULL) return TSI_OUT_OF_RESOURCES; + peer->properties = gpr_malloc(property_count * sizeof(tsi_peer_property)); + memset(peer->properties, 0, property_count * sizeof(tsi_peer_property)); peer->property_count = property_count; } return TSI_OK; diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index f689e4ba7fb..cb23f58eca5 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -89,7 +89,7 @@ static void end_test(grpc_endpoint_test_config config) { config.clean_up(); } static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0); - gpr_slice *slices = malloc(sizeof(gpr_slice) * nslices); + gpr_slice *slices = gpr_malloc(sizeof(gpr_slice) * nslices); size_t num_bytes_left = num_bytes; size_t i; size_t j; @@ -164,7 +164,7 @@ static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, gpr_slice_buffer_addn(&state->outgoing, slices, nslices); grpc_endpoint_write(exec_ctx, state->write_ep, &state->outgoing, &state->done_write); - free(slices); + gpr_free(slices); return; } } diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 4351642ab6e..b2cf87a0c25 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -97,7 +97,7 @@ static ssize_t fill_socket(int fd) { static size_t fill_socket_partial(int fd, size_t bytes) { ssize_t write_bytes; size_t total_bytes = 0; - unsigned char *buf = malloc(bytes); + unsigned char *buf = gpr_malloc(bytes); unsigned i; for (i = 0; i < bytes; ++i) { buf[i] = (uint8_t)(i % 256); @@ -292,7 +292,7 @@ static void write_done(grpc_exec_ctx *exec_ctx, } void drain_socket_blocking(int fd, size_t num_bytes, size_t read_size) { - unsigned char *buf = malloc(read_size); + unsigned char *buf = gpr_malloc(read_size); ssize_t bytes_read; size_t bytes_left = num_bytes; int flags; diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c index 7ed3372d5d1..8179ba3b4df 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.c +++ b/test/core/network_benchmarks/low_level_ping_pong.c @@ -265,19 +265,19 @@ static int epoll_setup(thread_args *args) { #endif static void server_thread(thread_args *args) { - char *buf = malloc(args->msg_size); + char *buf = gpr_malloc(args->msg_size); if (args->setup(args) < 0) { gpr_log(GPR_ERROR, "Setup failed"); } for (;;) { if (args->read_bytes(args, buf) < 0) { gpr_log(GPR_ERROR, "Server read failed"); - free(buf); + gpr_free(buf); return; } if (args->write_bytes(args, buf) < 0) { gpr_log(GPR_ERROR, "Server write failed"); - free(buf); + gpr_free(buf); return; } } @@ -304,7 +304,8 @@ static double now(void) { } static void client_thread(thread_args *args) { - char *buf = calloc(args->msg_size, sizeof(char)); + char *buf = gpr_malloc(args->msg_size * sizeof(char)); + memset(buf, 0, args->msg_size * sizeof(char)); gpr_histogram *histogram = gpr_histogram_create(0.01, 60e9); double start_time; double end_time; @@ -333,7 +334,7 @@ static void client_thread(thread_args *args) { } print_histogram(histogram); error: - free(buf); + gpr_free(buf); gpr_histogram_destroy(histogram); } @@ -596,8 +597,8 @@ static int run_all_benchmarks(size_t msg_size) { test_strategy *strategy = &test_strategies[i]; size_t j; for (j = 0; j < GPR_ARRAY_SIZE(socket_types); ++j) { - thread_args *client_args = malloc(sizeof(thread_args)); - thread_args *server_args = malloc(sizeof(thread_args)); + thread_args *client_args = gpr_malloc(sizeof(thread_args)); + thread_args *server_args = gpr_malloc(sizeof(thread_args)); char *socket_type = socket_types[j]; client_args->read_bytes = strategy->read_strategy; @@ -620,8 +621,8 @@ static int run_all_benchmarks(size_t msg_size) { } int main(int argc, char **argv) { - thread_args *client_args = malloc(sizeof(thread_args)); - thread_args *server_args = malloc(sizeof(thread_args)); + thread_args *client_args = gpr_malloc(sizeof(thread_args)); + thread_args *server_args = gpr_malloc(sizeof(thread_args)); int msg_size = -1; char *read_strategy = NULL; char *socket_type = NULL; diff --git a/test/core/support/alloc_test.c b/test/core/support/alloc_test.c index e2d0c16b41d..7eaf7a14f3e 100644 --- a/test/core/support/alloc_test.c +++ b/test/core/support/alloc_test.c @@ -46,7 +46,7 @@ static void fake_free(void *addr) { static void test_custom_allocs() { const gpr_allocation_functions default_fns = gpr_get_allocation_functions(); intptr_t addr_to_free = 0; - int *i; + char *i; gpr_allocation_functions fns = {fake_malloc, fake_realloc, fake_free}; gpr_set_allocation_functions(fns); @@ -58,7 +58,7 @@ static void test_custom_allocs() { /* Restore and check we don't get funky values and that we don't leak */ gpr_set_allocation_functions(default_fns); - GPR_ASSERT((void *)1 != (i = gpr_malloc(sizeof(*i)))); + GPR_ASSERT((void *)sizeof(*i) != (i = gpr_malloc(sizeof(*i)))); GPR_ASSERT((void *)2 != (i = gpr_realloc(i, 2))); gpr_free(i); } From 5d203f514c204083d1d81a804bd64df2d196197a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 26 Mar 2016 01:35:33 +0100 Subject: [PATCH 02/93] Sanitize sources. --- src/core/surface/byte_buffer.c | 2 +- src/core/tsi/ssl_transport_security.c | 9 +++++---- src/core/tsi/transport_security.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/surface/byte_buffer.c b/src/core/surface/byte_buffer.c index a093a37af32..314a67dfcca 100644 --- a/src/core/surface/byte_buffer.c +++ b/src/core/surface/byte_buffer.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/tsi/ssl_transport_security.c b/src/core/tsi/ssl_transport_security.c index acf1b0e3c1d..968c0b9be8f 100644 --- a/src/core/tsi/ssl_transport_security.c +++ b/src/core/tsi/ssl_transport_security.c @@ -966,7 +966,8 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker *self, size_t i; tsi_peer_property *new_properties = gpr_malloc(sizeof(*new_properties) * (peer->property_count + 1)); - memset(new_properties, 0, sizeof(*new_properties) * (peer->property_count + 1)); + memset(new_properties, 0, + sizeof(*new_properties) * (peer->property_count + 1)); for (i = 0; i < peer->property_count; i++) { new_properties[i] = peer->properties[i]; } @@ -990,8 +991,7 @@ static tsi_result ssl_handshaker_create_frame_protector( size_t actual_max_output_protected_frame_size = TSI_SSL_MAX_PROTECTED_FRAME_SIZE_UPPER_BOUND; tsi_ssl_handshaker *impl = (tsi_ssl_handshaker *)self; - tsi_ssl_frame_protector *protector_impl = - gpr_malloc(sizeof(*protector_impl)); + tsi_ssl_frame_protector *protector_impl = gpr_malloc(sizeof(*protector_impl)); memset(protector_impl, 0, sizeof(*protector_impl)); if (max_output_protected_frame_size != NULL) { @@ -1411,7 +1411,8 @@ tsi_result tsi_create_ssl_server_handshaker_factory( memset(impl->ssl_contexts, 0, key_cert_pair_count * sizeof(SSL_CTX *)); impl->ssl_context_x509_subject_names = gpr_malloc(key_cert_pair_count * sizeof(tsi_peer)); - memset(impl->ssl_context_x509_subject_names, 0, key_cert_pair_count * sizeof(tsi_peer)); + memset(impl->ssl_context_x509_subject_names, 0, + key_cert_pair_count * sizeof(tsi_peer)); if (impl->ssl_contexts == NULL || impl->ssl_context_x509_subject_names == NULL) { tsi_ssl_handshaker_factory_destroy(&impl->base); diff --git a/src/core/tsi/transport_security.c b/src/core/tsi/transport_security.c index e17749d871a..189f5a0228a 100644 --- a/src/core/tsi/transport_security.c +++ b/src/core/tsi/transport_security.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without From 367e5d896b115413f278b239dd63194cb3671c17 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 26 Mar 2016 01:37:43 +0100 Subject: [PATCH 03/93] Forgot a few callocs. --- src/core/tsi/fake_transport_security.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/tsi/fake_transport_security.c b/src/core/tsi/fake_transport_security.c index 86ffa6b83be..85c8ff7a57c 100644 --- a/src/core/tsi/fake_transport_security.c +++ b/src/core/tsi/fake_transport_security.c @@ -501,7 +501,8 @@ static const tsi_handshaker_vtable handshaker_vtable = { }; tsi_handshaker *tsi_create_fake_handshaker(int is_client) { - tsi_fake_handshaker *impl = calloc(1, sizeof(tsi_fake_handshaker)); + tsi_fake_handshaker *impl = gpr_malloc(sizeof(*impl)); + memset(impl, 0, sizeof(*impl)); impl->base.vtable = &handshaker_vtable; impl->is_client = is_client; impl->result = TSI_HANDSHAKE_IN_PROGRESS; @@ -517,8 +518,8 @@ tsi_handshaker *tsi_create_fake_handshaker(int is_client) { tsi_frame_protector *tsi_create_fake_protector( size_t *max_protected_frame_size) { - tsi_fake_frame_protector *impl = calloc(1, sizeof(tsi_fake_frame_protector)); - if (impl == NULL) return NULL; + tsi_fake_frame_protector *impl = gpr_malloc(sizeof(*impl)); + memset(impl, 0, sizeof(*impl)); impl->max_frame_size = (max_protected_frame_size == NULL) ? TSI_FAKE_DEFAULT_FRAME_SIZE : *max_protected_frame_size; From bba0266a2fc2c1efc57d54858ada98ee1da72f24 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 31 Mar 2016 22:10:01 -0700 Subject: [PATCH 04/93] Generalized nanopb generator script --- ...d_balancing_proto.sh => gen_nano_proto.sh} | 51 +++++++++---------- tools/distrib/check_nanopb_output.sh | 2 +- 2 files changed, 26 insertions(+), 27 deletions(-) rename tools/codegen/core/{gen_load_balancing_proto.sh => gen_nano_proto.sh} (79%) diff --git a/tools/codegen/core/gen_load_balancing_proto.sh b/tools/codegen/core/gen_nano_proto.sh similarity index 79% rename from tools/codegen/core/gen_load_balancing_proto.sh rename to tools/codegen/core/gen_nano_proto.sh index 339da0a7339..ad3c920ee0b 100755 --- a/tools/codegen/core/gen_load_balancing_proto.sh +++ b/tools/codegen/core/gen_nano_proto.sh @@ -31,8 +31,9 @@ # # Example usage: -# tools/codegen/core/gen_load_balancing_proto.sh \ +# tools/codegen/core/gen_nano_proto.sh \ # src/proto/grpc/lb/v0/load_balancer.proto +# src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0 read -r -d '' COPYRIGHT <<'EOF' /* @@ -75,27 +76,19 @@ COPYRIGHT_FILE=$(mktemp) echo "${COPYRIGHT//$CURRENT_YEAR}" > $COPYRIGHT_FILE set -ex -if [ $# -eq 0 ]; then - echo "Usage: $0 [output dir]" +if [ $# -ne 2 ]; then + echo "Usage: $0 " exit 1 fi readonly GRPC_ROOT=$PWD - -OUTPUT_DIR="$GRPC_ROOT/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0" -if [ $# -eq 2 ]; then - mkdir -p "$2" - if [ $? != 0 ]; then - echo "Error creating output directory $2" - exit 2 - fi - OUTPUT_DIR="$2" -fi - +readonly INPUT_PROTO="$1" +readonly REL_OUTPUT_DIR="$2" +readonly ABS_OUTPUT_DIR="$GRPC_ROOT/$2" readonly EXPECTED_OPTIONS_FILE_PATH="${1%.*}.options" -if [[ ! -f "$1" ]]; then - echo "Input proto file '$1' doesn't exist." +if [[ ! -f "$INPUT_PROTO" ]]; then + echo "Input proto file '$INPUT_PROTO' doesn't exist." exit 3 fi if [[ ! -f "${EXPECTED_OPTIONS_FILE_PATH}" ]]; then @@ -103,6 +96,12 @@ if [[ ! -f "${EXPECTED_OPTIONS_FILE_PATH}" ]]; then exit 4 fi +mkdir -p "ABS_OUTPUT_DIR" +if [ $? != 0 ]; then + echo "Error creating output directory $ABS_OUTPUT_DIR" + exit 2 +fi + readonly VENV_DIR=$(mktemp -d) readonly VENV_NAME="nanopb-$(date '+%Y%m%d_%H%M%S_%N')" pushd $VENV_DIR @@ -114,23 +113,23 @@ popd # ideally we'd update this as a template to ensure that pip install protobuf==3.0.0b2 -pushd "$(dirname $1)" > /dev/null +pushd "$(dirname $INPUT_PROTO)" > /dev/null protoc \ --plugin=protoc-gen-nanopb="$GRPC_ROOT/third_party/nanopb/generator/protoc-gen-nanopb" \ ---nanopb_out='-T -L#include\ \"third_party/nanopb/pb.h\"'":$OUTPUT_DIR" \ -"$(basename $1)" +--nanopb_out='-T -L#include\ \"third_party/nanopb/pb.h\"'":$ABS_OUTPUT_DIR" \ +"$(basename $INPUT_PROTO)" -readonly PROTO_BASENAME=$(basename $1 .proto) -sed -i "s:$PROTO_BASENAME.pb.h:src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h:g" \ - "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" +readonly PROTO_BASENAME=$(basename $INPUT_PROTO .proto) +sed -i "s:$PROTO_BASENAME.pb.h:$REL_OUTPUT_DIR/$PROTO_BASENAME.pb.h:g" \ + "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.c" # prepend copyright TMPFILE=$(mktemp) -cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" > $TMPFILE -mv -v $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" -cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" > $TMPFILE -mv -v $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" +cat $COPYRIGHT_FILE "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.c" > $TMPFILE +mv -v $TMPFILE "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.c" +cat $COPYRIGHT_FILE "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.h" > $TMPFILE +mv -v $TMPFILE "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.h" deactivate rm -rf $VENV_DIR diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh index 4f68e4c596f..f299d74638b 100755 --- a/tools/distrib/check_nanopb_output.sh +++ b/tools/distrib/check_nanopb_output.sh @@ -55,7 +55,7 @@ popd # nanopb-compile the proto to a temp location -PATH="$PROTOC_PATH:$PATH" ./tools/codegen/core/gen_load_balancing_proto.sh \ +PATH="$PROTOC_PATH:$PATH" ./tools/codegen/core/gen_nano_proto.sh \ src/proto/grpc/lb/v0/load_balancer.proto \ $NANOPB_TMP_OUTPUT From 4875ce606b4147c0e11baef9e8cc51bc29e84eff Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 1 Apr 2016 14:39:35 -0700 Subject: [PATCH 05/93] fixed typo --- tools/codegen/core/gen_nano_proto.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/codegen/core/gen_nano_proto.sh b/tools/codegen/core/gen_nano_proto.sh index ad3c920ee0b..81b91229709 100755 --- a/tools/codegen/core/gen_nano_proto.sh +++ b/tools/codegen/core/gen_nano_proto.sh @@ -96,7 +96,7 @@ if [[ ! -f "${EXPECTED_OPTIONS_FILE_PATH}" ]]; then exit 4 fi -mkdir -p "ABS_OUTPUT_DIR" +mkdir -p "$ABS_OUTPUT_DIR" if [ $? != 0 ]; then echo "Error creating output directory $ABS_OUTPUT_DIR" exit 2 From d6b4628f42d7a9889c488d7d11d1c2a936f6583d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 1 Apr 2016 19:06:44 -0700 Subject: [PATCH 06/93] Further improvements --- tools/codegen/core/gen_nano_proto.sh | 35 ++++++++++++++++------------ tools/distrib/check_nanopb_output.sh | 28 +++++++++++++--------- 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/tools/codegen/core/gen_nano_proto.sh b/tools/codegen/core/gen_nano_proto.sh index 81b91229709..db69d28ae78 100755 --- a/tools/codegen/core/gen_nano_proto.sh +++ b/tools/codegen/core/gen_nano_proto.sh @@ -33,7 +33,7 @@ # Example usage: # tools/codegen/core/gen_nano_proto.sh \ # src/proto/grpc/lb/v0/load_balancer.proto -# src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0 +# $PWD/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0 read -r -d '' COPYRIGHT <<'EOF' /* @@ -76,15 +76,15 @@ COPYRIGHT_FILE=$(mktemp) echo "${COPYRIGHT//$CURRENT_YEAR}" > $COPYRIGHT_FILE set -ex -if [ $# -ne 2 ]; then - echo "Usage: $0 " +if [ $# -lt 2 ]; then + echo "Usage: $0 [grpc path]" exit 1 fi -readonly GRPC_ROOT=$PWD +readonly GRPC_ROOT="$PWD" readonly INPUT_PROTO="$1" -readonly REL_OUTPUT_DIR="$2" -readonly ABS_OUTPUT_DIR="$GRPC_ROOT/$2" +readonly OUTPUT_DIR="$2" +readonly GRPC_OUTPUT_DIR="${3:-$OUTPUT_DIR}" readonly EXPECTED_OPTIONS_FILE_PATH="${1%.*}.options" if [[ ! -f "$INPUT_PROTO" ]]; then @@ -96,9 +96,14 @@ if [[ ! -f "${EXPECTED_OPTIONS_FILE_PATH}" ]]; then exit 4 fi -mkdir -p "$ABS_OUTPUT_DIR" +if [[ "${OUTPUT_DIR:0:1}" != '/' ]]; then + echo "The output directory must be an absolute path. Got '$OUTPUT_DIR'" + exit 5 +fi + +mkdir -p "$OUTPUT_DIR" if [ $? != 0 ]; then - echo "Error creating output directory $ABS_OUTPUT_DIR" + echo "Error creating output directory $OUTPUT_DIR" exit 2 fi @@ -117,19 +122,19 @@ pushd "$(dirname $INPUT_PROTO)" > /dev/null protoc \ --plugin=protoc-gen-nanopb="$GRPC_ROOT/third_party/nanopb/generator/protoc-gen-nanopb" \ ---nanopb_out='-T -L#include\ \"third_party/nanopb/pb.h\"'":$ABS_OUTPUT_DIR" \ +--nanopb_out='-T -L#include\ \"third_party/nanopb/pb.h\"'":$OUTPUT_DIR" \ "$(basename $INPUT_PROTO)" readonly PROTO_BASENAME=$(basename $INPUT_PROTO .proto) -sed -i "s:$PROTO_BASENAME.pb.h:$REL_OUTPUT_DIR/$PROTO_BASENAME.pb.h:g" \ - "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.c" +sed -i "s:$PROTO_BASENAME.pb.h:${GRPC_OUTPUT_DIR}/$PROTO_BASENAME.pb.h:g" \ + "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" # prepend copyright TMPFILE=$(mktemp) -cat $COPYRIGHT_FILE "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.c" > $TMPFILE -mv -v $TMPFILE "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.c" -cat $COPYRIGHT_FILE "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.h" > $TMPFILE -mv -v $TMPFILE "$ABS_OUTPUT_DIR/$PROTO_BASENAME.pb.h" +cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" > $TMPFILE +mv -v $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" +cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" > $TMPFILE +mv -v $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" deactivate rm -rf $VENV_DIR diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh index f299d74638b..92cb8ecbb49 100755 --- a/tools/distrib/check_nanopb_output.sh +++ b/tools/distrib/check_nanopb_output.sh @@ -31,36 +31,42 @@ set -ex readonly NANOPB_TMP_OUTPUT="$(mktemp -d)" +readonly PROTOBUF_INSTALL_PREFIX="$(mktemp -d)" # install protoc version 3 pushd third_party/protobuf ./autogen.sh -./configure +./configure --prefix="$PROTOBUF_INSTALL_PREFIX" make make install -ldconfig +#ldconfig popd -if [ ! -x "/usr/local/bin/protoc" ]; then - echo "Error: protoc not found in path" +readonly PROTOC_BIN_PATH="$PROTOBUF_INSTALL_PREFIX/bin" +if [ ! -x "$PROTOBUF_INSTALL_PREFIX/bin/protoc" ]; then + echo "Error: protoc not found in temp install dir '$PROTOBUF_INSTALL_PREFIX'" exit 1 fi -readonly PROTOC_PATH='/usr/local/bin' + # stack up and change to nanopb's proto generator directory pushd third_party/nanopb/generator/proto -PATH="$PROTOC_PATH:$PATH" make - +export PATH="$PROTOC_BIN_PATH:$PATH" +make # back to the root directory popd - +# +# Checks for load_balancer.proto +# +readonly LOAD_BALANCER_GRPC_OUTPUT_PATH='src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0' # nanopb-compile the proto to a temp location -PATH="$PROTOC_PATH:$PATH" ./tools/codegen/core/gen_nano_proto.sh \ +./tools/codegen/core/gen_nano_proto.sh \ src/proto/grpc/lb/v0/load_balancer.proto \ - $NANOPB_TMP_OUTPUT + "$NANOPB_TMP_OUTPUT" \ + "$LOAD_BALANCER_GRPC_OUTPUT_PATH" # compare outputs to checked compiled code if ! diff -r $NANOPB_TMP_OUTPUT src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0; then - echo "Outputs differ: $NANOPB_TMP_OUTPUT vs src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0" + echo "Outputs differ: $NANOPB_TMP_OUTPUT vs $LOAD_BALANCER_GRPC_OUTPUT_PATH" exit 2 fi From b29d8cfeb886e951dcbacc0f42f12624a2684086 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 8 Apr 2016 01:38:29 +0200 Subject: [PATCH 07/93] Last few mallocs / frees. --- include/grpc/support/string_util.h | 2 ++ src/core/lib/support/log_linux.c | 1 + src/core/lib/tsi/fake_transport_security.c | 3 ++- src/core/lib/tsi/ssl_transport_security.c | 1 + src/core/lib/tsi/transport_security.c | 24 +++++++--------------- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/include/grpc/support/string_util.h b/include/grpc/support/string_util.h index 0abdb4a8c86..f981bc0db0b 100644 --- a/include/grpc/support/string_util.h +++ b/include/grpc/support/string_util.h @@ -34,6 +34,8 @@ #ifndef GRPC_SUPPORT_STRING_UTIL_H #define GRPC_SUPPORT_STRING_UTIL_H +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/src/core/lib/support/log_linux.c b/src/core/lib/support/log_linux.c index 6d4b63bbe0d..ff3febb38eb 100644 --- a/src/core/lib/support/log_linux.c +++ b/src/core/lib/support/log_linux.c @@ -68,6 +68,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, } va_end(args); gpr_log_message(file, line, severity, message); + /* message has been allocated by vasprintf above, and needs free */ free(message); } diff --git a/src/core/lib/tsi/fake_transport_security.c b/src/core/lib/tsi/fake_transport_security.c index a0f69c3d64d..0e20d6fd710 100644 --- a/src/core/lib/tsi/fake_transport_security.c +++ b/src/core/lib/tsi/fake_transport_security.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -137,7 +138,7 @@ static int tsi_fake_frame_ensure_size(tsi_fake_frame *frame) { frame->data = gpr_malloc(frame->allocated_size); if (frame->data == NULL) return 0; } else if (frame->size > frame->allocated_size) { - unsigned char *new_data = realloc(frame->data, frame->size); + unsigned char *new_data = gpr_realloc(frame->data, frame->size); if (new_data == NULL) { gpr_free(frame->data); frame->data = NULL; diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c index ef3aeb70901..045901cc72f 100644 --- a/src/core/lib/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -45,6 +45,7 @@ #include #endif +#include #include #include #include diff --git a/src/core/lib/tsi/transport_security.c b/src/core/lib/tsi/transport_security.c index 66f1e356d6a..830cf095848 100644 --- a/src/core/lib/tsi/transport_security.c +++ b/src/core/lib/tsi/transport_security.c @@ -33,6 +33,9 @@ #include "src/core/lib/tsi/transport_security.h" +#include +#include + #include #include @@ -40,19 +43,6 @@ int tsi_tracing_enabled = 0; -/* --- Utils. --- */ - -char *tsi_strdup(const char *src) { - char *dst; - size_t len; - if (!src) return NULL; - len = strlen(src) + 1; - dst = malloc(len); - if (!dst) return NULL; - memcpy(dst, src, len); - return dst; -} - /* --- tsi_result common implementation. --- */ const char *tsi_result_to_string(tsi_result result) { @@ -214,15 +204,15 @@ static void tsi_peer_destroy_list_property(tsi_peer_property *children, for (i = 0; i < child_count; i++) { tsi_peer_property_destruct(&children[i]); } - free(children); + gpr_free(children); } void tsi_peer_property_destruct(tsi_peer_property *property) { if (property->name != NULL) { - free(property->name); + gpr_free(property->name); } if (property->value.data != NULL) { - free(property->value.data); + gpr_free(property->value.data); } *property = tsi_init_peer_property(); /* Reset everything to 0. */ } @@ -242,7 +232,7 @@ tsi_result tsi_construct_allocated_string_peer_property( if (name != NULL) property->name = gpr_strdup(name); if (value_length > 0) { property->value.data = gpr_malloc(value_length); - memset(value.data, 0, value_length); + memset(property->value.data, 0, value_length); property->value.length = value_length; } return TSI_OK; From b206c154dd7605bf0dbdc7a69605b6f749d2bef4 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 8 Apr 2016 19:42:28 +0200 Subject: [PATCH 08/93] Addressing comment. --- src/core/lib/profiling/basic_timers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/lib/profiling/basic_timers.c b/src/core/lib/profiling/basic_timers.c index 0a4ae3057ad..50082cd7ee4 100644 --- a/src/core/lib/profiling/basic_timers.c +++ b/src/core/lib/profiling/basic_timers.c @@ -173,7 +173,7 @@ static void flush_logs(gpr_timer_log_list *list) { gpr_timer_log *log; while ((log = timer_log_pop_front(list)) != NULL) { write_log(log); - gpr_free(log); + free(log); } } @@ -208,7 +208,8 @@ static void init_output() { } static void rotate_log() { - gpr_timer_log *new = gpr_malloc(sizeof(*new)); + /* Using malloc here, as this code could end up being called by gpr_malloc */ + gpr_timer_log *new = malloc(sizeof(*new)); gpr_once_init(&g_once_init, init_output); new->num_entries = 0; pthread_mutex_lock(&g_mu); From 9885bff5fb817031a9f8b73d0960f7ae5e3c3c2a Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 7 Apr 2016 17:31:29 -0700 Subject: [PATCH 09/93] Factored out parse functions from sockaddr_resolver --- BUILD | 6 + Makefile | 2 + binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC.podspec | 3 + grpc.gemspec | 2 + package.json | 2 + package.xml | 2 + src/core/ext/client_config/parse_address.c | 137 ++++++++++++++++++ src/core/ext/client_config/parse_address.h | 56 +++++++ .../ext/resolver/sockaddr/sockaddr_resolver.c | 98 +------------ src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure.vcxproj.filters | 6 + 19 files changed, 239 insertions(+), 97 deletions(-) create mode 100644 src/core/ext/client_config/parse_address.c create mode 100644 src/core/ext/client_config/parse_address.h diff --git a/BUILD b/BUILD index fa9a1209899..b4751a70810 100644 --- a/BUILD +++ b/BUILD @@ -275,6 +275,7 @@ cc_library( "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", @@ -426,6 +427,7 @@ cc_library( "src/core/ext/client_config/lb_policy.c", "src/core/ext/client_config/lb_policy_factory.c", "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/parse_address.c", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_registry.c", @@ -603,6 +605,7 @@ cc_library( "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", @@ -736,6 +739,7 @@ cc_library( "src/core/ext/client_config/lb_policy.c", "src/core/ext/client_config/lb_policy_factory.c", "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/parse_address.c", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_registry.c", @@ -1434,6 +1438,7 @@ objc_library( "src/core/ext/client_config/lb_policy.c", "src/core/ext/client_config/lb_policy_factory.c", "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/parse_address.c", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_registry.c", @@ -1604,6 +1609,7 @@ objc_library( "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", diff --git a/Makefile b/Makefile index 6b2b9eb2dee..508513050d7 100644 --- a/Makefile +++ b/Makefile @@ -2576,6 +2576,7 @@ LIBGRPC_SRC = \ src/core/ext/client_config/lb_policy.c \ src/core/ext/client_config/lb_policy_factory.c \ src/core/ext/client_config/lb_policy_registry.c \ + src/core/ext/client_config/parse_address.c \ src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_registry.c \ @@ -2891,6 +2892,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/client_config/lb_policy.c \ src/core/ext/client_config/lb_policy_factory.c \ src/core/ext/client_config/lb_policy_registry.c \ + src/core/ext/client_config/parse_address.c \ src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_registry.c \ diff --git a/binding.gyp b/binding.gyp index 8efc8a2b8e6..53d86534def 100644 --- a/binding.gyp +++ b/binding.gyp @@ -694,6 +694,7 @@ 'src/core/ext/client_config/lb_policy.c', 'src/core/ext/client_config/lb_policy_factory.c', 'src/core/ext/client_config/lb_policy_registry.c', + 'src/core/ext/client_config/parse_address.c', 'src/core/ext/client_config/resolver.c', 'src/core/ext/client_config/resolver_factory.c', 'src/core/ext/client_config/resolver_registry.c', diff --git a/build.yaml b/build.yaml index cbbc3d22464..f11e34ab650 100644 --- a/build.yaml +++ b/build.yaml @@ -442,6 +442,7 @@ filegroups: - src/core/ext/client_config/lb_policy.h - src/core/ext/client_config/lb_policy_factory.h - src/core/ext/client_config/lb_policy_registry.h + - src/core/ext/client_config/parse_address.h - src/core/ext/client_config/resolver.h - src/core/ext/client_config/resolver_factory.h - src/core/ext/client_config/resolver_registry.h @@ -461,6 +462,7 @@ filegroups: - src/core/ext/client_config/lb_policy.c - src/core/ext/client_config/lb_policy_factory.c - src/core/ext/client_config/lb_policy_registry.c + - src/core/ext/client_config/parse_address.c - src/core/ext/client_config/resolver.c - src/core/ext/client_config/resolver_factory.c - src/core/ext/client_config/resolver_registry.c diff --git a/config.m4 b/config.m4 index 7d3d899a405..c26cb7b881f 100644 --- a/config.m4 +++ b/config.m4 @@ -216,6 +216,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_config/lb_policy.c \ src/core/ext/client_config/lb_policy_factory.c \ src/core/ext/client_config/lb_policy_registry.c \ + src/core/ext/client_config/parse_address.c \ src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_registry.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 82c5eaac411..7ede97d1a9b 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -277,6 +277,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/lb_policy.h', 'src/core/ext/client_config/lb_policy_factory.h', 'src/core/ext/client_config/lb_policy_registry.h', + 'src/core/ext/client_config/parse_address.h', 'src/core/ext/client_config/resolver.h', 'src/core/ext/client_config/resolver_factory.h', 'src/core/ext/client_config/resolver_registry.h', @@ -459,6 +460,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/lb_policy.c', 'src/core/ext/client_config/lb_policy_factory.c', 'src/core/ext/client_config/lb_policy_registry.c', + 'src/core/ext/client_config/parse_address.c', 'src/core/ext/client_config/resolver.c', 'src/core/ext/client_config/resolver_factory.c', 'src/core/ext/client_config/resolver_registry.c', @@ -616,6 +618,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/lb_policy.h', 'src/core/ext/client_config/lb_policy_factory.h', 'src/core/ext/client_config/lb_policy_registry.h', + 'src/core/ext/client_config/parse_address.h', 'src/core/ext/client_config/resolver.h', 'src/core/ext/client_config/resolver_factory.h', 'src/core/ext/client_config/resolver_registry.h', diff --git a/grpc.gemspec b/grpc.gemspec index b05f238c43e..463a2bbedce 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -287,6 +287,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/lb_policy.h ) s.files += %w( src/core/ext/client_config/lb_policy_factory.h ) s.files += %w( src/core/ext/client_config/lb_policy_registry.h ) + s.files += %w( src/core/ext/client_config/parse_address.h ) s.files += %w( src/core/ext/client_config/resolver.h ) s.files += %w( src/core/ext/client_config/resolver_factory.h ) s.files += %w( src/core/ext/client_config/resolver_registry.h ) @@ -442,6 +443,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/lb_policy.c ) s.files += %w( src/core/ext/client_config/lb_policy_factory.c ) s.files += %w( src/core/ext/client_config/lb_policy_registry.c ) + s.files += %w( src/core/ext/client_config/parse_address.c ) s.files += %w( src/core/ext/client_config/resolver.c ) s.files += %w( src/core/ext/client_config/resolver_factory.c ) s.files += %w( src/core/ext/client_config/resolver_registry.c ) diff --git a/package.json b/package.json index fea7c08338c..178b8e93b59 100644 --- a/package.json +++ b/package.json @@ -230,6 +230,7 @@ "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", @@ -385,6 +386,7 @@ "src/core/ext/client_config/lb_policy.c", "src/core/ext/client_config/lb_policy_factory.c", "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/parse_address.c", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_registry.c", diff --git a/package.xml b/package.xml index 2f4c6255394..ced62b63d66 100644 --- a/package.xml +++ b/package.xml @@ -291,6 +291,7 @@ + @@ -446,6 +447,7 @@ + diff --git a/src/core/ext/client_config/parse_address.c b/src/core/ext/client_config/parse_address.c new file mode 100644 index 00000000000..8b4abe24a61 --- /dev/null +++ b/src/core/ext/client_config/parse_address.c @@ -0,0 +1,137 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/ext/client_config/parse_address.h" + +#include +#include +#ifdef GPR_HAVE_UNIX_SOCKET +#include +#endif + +#include +#include +#include +#include + +#ifdef GPR_HAVE_UNIX_SOCKET +int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { + struct sockaddr_un *un = (struct sockaddr_un *)addr; + + un->sun_family = AF_UNIX; + strcpy(un->sun_path, uri->path); + *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; + + return 1; +} +#endif + +int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { + const char *host_port = uri->path; + char *host; + char *port; + int port_num; + int result = 0; + struct sockaddr_in *in = (struct sockaddr_in *)addr; + + if (*host_port == '/') ++host_port; + if (!gpr_split_host_port(host_port, &host, &port)) { + return 0; + } + + memset(in, 0, sizeof(*in)); + *len = sizeof(*in); + in->sin_family = AF_INET; + if (inet_pton(AF_INET, host, &in->sin_addr) == 0) { + gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host); + goto done; + } + + if (port != NULL) { + if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || + port_num > 65535) { + gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port); + goto done; + } + in->sin_port = htons((uint16_t)port_num); + } else { + gpr_log(GPR_ERROR, "no port given for ipv4 scheme"); + goto done; + } + + result = 1; +done: + gpr_free(host); + gpr_free(port); + return result; +} + +int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { + const char *host_port = uri->path; + char *host; + char *port; + int port_num; + int result = 0; + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr; + + if (*host_port == '/') ++host_port; + if (!gpr_split_host_port(host_port, &host, &port)) { + return 0; + } + + memset(in6, 0, sizeof(*in6)); + *len = sizeof(*in6); + in6->sin6_family = AF_INET6; + if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) { + gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host); + goto done; + } + + if (port != NULL) { + if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || + port_num > 65535) { + gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port); + goto done; + } + in6->sin6_port = htons((uint16_t)port_num); + } else { + gpr_log(GPR_ERROR, "no port given for ipv6 scheme"); + goto done; + } + + result = 1; +done: + gpr_free(host); + gpr_free(port); + return result; +} diff --git a/src/core/ext/client_config/parse_address.h b/src/core/ext/client_config/parse_address.h new file mode 100644 index 00000000000..74c86f4d938 --- /dev/null +++ b/src/core/ext/client_config/parse_address.h @@ -0,0 +1,56 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H +#define GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H + +#include + +#include "src/core/ext/client_config/uri_parser.h" +#include "src/core/lib/iomgr/sockaddr.h" + +#ifdef GPR_HAVE_UNIX_SOCKET +/** Populate \a addr and \a len from \a uri, whose path is expected to contain a + * unix socket path. Returns true upon success. */ +int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); +#endif + +/** Populate /a addr and \a len from \a uri, whose path is expected to contain a + * host:port pair. Returns true upon success. */ +int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); + +/** Populate /a addr and \a len from \a uri, whose path is expected to contain a + * host:port pair. Returns true upon success. */ +int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); + +#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H */ diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 1d54a86c39a..a4fa9acf224 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -40,11 +40,8 @@ #include #include -#ifdef GPR_HAVE_UNIX_SOCKET -#include -#endif - #include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_config/parse_address.h" #include "src/core/ext/client_config/resolver_registry.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" @@ -167,105 +164,12 @@ static char *ipv6_get_default_authority(grpc_resolver_factory *factory, } #ifdef GPR_HAVE_UNIX_SOCKET -static int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, - size_t *len) { - struct sockaddr_un *un = (struct sockaddr_un *)addr; - - un->sun_family = AF_UNIX; - strcpy(un->sun_path, uri->path); - *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; - - return 1; -} - char *unix_get_default_authority(grpc_resolver_factory *factory, grpc_uri *uri) { return gpr_strdup("localhost"); } #endif -static int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, - size_t *len) { - const char *host_port = uri->path; - char *host; - char *port; - int port_num; - int result = 0; - struct sockaddr_in *in = (struct sockaddr_in *)addr; - - if (*host_port == '/') ++host_port; - if (!gpr_split_host_port(host_port, &host, &port)) { - return 0; - } - - memset(in, 0, sizeof(*in)); - *len = sizeof(*in); - in->sin_family = AF_INET; - if (inet_pton(AF_INET, host, &in->sin_addr) == 0) { - gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host); - goto done; - } - - if (port != NULL) { - if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || - port_num > 65535) { - gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port); - goto done; - } - in->sin_port = htons((uint16_t)port_num); - } else { - gpr_log(GPR_ERROR, "no port given for ipv4 scheme"); - goto done; - } - - result = 1; -done: - gpr_free(host); - gpr_free(port); - return result; -} - -static int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, - size_t *len) { - const char *host_port = uri->path; - char *host; - char *port; - int port_num; - int result = 0; - struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr; - - if (*host_port == '/') ++host_port; - if (!gpr_split_host_port(host_port, &host, &port)) { - return 0; - } - - memset(in6, 0, sizeof(*in6)); - *len = sizeof(*in6); - in6->sin6_family = AF_INET6; - if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) { - gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host); - goto done; - } - - if (port != NULL) { - if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || - port_num > 65535) { - gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port); - goto done; - } - in6->sin6_port = htons((uint16_t)port_num); - } else { - gpr_log(GPR_ERROR, "no port given for ipv6 scheme"); - goto done; - } - - result = 1; -done: - gpr_free(host); - gpr_free(port); - return result; -} - static void do_nothing(void *ignored) {} static grpc_resolver *sockaddr_create( diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 1f7f2a196be..de25edbeb52 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -210,6 +210,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_config/lb_policy.c', 'src/core/ext/client_config/lb_policy_factory.c', 'src/core/ext/client_config/lb_policy_registry.c', + 'src/core/ext/client_config/parse_address.c', 'src/core/ext/client_config/resolver.c', 'src/core/ext/client_config/resolver_factory.c', 'src/core/ext/client_config/resolver_registry.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b131a55b592..4b3c8ab4bf6 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -903,6 +903,7 @@ src/core/ext/client_config/initial_connect_string.h \ src/core/ext/client_config/lb_policy.h \ src/core/ext/client_config/lb_policy_factory.h \ src/core/ext/client_config/lb_policy_registry.h \ +src/core/ext/client_config/parse_address.h \ src/core/ext/client_config/resolver.h \ src/core/ext/client_config/resolver_factory.h \ src/core/ext/client_config/resolver_registry.h \ @@ -1058,6 +1059,7 @@ src/core/ext/client_config/initial_connect_string.c \ src/core/ext/client_config/lb_policy.c \ src/core/ext/client_config/lb_policy_factory.c \ src/core/ext/client_config/lb_policy_registry.c \ +src/core/ext/client_config/parse_address.c \ src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_registry.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index b2f2e1eb524..e8f96933b3a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5935,6 +5935,7 @@ "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", @@ -5965,6 +5966,8 @@ "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.c", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.c", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index f695468254c..32540da4991 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -412,6 +412,7 @@ + @@ -705,6 +706,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 37bd1e6645b..09b94cffe9b 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -409,6 +409,9 @@ src\core\ext\client_config + + src\core\ext\client_config + src\core\ext\client_config @@ -926,6 +929,9 @@ src\core\ext\client_config + + src\core\ext\client_config + src\core\ext\client_config diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index a866ddc3336..fa571d9bf9d 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -388,6 +388,7 @@ + @@ -645,6 +646,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index bc4e06e9489..30dcb1ba1a3 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -355,6 +355,9 @@ src\core\ext\client_config + + src\core\ext\client_config + src\core\ext\client_config @@ -821,6 +824,9 @@ src\core\ext\client_config + + src\core\ext\client_config + src\core\ext\client_config From 85a46dd78080b4060e12330ef6d139f5e6287016 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 12 Apr 2016 01:50:51 +0200 Subject: [PATCH 10/93] Moving memory allocation tracking to its own file. --- Makefile | 2 + build.yaml | 2 + test/core/json/fuzzer.c | 41 +------ test/core/util/memory_counters.c | 104 ++++++++++++++++++ test/core/util/memory_counters.h | 48 ++++++++ tools/run_tests/sources_and_headers.json | 3 + .../grpc_test_util/grpc_test_util.vcxproj | 3 + .../grpc_test_util.vcxproj.filters | 6 + .../grpc_test_util_unsecure.vcxproj | 3 + .../grpc_test_util_unsecure.vcxproj.filters | 6 + 10 files changed, 183 insertions(+), 35 deletions(-) create mode 100644 test/core/util/memory_counters.c create mode 100644 test/core/util/memory_counters.h diff --git a/Makefile b/Makefile index 6b2b9eb2dee..ce02019f250 100644 --- a/Makefile +++ b/Makefile @@ -2695,6 +2695,7 @@ LIBGRPC_TEST_UTIL_SRC = \ test/core/end2end/fixtures/proxy.c \ test/core/iomgr/endpoint_tests.c \ test/core/util/grpc_profiler.c \ + test/core/util/memory_counters.c \ test/core/util/mock_endpoint.c \ test/core/util/parse_hexstring.c \ test/core/util/port_posix.c \ @@ -2743,6 +2744,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ test/core/end2end/fixtures/proxy.c \ test/core/iomgr/endpoint_tests.c \ test/core/util/grpc_profiler.c \ + test/core/util/memory_counters.c \ test/core/util/mock_endpoint.c \ test/core/util/parse_hexstring.c \ test/core/util/port_posix.c \ diff --git a/build.yaml b/build.yaml index cbbc3d22464..ce9bc286a29 100644 --- a/build.yaml +++ b/build.yaml @@ -567,6 +567,7 @@ filegroups: - test/core/end2end/fixtures/proxy.h - test/core/iomgr/endpoint_tests.h - test/core/util/grpc_profiler.h + - test/core/util/memory_counters.h - test/core/util/mock_endpoint.h - test/core/util/parse_hexstring.h - test/core/util/port.h @@ -577,6 +578,7 @@ filegroups: - test/core/end2end/fixtures/proxy.c - test/core/iomgr/endpoint_tests.c - test/core/util/grpc_profiler.c + - test/core/util/memory_counters.c - test/core/util/mock_endpoint.c - test/core/util/parse_hexstring.c - test/core/util/port_posix.c diff --git a/test/core/json/fuzzer.c b/test/core/json/fuzzer.c index 044db973ab1..e94b41ca999 100644 --- a/test/core/json/fuzzer.c +++ b/test/core/json/fuzzer.c @@ -38,42 +38,12 @@ #include #include "src/core/lib/json/json.h" - -static size_t g_total_size = 0; -static gpr_allocation_functions g_old_allocs; - -void *guard_malloc(size_t size) { - size_t *ptr; - g_total_size += size; - ptr = g_old_allocs.malloc_fn(size + sizeof(size)); - *ptr++ = size; - return ptr; -} - -void *guard_realloc(void *vptr, size_t size) { - size_t *ptr = vptr; - --ptr; - g_total_size -= *ptr; - ptr = g_old_allocs.realloc_fn(ptr, size + sizeof(size)); - g_total_size += size; - *ptr++ = size; - return ptr; -} - -void guard_free(void *vptr) { - size_t *ptr = vptr; - --ptr; - g_total_size -= *ptr; - g_old_allocs.free_fn(ptr); -} - -struct gpr_allocation_functions g_guard_allocs = {guard_malloc, guard_realloc, - guard_free}; +#include "test/core/util/memory_counters.h" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { char *s; - g_old_allocs = gpr_get_allocation_functions(); - gpr_set_allocation_functions(g_guard_allocs); + struct grpc_memory_counters counters; + grpc_memory_counters_init(); s = gpr_malloc(size); memcpy(s, data, size); grpc_json *x; @@ -81,7 +51,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_json_destroy(x); } gpr_free(s); - gpr_set_allocation_functions(g_old_allocs); - GPR_ASSERT(g_total_size == 0); + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); + GPR_ASSERT(counters.total_size_relative == 0); return 0; } diff --git a/test/core/util/memory_counters.c b/test/core/util/memory_counters.c new file mode 100644 index 00000000000..85e85237a2f --- /dev/null +++ b/test/core/util/memory_counters.c @@ -0,0 +1,104 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include +#include + +#include "test/core/util/memory_counters.h" + +static gpr_mu g_memory_mutex; +static struct grpc_memory_counters g_memory_counters; +static gpr_allocation_functions g_old_allocs; + +static void *guard_malloc(size_t size) { + size_t *ptr; + gpr_mu_lock(&g_memory_mutex); + g_memory_counters.total_size_absolute += size; + g_memory_counters.total_size_relative += size; + g_memory_counters.total_allocs_absolute++; + g_memory_counters.total_allocs_relative++; + gpr_mu_unlock(&g_memory_mutex); + ptr = g_old_allocs.malloc_fn(size + sizeof(size)); + *ptr++ = size; + return ptr; +} + +static void *guard_realloc(void *vptr, size_t size) { + size_t *ptr = vptr; + --ptr; + gpr_mu_lock(&g_memory_mutex); + g_memory_counters.total_size_absolute += size; + g_memory_counters.total_size_relative -= *ptr; + g_memory_counters.total_size_relative += size; + g_memory_counters.total_allocs_absolute++; + gpr_mu_unlock(&g_memory_mutex); + ptr = g_old_allocs.realloc_fn(ptr, size + sizeof(size)); + *ptr++ = size; + return ptr; +} + +static void guard_free(void *vptr) { + size_t *ptr = vptr; + --ptr; + gpr_mu_lock(&g_memory_mutex); + g_memory_counters.total_size_relative -= *ptr; + g_memory_counters.total_allocs_relative--; + gpr_mu_unlock(&g_memory_mutex); + g_old_allocs.free_fn(ptr); +} + +struct gpr_allocation_functions g_guard_allocs = {guard_malloc, guard_realloc, + guard_free}; + +void grpc_memory_counters_init() { + memset(&g_memory_counters, 0, sizeof(g_memory_counters)); + gpr_mu_init(&g_memory_mutex); + g_old_allocs = gpr_get_allocation_functions(); + gpr_set_allocation_functions(g_guard_allocs); +} + +void grpc_memory_counters_destroy() { + gpr_set_allocation_functions(g_old_allocs); + gpr_mu_destroy(&g_memory_mutex); +} + +struct grpc_memory_counters grpc_memory_counters_snapshot() { + struct grpc_memory_counters counters; + gpr_mu_lock(&g_memory_mutex); + counters = g_memory_counters; + gpr_mu_unlock(&g_memory_mutex); + return counters; +} diff --git a/test/core/util/memory_counters.h b/test/core/util/memory_counters.h new file mode 100644 index 00000000000..f3328165014 --- /dev/null +++ b/test/core/util/memory_counters.h @@ -0,0 +1,48 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_TEST_CORE_UTIL_MEMORY_COUNTERS_H +#define GRPC_TEST_CORE_UTIL_MEMORY_COUNTERS_H + +struct grpc_memory_counters { + size_t total_size_relative; + size_t total_size_absolute; + size_t total_allocs_relative; + size_t total_allocs_absolute; +}; + +void grpc_memory_counters_init(); +void grpc_memory_counters_destroy(); +struct grpc_memory_counters grpc_memory_counters_snapshot(); + +#endif diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index b2f2e1eb524..4a7a3c8c86d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6164,6 +6164,7 @@ "test/core/end2end/fixtures/proxy.h", "test/core/iomgr/endpoint_tests.h", "test/core/util/grpc_profiler.h", + "test/core/util/memory_counters.h", "test/core/util/mock_endpoint.h", "test/core/util/parse_hexstring.h", "test/core/util/port.h", @@ -6181,6 +6182,8 @@ "test/core/iomgr/endpoint_tests.h", "test/core/util/grpc_profiler.c", "test/core/util/grpc_profiler.h", + "test/core/util/memory_counters.c", + "test/core/util/memory_counters.h", "test/core/util/mock_endpoint.c", "test/core/util/mock_endpoint.h", "test/core/util/parse_hexstring.c", diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index cb033a5aa4a..d1f67ee44e3 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -153,6 +153,7 @@ + @@ -176,6 +177,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 81b2a810530..2fee6aab62b 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -25,6 +25,9 @@ test\core\util + + test\core\util + test\core\util @@ -63,6 +66,9 @@ test\core\util + + test\core\util + test\core\util diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj index bb93b2c6f35..336825353c7 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj @@ -151,6 +151,7 @@ + @@ -166,6 +167,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters index 4c4620a288d..5c2b961b676 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters @@ -13,6 +13,9 @@ test\core\util + + test\core\util + test\core\util @@ -45,6 +48,9 @@ test\core\util + + test\core\util + test\core\util From 839cdb51d5521b2792d04a351d864d9c35ab7511 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 12 Apr 2016 02:11:10 +0200 Subject: [PATCH 11/93] Adding memory checks for server fuzzer. --- test/core/end2end/fuzzers/server_fuzzer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index 393d33033ba..c82df42ebfc 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -35,6 +35,7 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/surface/server.h" +#include "test/core/util/memory_counters.h" #include "test/core/util/mock_endpoint.h" static const bool squelch = true; @@ -48,8 +49,10 @@ static void dont_log(gpr_log_func_args *args) {} int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_metadata_hash_seed(0); + struct grpc_memory_counters counters; if (squelch) gpr_set_log_function(dont_log); grpc_init(); + grpc_memory_counters_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write); @@ -116,6 +119,9 @@ done: } grpc_server_destroy(server); grpc_completion_queue_destroy(cq); + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); grpc_shutdown(); + GPR_ASSERT(counters.total_size_relative == 0); return 0; } From 2e1a5ac748ca21e87a012eb2c0d86ec273350389 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 12 Apr 2016 08:42:34 +0200 Subject: [PATCH 12/93] Initializing counters before grpc_init, and destroying them after grpc_shutdown. --- test/core/end2end/fuzzers/server_fuzzer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index c82df42ebfc..06dc5b8bf34 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -51,8 +51,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_metadata_hash_seed(0); struct grpc_memory_counters counters; if (squelch) gpr_set_log_function(dont_log); - grpc_init(); grpc_memory_counters_init(); + grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write); @@ -120,8 +120,8 @@ done: grpc_server_destroy(server); grpc_completion_queue_destroy(cq); counters = grpc_memory_counters_snapshot(); - grpc_memory_counters_destroy(); grpc_shutdown(); + grpc_memory_counters_destroy(); GPR_ASSERT(counters.total_size_relative == 0); return 0; } From 7c37a687eb884c78d119d4b7903f173cca351255 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 12 Apr 2016 19:08:00 +0200 Subject: [PATCH 13/93] Preventing crashes for known realloc behaviors. --- test/core/util/memory_counters.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/core/util/memory_counters.c b/test/core/util/memory_counters.c index 85e85237a2f..bebe94e5826 100644 --- a/test/core/util/memory_counters.c +++ b/test/core/util/memory_counters.c @@ -43,8 +43,13 @@ static gpr_mu g_memory_mutex; static struct grpc_memory_counters g_memory_counters; static gpr_allocation_functions g_old_allocs; +static void *guard_malloc(size_t size); +static void *guard_realloc(void *vptr, size_t size); +static void guard_free(void *vptr); + static void *guard_malloc(size_t size) { size_t *ptr; + if (!size) return NULL; gpr_mu_lock(&g_memory_mutex); g_memory_counters.total_size_absolute += size; g_memory_counters.total_size_relative += size; @@ -58,6 +63,13 @@ static void *guard_malloc(size_t size) { static void *guard_realloc(void *vptr, size_t size) { size_t *ptr = vptr; + if (vptr == NULL) { + return guard_malloc(size); + } + if (size == 0) { + guard_free(vptr); + return NULL; + } --ptr; gpr_mu_lock(&g_memory_mutex); g_memory_counters.total_size_absolute += size; @@ -72,6 +84,7 @@ static void *guard_realloc(void *vptr, size_t size) { static void guard_free(void *vptr) { size_t *ptr = vptr; + if (!vptr) return; --ptr; gpr_mu_lock(&g_memory_mutex); g_memory_counters.total_size_relative -= *ptr; From 8079afa46ec457920de3790378984aa168911ce6 Mon Sep 17 00:00:00 2001 From: vjpai Date: Tue, 12 Apr 2016 10:22:05 -0700 Subject: [PATCH 14/93] New CQ for each client call --- src/ruby/lib/grpc/generic/client_stub.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb index 98e83a83964..a6bb92d72c8 100644 --- a/src/ruby/lib/grpc/generic/client_stub.rb +++ b/src/ruby/lib/grpc/generic/client_stub.rb @@ -85,7 +85,8 @@ module GRPC # when present, this is the default timeout used for calls # # @param host [String] the host the stub connects to - # @param q [Core::CompletionQueue] used to wait for events + # @param q [Core::CompletionQueue] used to wait for events - now deprecated + # since each new active call gets its own separately # @param creds [Core::ChannelCredentials|Symbol] the channel credentials, or # :this_channel_is_insecure # @param channel_override [Core::Channel] a pre-created channel @@ -97,7 +98,6 @@ module GRPC propagate_mask: nil, **kw) fail(TypeError, '!CompletionQueue') unless q.is_a?(Core::CompletionQueue) - @queue = q @ch = ClientStub.setup_channel(channel_override, host, creds, **kw) alt_host = kw[Core::Channel::SSL_TARGET] @host = alt_host.nil? ? host : alt_host @@ -458,14 +458,17 @@ module GRPC if deadline.nil? deadline = from_relative_time(timeout.nil? ? @timeout : timeout) end - call = @ch.create_call(@queue, + # Provide each new client call with its own completion queue + call_queue = Core::CompletionQueue.new + call = @ch.create_call(call_queue, parent, # parent call @propagate_mask, # propagation options method, nil, # host use nil, deadline) call.set_credentials! credentials unless credentials.nil? - ActiveCall.new(call, @queue, marshal, unmarshal, deadline, started: false) + ActiveCall.new(call, call_queue, marshal, unmarshal, deadline, + started: false) end end end From 5b304753965d4179f374b5cded063e79d3d17b0a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 12 Apr 2016 19:29:22 +0200 Subject: [PATCH 15/93] Fixing a couple of issues within core. --- src/core/lib/channel/channel_args.c | 3 ++- src/core/lib/surface/server.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 28d2d78d00f..97c40e84810 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -74,7 +74,8 @@ grpc_channel_args *grpc_channel_args_copy_and_add(const grpc_channel_args *src, return dst; } dst->num_args = src_num_args + num_to_add; - dst->args = gpr_malloc(sizeof(grpc_arg) * dst->num_args); + dst->args = + dst->num_args ? gpr_malloc(sizeof(grpc_arg) * dst->num_args) : NULL; for (i = 0; i < src_num_args; i++) { dst->args[i] = copy_arg(&src->args[i]); } diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index ad8ee8c7a99..e3b54ac012e 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -251,7 +251,9 @@ static void channel_broadcaster_init(grpc_server *s, channel_broadcaster *cb) { count++; } cb->num_channels = count; - cb->channels = gpr_malloc(sizeof(*cb->channels) * cb->num_channels); + cb->channels = cb->num_channels + ? gpr_malloc(sizeof(*cb->channels) * cb->num_channels) + : NULL; count = 0; for (c = s->root_channel_data.next; c != &s->root_channel_data; c = c->next) { cb->channels[count++] = c->channel; From 14b5dfeafb1f5f351ea3e114131afd7c63adc4b9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 12 Apr 2016 19:53:07 +0200 Subject: [PATCH 16/93] Properly grabbing counters at the proper time. --- test/core/end2end/fuzzers/server_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index 06dc5b8bf34..40273711ab7 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -119,8 +119,8 @@ done: } grpc_server_destroy(server); grpc_completion_queue_destroy(cq); - counters = grpc_memory_counters_snapshot(); grpc_shutdown(); + counters = grpc_memory_counters_snapshot(); grpc_memory_counters_destroy(); GPR_ASSERT(counters.total_size_relative == 0); return 0; From a592ffa7451e67d453e42e4f79bc5e7cb498e2b3 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 12 Apr 2016 19:56:57 +0200 Subject: [PATCH 17/93] Memory checking the client fuzzer. --- test/core/end2end/fuzzers/client_fuzzer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index 4e22e268f04..afcf7638f72 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -36,6 +36,7 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/surface/channel.h" +#include "test/core/util/memory_counters.h" #include "test/core/util/mock_endpoint.h" static const bool squelch = true; @@ -48,7 +49,9 @@ static void dont_log(gpr_log_func_args *args) {} int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_metadata_hash_seed(0); + struct grpc_memory_counters counters; if (squelch) gpr_set_log_function(dont_log); + grpc_memory_counters_init(); grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -150,5 +153,8 @@ done: grpc_byte_buffer_destroy(response_payload_recv); } grpc_shutdown(); + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); + GPR_ASSERT(counters.total_size_relative == 0); return 0; } From 546c2763a8170adb9bf56c8d0335a4fadfa08ff3 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 12 Apr 2016 14:38:51 -0700 Subject: [PATCH 18/93] List facter as a dependence, used by QPS test --- grpc.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/grpc.gemspec b/grpc.gemspec index b05f238c43e..b8cfc4e6c4e 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -35,6 +35,7 @@ Gem::Specification.new do |s| s.add_dependency 'googleauth', '~> 0.5.1' s.add_development_dependency 'bundler', '~> 1.9' + s.add_development_dependency 'facter', '~> 2.4' s.add_development_dependency 'logging', '~> 2.0' s.add_development_dependency 'simplecov', '~> 0.9' s.add_development_dependency 'rake', '~> 10.4' From c6e24602c6c6f98c07eee874e0b39988d0766848 Mon Sep 17 00:00:00 2001 From: vjpai Date: Tue, 12 Apr 2016 15:10:44 -0700 Subject: [PATCH 19/93] Put facter development dependence in template as well. --- templates/grpc.gemspec.template | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index 701e1c7485b..6f8d1fb9e6c 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -37,6 +37,7 @@ s.add_dependency 'googleauth', '~> 0.5.1' s.add_development_dependency 'bundler', '~> 1.9' + s.add_development_dependency 'facter', '~> 2.4' s.add_development_dependency 'logging', '~> 2.0' s.add_development_dependency 'simplecov', '~> 0.9' s.add_development_dependency 'rake', '~> 10.4' From b71bf8eb214894d11db77eae78a9abb8c4cebf44 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 13 Apr 2016 01:30:13 +0200 Subject: [PATCH 20/93] Revert "Fixing a couple of issues within core." This reverts commit 5b304753965d4179f374b5cded063e79d3d17b0a. --- src/core/lib/channel/channel_args.c | 3 +-- src/core/lib/surface/server.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 97c40e84810..28d2d78d00f 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -74,8 +74,7 @@ grpc_channel_args *grpc_channel_args_copy_and_add(const grpc_channel_args *src, return dst; } dst->num_args = src_num_args + num_to_add; - dst->args = - dst->num_args ? gpr_malloc(sizeof(grpc_arg) * dst->num_args) : NULL; + dst->args = gpr_malloc(sizeof(grpc_arg) * dst->num_args); for (i = 0; i < src_num_args; i++) { dst->args[i] = copy_arg(&src->args[i]); } diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index e3b54ac012e..ad8ee8c7a99 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -251,9 +251,7 @@ static void channel_broadcaster_init(grpc_server *s, channel_broadcaster *cb) { count++; } cb->num_channels = count; - cb->channels = cb->num_channels - ? gpr_malloc(sizeof(*cb->channels) * cb->num_channels) - : NULL; + cb->channels = gpr_malloc(sizeof(*cb->channels) * cb->num_channels); count = 0; for (c = s->root_channel_data.next; c != &s->root_channel_data; c = c->next) { cb->channels[count++] = c->channel; From 23e4baefc2669c271f78402f5e9523d9f60a4cfe Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 13 Apr 2016 01:35:42 +0200 Subject: [PATCH 21/93] Enforcing undefined behavior of malloc. --- src/core/lib/support/alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/lib/support/alloc.c b/src/core/lib/support/alloc.c index 020917f79c8..618c3f6acd8 100644 --- a/src/core/lib/support/alloc.c +++ b/src/core/lib/support/alloc.c @@ -53,6 +53,7 @@ void gpr_set_allocation_functions(gpr_allocation_functions functions) { void *gpr_malloc(size_t size) { void *p; + if (size == 0) return NULL; GPR_TIMER_BEGIN("gpr_malloc", 0); p = g_alloc_functions.malloc_fn(size); if (!p) { @@ -69,6 +70,7 @@ void gpr_free(void *p) { } void *gpr_realloc(void *p, size_t size) { + if ((size == 0) && (p == NULL)) return NULL; GPR_TIMER_BEGIN("gpr_realloc", 0); p = g_alloc_functions.realloc_fn(p, size); if (!p) { From 04f812b4e6f50f4ca36a87594332e4e02a5d3cf9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 13 Apr 2016 20:27:51 +0200 Subject: [PATCH 22/93] Adding actual servers to reply to messages. --- .../surface/concurrent_connectivity_test.c | 149 +++++++++++++++++- 1 file changed, 142 insertions(+), 7 deletions(-) diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 96761b05023..1753623fcdf 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -31,12 +31,21 @@ * */ +#include #include #include #include #include +#include #include + +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/tcp_server.h" + +#include "test/core/util/port.h" #include "test/core/util/test_config.h" #define NUM_THREADS 100 @@ -45,10 +54,13 @@ #define DELAY_MILLIS 10 #define POLL_MILLIS 3000 -void create_loop_destroy(void* unused) { +static void *tag(int n) { return (void *)(uintptr_t)n; } +static int detag(void *p) { return (int)(uintptr_t)p; } + +void create_loop_destroy(void *addr) { for (int i = 0; i < NUM_OUTER_LOOPS; ++i) { - grpc_completion_queue* cq = grpc_completion_queue_create(NULL); - grpc_channel* chan = grpc_insecure_channel_create("localhost", NULL, NULL); + grpc_completion_queue *cq = grpc_completion_queue_create(NULL); + grpc_channel *chan = grpc_insecure_channel_create((char*)addr, NULL, NULL); for (int j = 0; j < NUM_INNER_LOOPS; ++j) { gpr_timespec later_time = GRPC_TIMEOUT_MILLIS_TO_DEADLINE(DELAY_MILLIS); @@ -64,18 +76,141 @@ void create_loop_destroy(void* unused) { } } -int main(int argc, char** argv) { +struct server_thread_args { + char *addr; + grpc_server *server; + grpc_completion_queue *cq; + grpc_pollset *pollset; + gpr_mu *mu; + gpr_event ready; + gpr_atm stop; +}; + +void server_thread(void *vargs) { + struct server_thread_args *args = (struct server_thread_args*)vargs; + grpc_event ev; + gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); + ev = grpc_completion_queue_next(args->cq, deadline, NULL); + GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + GPR_ASSERT(detag(ev.tag) == 0xd1e); +} + +static void on_connect(grpc_exec_ctx *exec_ctx, void *vargs, grpc_endpoint *tcp, + grpc_tcp_server_acceptor *acceptor) { + struct server_thread_args *args = (struct server_thread_args*)vargs; + (void)acceptor; + grpc_endpoint_shutdown(exec_ctx, tcp); + grpc_endpoint_destroy(exec_ctx, tcp); + grpc_pollset_kick(args->pollset, NULL); +} + +void bad_server_thread(void *vargs) { + struct server_thread_args *args = (struct server_thread_args*)vargs; + + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + struct sockaddr_storage addr; + socklen_t addr_len = sizeof(addr); + int port; + grpc_tcp_server *s = grpc_tcp_server_create(NULL); + memset(&addr, 0, sizeof(addr)); + addr.ss_family = AF_INET; + port = grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, addr_len); + GPR_ASSERT(port > 0); + gpr_asprintf(&args->addr, "localhost:%d", port); + + grpc_tcp_server_start(&exec_ctx, s, &args->pollset, 1, on_connect, args); + gpr_event_set(&args->ready, (void *)1); + + gpr_mu_lock(args->mu); + while (gpr_atm_acq_load(&args->stop) == 0) { + gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); + gpr_timespec deadline = gpr_time_add(now, gpr_time_from_millis(100, GPR_TIMESPAN)); + + grpc_pollset_worker *worker = NULL; + grpc_pollset_work(&exec_ctx, args->pollset, &worker, now, deadline); + gpr_mu_unlock(args->mu); + grpc_exec_ctx_finish(&exec_ctx); + gpr_mu_lock(args->mu); + } + gpr_mu_unlock(args->mu); + + grpc_tcp_server_unref(&exec_ctx, s); + + grpc_exec_ctx_finish(&exec_ctx); + + gpr_free(args->addr); +} + +int main(int argc, char **argv) { + struct server_thread_args args; + memset(&args, 0, sizeof(args)); + grpc_test_init(argc, argv); grpc_init(); + gpr_thd_id threads[NUM_THREADS]; + gpr_thd_id server; + + char *localhost = gpr_strdup("localhost:54321"); + gpr_thd_options options = gpr_thd_options_default(); + gpr_thd_options_set_joinable(&options); + + + /* First round, no server */ + gpr_log(GPR_DEBUG, "Wave 1"); for (size_t i = 0; i < NUM_THREADS; ++i) { - gpr_thd_options options = gpr_thd_options_default(); - gpr_thd_options_set_joinable(&options); - gpr_thd_new(&threads[i], create_loop_destroy, NULL, &options); + gpr_thd_new(&threads[i], create_loop_destroy, localhost, &options); } for (size_t i = 0; i < NUM_THREADS; ++i) { gpr_thd_join(threads[i]); } + gpr_free(localhost); + + + /* Second round, actual grpc server */ + gpr_log(GPR_DEBUG, "Wave 2"); + int port = grpc_pick_unused_port_or_die(); + gpr_asprintf(&args.addr, "localhost:%d", port); + args.server = grpc_server_create(NULL, NULL); + grpc_server_add_insecure_http2_port(args.server, args.addr); + args.cq = grpc_completion_queue_create(NULL); + grpc_server_register_completion_queue(args.server, args.cq, NULL); + grpc_server_start(args.server); + gpr_thd_new(&server, server_thread, &args, &options); + + for (size_t i = 0; i < NUM_THREADS; ++i) { + gpr_thd_new(&threads[i], create_loop_destroy, args.addr, &options); + } + for (size_t i = 0; i < NUM_THREADS; ++i) { + gpr_thd_join(threads[i]); + } + grpc_server_shutdown_and_notify(args.server, args.cq, tag(0xd1e)); + + gpr_thd_join(server); + grpc_server_destroy(args.server); + grpc_completion_queue_destroy(args.cq); + gpr_free(args.addr); + + + /* Third round, bogus tcp server */ + gpr_log(GPR_DEBUG, "Wave 3"); + args.pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(args.pollset, &args.mu); + gpr_thd_new(&server, bad_server_thread, &args, &options); + gpr_event_wait(&args.ready, gpr_inf_future(GPR_CLOCK_MONOTONIC)); + + for (size_t i = 0; i < NUM_THREADS; ++i) { + gpr_thd_new(&threads[i], create_loop_destroy, args.addr, &options); + } + for (size_t i = 0; i < NUM_THREADS; ++i) { + gpr_thd_join(threads[i]); + } + + gpr_atm_rel_store(&args.stop, 1); + gpr_thd_join(server); + grpc_pollset_destroy(args.pollset); + gpr_free(args.pollset); + grpc_shutdown(); return 0; } From 90f03b5d9cf41d3465e2a002476f3d477615ff91 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 14 Apr 2016 06:17:58 +0200 Subject: [PATCH 23/93] Code formatting. --- test/core/surface/concurrent_connectivity_test.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 1753623fcdf..2d060444f70 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -60,7 +60,7 @@ static int detag(void *p) { return (int)(uintptr_t)p; } void create_loop_destroy(void *addr) { for (int i = 0; i < NUM_OUTER_LOOPS; ++i) { grpc_completion_queue *cq = grpc_completion_queue_create(NULL); - grpc_channel *chan = grpc_insecure_channel_create((char*)addr, NULL, NULL); + grpc_channel *chan = grpc_insecure_channel_create((char *)addr, NULL, NULL); for (int j = 0; j < NUM_INNER_LOOPS; ++j) { gpr_timespec later_time = GRPC_TIMEOUT_MILLIS_TO_DEADLINE(DELAY_MILLIS); @@ -87,7 +87,7 @@ struct server_thread_args { }; void server_thread(void *vargs) { - struct server_thread_args *args = (struct server_thread_args*)vargs; + struct server_thread_args *args = (struct server_thread_args *)vargs; grpc_event ev; gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); ev = grpc_completion_queue_next(args->cq, deadline, NULL); @@ -97,7 +97,7 @@ void server_thread(void *vargs) { static void on_connect(grpc_exec_ctx *exec_ctx, void *vargs, grpc_endpoint *tcp, grpc_tcp_server_acceptor *acceptor) { - struct server_thread_args *args = (struct server_thread_args*)vargs; + struct server_thread_args *args = (struct server_thread_args *)vargs; (void)acceptor; grpc_endpoint_shutdown(exec_ctx, tcp); grpc_endpoint_destroy(exec_ctx, tcp); @@ -105,7 +105,7 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *vargs, grpc_endpoint *tcp, } void bad_server_thread(void *vargs) { - struct server_thread_args *args = (struct server_thread_args*)vargs; + struct server_thread_args *args = (struct server_thread_args *)vargs; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; struct sockaddr_storage addr; @@ -124,7 +124,8 @@ void bad_server_thread(void *vargs) { gpr_mu_lock(args->mu); while (gpr_atm_acq_load(&args->stop) == 0) { gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); - gpr_timespec deadline = gpr_time_add(now, gpr_time_from_millis(100, GPR_TIMESPAN)); + gpr_timespec deadline = + gpr_time_add(now, gpr_time_from_millis(100, GPR_TIMESPAN)); grpc_pollset_worker *worker = NULL; grpc_pollset_work(&exec_ctx, args->pollset, &worker, now, deadline); @@ -155,7 +156,6 @@ int main(int argc, char **argv) { gpr_thd_options options = gpr_thd_options_default(); gpr_thd_options_set_joinable(&options); - /* First round, no server */ gpr_log(GPR_DEBUG, "Wave 1"); for (size_t i = 0; i < NUM_THREADS; ++i) { @@ -166,7 +166,6 @@ int main(int argc, char **argv) { } gpr_free(localhost); - /* Second round, actual grpc server */ gpr_log(GPR_DEBUG, "Wave 2"); int port = grpc_pick_unused_port_or_die(); @@ -191,7 +190,6 @@ int main(int argc, char **argv) { grpc_completion_queue_destroy(args.cq); gpr_free(args.addr); - /* Third round, bogus tcp server */ gpr_log(GPR_DEBUG, "Wave 3"); args.pollset = gpr_malloc(grpc_pollset_size()); From 0d17ee3acfb7972ffe9ee9334836e1ddd4d0abd1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 14 Apr 2016 09:30:32 -0700 Subject: [PATCH 24/93] Fix bug causing all fuzzers to run forever --- templates/tools/fuzzer/runners.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/tools/fuzzer/runners.template b/templates/tools/fuzzer/runners.template index 72d0b363f22..4b8d4f3c68f 100644 --- a/templates/tools/fuzzer/runners.template +++ b/templates/tools/fuzzer/runners.template @@ -39,7 +39,7 @@ template: | if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] From 69f1f4330b19404ff0939696868ecff736a72915 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 14 Apr 2016 12:50:08 -0700 Subject: [PATCH 25/93] Fix fuzzing sanity --- tools/fuzzer/runners/client_fuzzer.sh | 2 +- tools/fuzzer/runners/hpack_parser_fuzzer_test.sh | 2 +- tools/fuzzer/runners/http_fuzzer_test.sh | 2 +- tools/fuzzer/runners/json_fuzzer_test.sh | 2 +- tools/fuzzer/runners/nanopb_fuzzer_response_test.sh | 2 +- tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh | 2 +- tools/fuzzer/runners/server_fuzzer.sh | 2 +- tools/fuzzer/runners/uri_fuzzer_test.sh | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/fuzzer/runners/client_fuzzer.sh b/tools/fuzzer/runners/client_fuzzer.sh index 239d552c57d..97d4e60d908 100644 --- a/tools/fuzzer/runners/client_fuzzer.sh +++ b/tools/fuzzer/runners/client_fuzzer.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh index e69b4b4dfe2..c6f70a623dc 100644 --- a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh +++ b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=512" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh index c190ba40b60..bb54a238145 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh index 9fc6271976b..e11e25dc097 100644 --- a/tools/fuzzer/runners/json_fuzzer_test.sh +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=512" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh b/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh index bbcebf11cce..97359277ce2 100644 --- a/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh +++ b/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh b/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh index e9099bac046..2dfaa2372fc 100644 --- a/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh +++ b/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/server_fuzzer.sh b/tools/fuzzer/runners/server_fuzzer.sh index 28ca8b32719..fc0567f670b 100644 --- a/tools/fuzzer/runners/server_fuzzer.sh +++ b/tools/fuzzer/runners/server_fuzzer.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index 7dac54ec518..5f33e734654 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] From 8c839e839b3624c9953b11b9a59b04276f40a0b9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 12 Apr 2016 15:12:08 -0700 Subject: [PATCH 26/93] check for histogramParams presence --- src/csharp/Grpc.IntegrationTesting/ClientRunners.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs index f954ca5f34c..b4572756f24 100644 --- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs @@ -129,6 +129,7 @@ namespace Grpc.IntegrationTesting public ClientRunnerImpl(List channels, ClientType clientType, RpcType rpcType, int outstandingRpcsPerChannel, LoadParams loadParams, PayloadConfig payloadConfig, HistogramParams histogramParams) { GrpcPreconditions.CheckArgument(outstandingRpcsPerChannel > 0, "outstandingRpcsPerChannel"); + GrpcPreconditions.CheckNotNull(histogramParams, "histogramParams"); this.channels = new List(channels); this.clientType = clientType; this.rpcType = rpcType; From c578e44ab9b54f86df21abf9ffd79d5c37a2e0da Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 12 Apr 2016 16:09:35 -0700 Subject: [PATCH 27/93] add some console messages to node qps worker --- src/node/performance/worker.js | 2 ++ src/node/performance/worker_service_impl.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/node/performance/worker.js b/src/node/performance/worker.js index 98577bdbc97..7ef9b84fe76 100644 --- a/src/node/performance/worker.js +++ b/src/node/performance/worker.js @@ -33,6 +33,7 @@ 'use strict'; +var console = require('console'); var worker_service_impl = require('./worker_service_impl'); var grpc = require('../../../'); @@ -48,6 +49,7 @@ function runServer(port) { var address = '0.0.0.0:' + port; server.bind(address, server_creds); server.start(); + console.log('running QPS worker on %s', address); return server; } diff --git a/src/node/performance/worker_service_impl.js b/src/node/performance/worker_service_impl.js index 17458e4b933..4b5cb8f9c21 100644 --- a/src/node/performance/worker_service_impl.js +++ b/src/node/performance/worker_service_impl.js @@ -34,6 +34,7 @@ 'use strict'; var os = require('os'); +var console = require('console'); var BenchmarkClient = require('./benchmark_client'); var BenchmarkServer = require('./benchmark_server'); @@ -49,6 +50,7 @@ exports.runClient = function runClient(call) { switch (request.argtype) { case 'setup': var setup = request.setup; + console.log('ClientConfig %j', setup); client = new BenchmarkClient(setup.server_targets, setup.client_channels, setup.histogram_params, @@ -118,6 +120,7 @@ exports.runServer = function runServer(call) { var stats; switch (request.argtype) { case 'setup': + console.log('ServerConfig %j', request.setup); server = new BenchmarkServer('[::]', request.setup.port, request.setup.security_params); server.start(); From 4fec48b831694f856adddabe924cf8b3bfcdf7d5 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 12 Apr 2016 15:12:54 -0700 Subject: [PATCH 28/93] tiny fixes to scenario_config --- .../run_tests/performance/scenario_config.py | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 7a82d257e40..e8f2fffaa25 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -33,6 +33,11 @@ SINGLE_MACHINE_CORES=8 WARMUP_SECONDS=5 BENCHMARK_SECONDS=30 +HISTOGRAM_PARAMS = { + 'resolution': 0.01, + 'max_possible': 60e9, +} + EMPTY_GENERIC_PAYLOAD = { 'bytebuf_params': { 'req_size': 0, @@ -83,7 +88,7 @@ class CXXLanguage: secargs = None yield { - 'name': 'generic_async_streaming_ping_pong_%s' + 'name': 'cpp_generic_async_streaming_ping_pong_%s' % secstr, 'num_servers': 1, 'num_clients': 1, @@ -98,6 +103,7 @@ class CXXLanguage: 'closed_loop': {} }, 'payload_config': EMPTY_GENERIC_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { 'server_type': 'ASYNC_GENERIC_SERVER', @@ -110,7 +116,7 @@ class CXXLanguage: 'benchmark_seconds': BENCHMARK_SECONDS } yield { - 'name': 'generic_async_streaming_qps_unconstrained_%s' + 'name': 'cpp_generic_async_streaming_qps_unconstrained_%s' % secstr, 'num_servers': 1, 'num_clients': 0, @@ -125,6 +131,7 @@ class CXXLanguage: 'closed_loop': {} }, 'payload_config': EMPTY_GENERIC_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { 'server_type': 'ASYNC_GENERIC_SERVER', @@ -137,7 +144,7 @@ class CXXLanguage: 'benchmark_seconds': BENCHMARK_SECONDS } yield { - 'name': 'generic_async_streaming_qps_one_server_core_%s' + 'name': 'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr, 'num_servers': 1, 'num_clients': 0, @@ -152,6 +159,7 @@ class CXXLanguage: 'closed_loop': {} }, 'payload_config': EMPTY_GENERIC_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { 'server_type': 'ASYNC_GENERIC_SERVER', @@ -164,7 +172,7 @@ class CXXLanguage: 'benchmark_seconds': BENCHMARK_SECONDS } yield { - 'name': 'protobuf_async_qps_unconstrained_%s' + 'name': 'cpp_generic_async_qps_unconstrained_%s' % secstr, 'num_servers': 1, 'num_clients': 0, @@ -179,6 +187,7 @@ class CXXLanguage: 'closed_loop': {} }, 'payload_config': EMPTY_GENERIC_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { 'server_type': 'ASYNC_GENERIC_SERVER', @@ -191,7 +200,7 @@ class CXXLanguage: 'benchmark_seconds': BENCHMARK_SECONDS } yield { - 'name': 'single_channel_throughput_%s' + 'name': 'cpp_single_channel_throughput_%s' % secstr, 'num_servers': 1, 'num_clients': 1, @@ -206,6 +215,7 @@ class CXXLanguage: 'closed_loop': {} }, 'payload_config': BIG_GENERIC_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { 'server_type': 'ASYNC_GENERIC_SERVER', @@ -218,7 +228,7 @@ class CXXLanguage: 'benchmark_seconds': BENCHMARK_SECONDS } yield { - 'name': 'protobuf_async_ping_pong_%s' + 'name': 'cpp_protobuf_async_ping_pong_%s' % secstr, 'num_servers': 1, 'num_clients': 1, @@ -233,13 +243,13 @@ class CXXLanguage: 'closed_loop': {} }, 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { - 'server_type': 'ASYNC_GENERIC_SERVER', + 'server_type': 'ASYNC_SERVER', 'security_params': secargs, 'core_limit': SINGLE_MACHINE_CORES/2, 'async_server_threads': 1, - 'payload_config': EMPTY_PROTO_PAYLOAD, }, 'warmup_seconds': WARMUP_SECONDS, 'benchmark_seconds': BENCHMARK_SECONDS @@ -262,8 +272,9 @@ class CSharpLanguage: def scenarios(self): # TODO(jtattermusch): add more scenarios + secargs = None yield { - 'name': 'csharp_async_generic_streaming_ping_pong', + 'name': 'csharp_generic_async_streaming_ping_pong', 'num_servers': 1, 'num_clients': 1, 'client_config': { @@ -277,11 +288,12 @@ class CSharpLanguage: 'closed_loop': {} }, 'payload_config': EMPTY_GENERIC_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { 'server_type': 'ASYNC_GENERIC_SERVER', 'security_params': secargs, - 'core_limit': SINGLE_MACHINE_CORES/2, + 'core_limit': 0, 'async_server_threads': 1, 'payload_config': EMPTY_GENERIC_PAYLOAD, }, @@ -307,8 +319,9 @@ class NodeLanguage: def scenarios(self): # TODO(jtattermusch): add more scenarios + secargs = None yield { - 'name': 'node_sync_unary_ping_pong_protobuf', + 'name': 'node_protobuf_unary_ping_pong', 'num_servers': 1, 'num_clients': 1, 'client_config': { @@ -317,18 +330,18 @@ class NodeLanguage: 'outstanding_rpcs_per_channel': 1, 'client_channels': 1, 'async_client_threads': 1, - 'rpc_type': 'STREAMING', + 'rpc_type': 'UNARY', 'load_params': { 'closed_loop': {} }, 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { - 'server_type': 'ASYNC_GENERIC_SERVER', + 'server_type': 'ASYNC_SERVER', 'security_params': secargs, - 'core_limit': SINGLE_MACHINE_CORES/2, + 'core_limit': 0, 'async_server_threads': 1, - 'payload_config': EMPTY_PROTO_PAYLOAD, }, 'warmup_seconds': WARMUP_SECONDS, 'benchmark_seconds': BENCHMARK_SECONDS From 38becc28b0edb184f2a9a932733e301dd0e0d776 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 08:00:35 -0700 Subject: [PATCH 29/93] added support for regex selection of scenarios --- tools/run_tests/run_performance_tests.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index 51ed35f7608..477d32213aa 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -37,6 +37,7 @@ import json import multiprocessing import os import pipes +import re import subprocess import sys import tempfile @@ -82,6 +83,8 @@ def create_qpsworker_job(language, shortname=None, else: host_and_port='localhost:%s' % port + # TODO(jtattermusch): with some care, we can calculate the right timeout + # of a worker from the sum of warmup + benchmark times for all the scenarios jobspec = jobset.JobSpec( cmdline=cmdline, shortname=shortname, @@ -221,15 +224,16 @@ def start_qpsworkers(languages, worker_hosts): for worker_idx, worker in enumerate(workers)] -def create_scenarios(languages, workers_by_lang, remote_host=None): +def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*'): """Create jobspecs for scenarios to run.""" scenarios = [] for language in languages: for scenario_json in language.scenarios(): - scenario = create_scenario_jobspec(scenario_json, - workers_by_lang[str(language)], - remote_host=remote_host) - scenarios.append(scenario) + if re.search(args.regex, scenario_json['name']): + scenario = create_scenario_jobspec(scenario_json, + workers_by_lang[str(language)], + remote_host=remote_host) + scenarios.append(scenario) # the very last scenario requests shutting down the workers. all_workers = [worker @@ -268,6 +272,8 @@ argp.add_argument('--remote_worker_host', nargs='+', default=[], help='Worker hosts where to start QPS workers.') +argp.add_argument('-r', '--regex', default='.*', type=str, + help='Regex to select scenarios to run.') args = argp.parse_args() @@ -295,6 +301,9 @@ build_on_remote_hosts(remote_hosts, languages=[str(l) for l in languages], build qpsworker_jobs = start_qpsworkers(languages, args.remote_worker_host) +# TODO(jtattermusch): see https://github.com/grpc/grpc/issues/6174 +time.sleep(5) + # get list of worker addresses for each language. worker_addresses = dict([(str(language), []) for language in languages]) for job in qpsworker_jobs: @@ -303,7 +312,8 @@ for job in qpsworker_jobs: try: scenarios = create_scenarios(languages, workers_by_lang=worker_addresses, - remote_host=args.remote_driver_host) + remote_host=args.remote_driver_host, + regex=args.regex) if not scenarios: raise Exception('No scenarios to run') From ee9032c507aca8740e135a8cd6350a6f2a375153 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 08:35:51 -0700 Subject: [PATCH 30/93] add support for cross-language tests --- tools/run_tests/run_performance_tests.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index 477d32213aa..b3729acd9f5 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -42,6 +42,7 @@ import subprocess import sys import tempfile import time +import traceback import uuid import performance.scenario_config as scenario_config @@ -230,8 +231,22 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*'): for language in languages: for scenario_json in language.scenarios(): if re.search(args.regex, scenario_json['name']): + workers = workers_by_lang[str(language)] + # 'SERVER_LANGUAGE' is an indicator for this script to pick + # a server in different language. It doesn't belong to the Scenario + # schema, so we also need to remove it. + custom_server_lang = scenario_json.pop('SERVER_LANGUAGE', None) + if custom_server_lang: + if not workers_by_lang.get(custom_server_lang, []): + print 'Warning: Skipping scenario %s as' % scenario_json['name'] + print('SERVER_LANGUAGE is set to %s yet the language has ' + 'not been selected with -l' % custom_server_lang) + continue + for idx in range(0, scenario_json['num_servers']): + # replace first X workers by workers of a different language + workers[idx] = workers_by_lang[custom_server_lang][idx] scenario = create_scenario_jobspec(scenario_json, - workers_by_lang[str(language)], + workers, remote_host=remote_host) scenarios.append(scenario) @@ -328,5 +343,7 @@ try: jobset.message('FAILED', 'Some of the scenarios failed.', do_newline=True) sys.exit(1) +except: + traceback.print_exc() finally: finish_qps_workers(qpsworker_jobs) From d61c252f8e14fa6a3dc8c9d77064ad7394e0c87b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 08:36:25 -0700 Subject: [PATCH 31/93] add some more C# scenarios --- .../run_tests/performance/scenario_config.py | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index e8f2fffaa25..2a94c93abea 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -300,6 +300,85 @@ class CSharpLanguage: 'warmup_seconds': WARMUP_SECONDS, 'benchmark_seconds': BENCHMARK_SECONDS } + yield { + 'name': 'csharp_protobuf_async_unary_ping_pong', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'ASYNC_CLIENT', + 'security_params': secargs, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'ASYNC_SERVER', + 'security_params': secargs, + 'core_limit': 0, + 'async_server_threads': 1, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS + } + yield { + 'name': 'csharp_protobuf_sync_to_async_unary_ping_pong', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'SYNC_CLIENT', + 'security_params': secargs, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'ASYNC_SERVER', + 'security_params': secargs, + 'core_limit': 0, + 'async_server_threads': 1, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS + } + yield { + 'name': 'csharp_to_cpp_protobuf_sync_unary_ping_pong', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'SYNC_CLIENT', + 'security_params': secargs, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'SYNC_SERVER', + 'security_params': secargs, + 'core_limit': 0, + 'async_server_threads': 1, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS, + 'SERVER_LANGUAGE': 'c++' # recognized by run_performance_tests.py + } def __str__(self): return 'csharp' From df14927146642fd32002232cb1fd54c128d6b057 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 09:57:44 -0700 Subject: [PATCH 32/93] add ScenarioResult and ScenarioResultSummary proto messages --- src/proto/grpc/testing/control.proto | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto index 458b19c4d6c..062c2a96c1f 100644 --- a/src/proto/grpc/testing/control.proto +++ b/src/proto/grpc/testing/control.proto @@ -194,3 +194,42 @@ message Scenario { message Scenarios { repeated Scenario scenarios = 1; } + +// Basic summary that can be computed from ClientStats and ServerStats +// once the scenario has finished. +message ScenarioResultSummary +{ + // Total number of operations per second over all clients. + double qps = 1; + // QPS per one server core. + double qps_per_server_core = 2; + // server load based on system_time (0.85 => 85%) + double server_system_time = 3; + // server load based on user_time (0.85 => 85%) + double server_user_time = 4; + // client load based on system_time (0.85 => 85%) + double client_system_time = 5; + // client load based on user_time (0.85 => 85%) + double client_user_time = 6; + + // X% latency percentiles (in seconds) + double latency_50 = 7; + double latency_90 = 8; + double latency_95 = 9; + double latency_99 = 10; + double latency_999 = 11; +} + +// Results of a single benchmark scenario. +message ScenarioResult { + // Inputs used to run the scenario. + Scenario scenario = 1; + // Histograms from all clients merged into one histogram. + HistogramData latencies = 2; + // Client stats for each client + repeated ClientStats client_stats = 3; + // Server stats for each server + repeated ServerStats server_stats = 4; + // An after-the-fact computed summary + ScenarioResultSummary summary = 5; +} From 7be244b6477f5f6d370a6e415d316819004965d0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 10:08:25 -0700 Subject: [PATCH 33/93] fix redundant C++ scenario --- tools/run_tests/performance/scenario_config.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 2a94c93abea..bd10b6f0324 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -172,7 +172,7 @@ class CXXLanguage: 'benchmark_seconds': BENCHMARK_SECONDS } yield { - 'name': 'cpp_generic_async_qps_unconstrained_%s' + 'name': 'cpp_protobuf_async_streaming_qps_unconstrained_%s' % secstr, 'num_servers': 1, 'num_clients': 0, @@ -186,15 +186,14 @@ class CXXLanguage: 'load_params': { 'closed_loop': {} }, - 'payload_config': EMPTY_GENERIC_PAYLOAD, + 'payload_config': EMPTY_PROTO_PAYLOAD, 'histogram_params': HISTOGRAM_PARAMS, }, 'server_config': { - 'server_type': 'ASYNC_GENERIC_SERVER', + 'server_type': 'ASYNC_SERVER', 'security_params': secargs, 'core_limit': SINGLE_MACHINE_CORES/2, 'async_server_threads': 1, - 'payload_config': EMPTY_GENERIC_PAYLOAD, }, 'warmup_seconds': WARMUP_SECONDS, 'benchmark_seconds': BENCHMARK_SECONDS From 05bb5b9326f1844d4c0ce4f4e81c3833a6c4ccca Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 10:12:33 -0700 Subject: [PATCH 34/93] regenerate tests.json with C++ perf scenarios --- src/proto/grpc/testing/control.proto | 6 ++-- tools/run_tests/tests.json | 48 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto index 062c2a96c1f..5db39d0298e 100644 --- a/src/proto/grpc/testing/control.proto +++ b/src/proto/grpc/testing/control.proto @@ -212,7 +212,7 @@ message ScenarioResultSummary // client load based on user_time (0.85 => 85%) double client_user_time = 6; - // X% latency percentiles (in seconds) + // X% latency percentiles (in nanoseconds) double latency_50 = 7; double latency_90 = 8; double latency_95 = 9; @@ -230,6 +230,8 @@ message ScenarioResult { repeated ClientStats client_stats = 3; // Server stats for each server repeated ServerStats server_stats = 4; + // Number of cores available to each server + repeated int32 server_cores = 5; // An after-the-fact computed summary - ScenarioResultSummary summary = 5; + ScenarioResultSummary summary = 6; } diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index f8c658672b8..ad03f16420c 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -22035,7 +22035,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"generic_async_streaming_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_generic_async_streaming_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22056,12 +22056,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:generic_async_streaming_ping_pong_secure" + "shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22082,12 +22082,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:generic_async_streaming_qps_unconstrained_secure" + "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22108,12 +22108,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:generic_async_streaming_qps_one_server_core_secure" + "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"protobuf_async_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22134,12 +22134,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:protobuf_async_qps_unconstrained_secure" + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"single_channel_throughput_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_single_channel_throughput_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22160,12 +22160,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:single_channel_throughput_secure" + "shortname": "json_run_localhost:cpp_single_channel_throughput_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"protobuf_async_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22186,12 +22186,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:protobuf_async_ping_pong_secure" + "shortname": "json_run_localhost:cpp_protobuf_async_ping_pong_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22212,12 +22212,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:generic_async_streaming_ping_pong_insecure" + "shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22238,12 +22238,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:generic_async_streaming_qps_unconstrained_insecure" + "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22264,12 +22264,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:generic_async_streaming_qps_one_server_core_insecure" + "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"protobuf_async_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22290,12 +22290,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:protobuf_async_qps_unconstrained_insecure" + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"single_channel_throughput_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_single_channel_throughput_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22316,12 +22316,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:single_channel_throughput_insecure" + "shortname": "json_run_localhost:cpp_single_channel_throughput_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"protobuf_async_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22342,7 +22342,7 @@ "posix", "windows" ], - "shortname": "json_run_localhost:protobuf_async_ping_pong_insecure" + "shortname": "json_run_localhost:cpp_protobuf_async_ping_pong_insecure" }, { "args": [ From f2ba7fe037b4e97d727ba38603364c464144e2e9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 12:14:17 -0700 Subject: [PATCH 35/93] integrate ScenarioResult proto into qps driver --- test/cpp/qps/driver.cc | 17 +++-- test/cpp/qps/driver.h | 23 ------- test/cpp/qps/qps_driver.cc | 1 - test/cpp/qps/report.cc | 111 ++++++++++-------------------- test/cpp/qps/report.h | 23 +------ test/cpp/util/benchmark_config.cc | 8 --- 6 files changed, 48 insertions(+), 135 deletions(-) diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index c87ad6461d1..9c0649cae68 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -343,8 +343,8 @@ std::unique_ptr RunScenario( // Finish a run std::unique_ptr result(new ScenarioResult); - result->client_config = result_client_config; - result->server_config = result_server_config; + Histogram merged_latencies; + gpr_log(GPR_INFO, "Finishing clients"); for (auto client = &clients[0]; client != &clients[num_clients]; client++) { GPR_ASSERT(client->stream->Write(client_mark)); @@ -353,9 +353,8 @@ std::unique_ptr RunScenario( for (auto client = &clients[0]; client != &clients[num_clients]; client++) { GPR_ASSERT(client->stream->Read(&client_status)); const auto& stats = client_status.stats(); - result->latencies.MergeProto(stats.latencies()); - result->client_resources.emplace_back( - stats.time_elapsed(), stats.time_user(), stats.time_system(), -1); + merged_latencies.MergeProto(stats.latencies()); + result->add_client_stats()->CopyFrom(stats); GPR_ASSERT(!client->stream->Read(&client_status)); } for (auto client = &clients[0]; client != &clients[num_clients]; client++) { @@ -363,6 +362,8 @@ std::unique_ptr RunScenario( } delete[] clients; + merged_latencies.FillProto(result->mutable_latencies()); + gpr_log(GPR_INFO, "Finishing servers"); for (auto server = &servers[0]; server != &servers[num_servers]; server++) { GPR_ASSERT(server->stream->Write(server_mark)); @@ -370,10 +371,8 @@ std::unique_ptr RunScenario( } for (auto server = &servers[0]; server != &servers[num_servers]; server++) { GPR_ASSERT(server->stream->Read(&server_status)); - const auto& stats = server_status.stats(); - result->server_resources.emplace_back( - stats.time_elapsed(), stats.time_user(), stats.time_system(), - server_status.cores()); + result->add_server_stats()->CopyFrom(server_status.stats()); + result->add_server_cores(server_status.cores()); GPR_ASSERT(!server->stream->Read(&server_status)); } for (auto server = &servers[0]; server != &servers[num_servers]; server++) { diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 21e51529d59..3a5cf138f11 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -41,29 +41,6 @@ namespace grpc { namespace testing { -class ResourceUsage { - public: - ResourceUsage(double w, double u, double s, int c) - : wall_time_(w), user_time_(u), system_time_(s), cores_(c) {} - double wall_time() const { return wall_time_; } - double user_time() const { return user_time_; } - double system_time() const { return system_time_; } - int cores() const { return cores_; } - - private: - double wall_time_; - double user_time_; - double system_time_; - int cores_; -}; - -struct ScenarioResult { - Histogram latencies; - std::vector client_resources; - std::vector server_resources; - ClientConfig client_config; - ServerConfig server_config; -}; std::unique_ptr RunScenario( const grpc::testing::ClientConfig& client_config, size_t num_clients, diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index e412c6919af..608181f77fb 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -85,7 +85,6 @@ using grpc::testing::ServerConfig; using grpc::testing::ClientType; using grpc::testing::ServerType; using grpc::testing::RpcType; -using grpc::testing::ResourceUsage; using grpc::testing::SecurityParams; namespace grpc { diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index b230eb441e8..6037ac76038 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -40,10 +40,13 @@ namespace grpc { namespace testing { -static double WallTime(ResourceUsage u) { return u.wall_time(); } -static double UserTime(ResourceUsage u) { return u.user_time(); } -static double SystemTime(ResourceUsage u) { return u.system_time(); } -static int Cores(ResourceUsage u) { return u.cores(); } +static double WallTime(ClientStats s) { return s.time_elapsed(); } +static double SystemTime(ClientStats s) { return s.time_system(); } +static double UserTime(ClientStats s) { return s.time_user(); } +static double ServerWallTime(ServerStats s) { return s.time_elapsed(); } +static double ServerSystemTime(ServerStats s) { return s.time_system(); } +static double ServerUserTime(ServerStats s) { return s.time_user(); } +static int Cores(int n) { return n; } void CompositeReporter::add(std::unique_ptr reporter) { reporters_.emplace_back(std::move(reporter)); @@ -74,102 +77,62 @@ void CompositeReporter::ReportTimes(const ScenarioResult& result) { } void GprLogReporter::ReportQPS(const ScenarioResult& result) { - gpr_log( - GPR_INFO, "QPS: %.1f", - result.latencies.Count() / average(result.client_resources, WallTime)); + Histogram histogram; + histogram.MergeProto(result.latencies()); + gpr_log(GPR_INFO, "QPS: %.1f", + histogram.Count() / average(result.client_stats(), WallTime)); } void GprLogReporter::ReportQPSPerCore(const ScenarioResult& result) { - auto qps = - result.latencies.Count() / average(result.client_resources, WallTime); + Histogram histogram; + histogram.MergeProto(result.latencies()); + auto qps = histogram.Count() / average(result.client_stats(), WallTime); gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", qps, - qps / sum(result.server_resources, Cores)); + qps / sum(result.server_cores(), Cores)); } void GprLogReporter::ReportLatency(const ScenarioResult& result) { + Histogram histogram; + histogram.MergeProto(result.latencies()); gpr_log(GPR_INFO, "Latencies (50/90/95/99/99.9%%-ile): %.1f/%.1f/%.1f/%.1f/%.1f us", - result.latencies.Percentile(50) / 1000, - result.latencies.Percentile(90) / 1000, - result.latencies.Percentile(95) / 1000, - result.latencies.Percentile(99) / 1000, - result.latencies.Percentile(99.9) / 1000); + histogram.Percentile(50) / 1000, + histogram.Percentile(90) / 1000, + histogram.Percentile(95) / 1000, + histogram.Percentile(99) / 1000, + histogram.Percentile(99.9) / 1000); } void GprLogReporter::ReportTimes(const ScenarioResult& result) { gpr_log(GPR_INFO, "Server system time: %.2f%%", - 100.0 * sum(result.server_resources, SystemTime) / - sum(result.server_resources, WallTime)); + 100.0 * sum(result.server_stats(), ServerSystemTime) / + sum(result.server_stats(), ServerWallTime)); gpr_log(GPR_INFO, "Server user time: %.2f%%", - 100.0 * sum(result.server_resources, UserTime) / - sum(result.server_resources, WallTime)); + 100.0 * sum(result.server_stats(), ServerUserTime) / + sum(result.server_stats(), ServerWallTime)); gpr_log(GPR_INFO, "Client system time: %.2f%%", - 100.0 * sum(result.client_resources, SystemTime) / - sum(result.client_resources, WallTime)); + 100.0 * sum(result.client_stats(), SystemTime) / + sum(result.client_stats(), WallTime)); gpr_log(GPR_INFO, "Client user time: %.2f%%", - 100.0 * sum(result.client_resources, UserTime) / - sum(result.client_resources, WallTime)); + 100.0 * sum(result.client_stats(), UserTime) / + sum(result.client_stats(), WallTime)); } -void PerfDbReporter::ReportQPS(const ScenarioResult& result) { - auto qps = - result.latencies.Count() / average(result.client_resources, WallTime); +void JsonReporter::ReportQPS(const ScenarioResult& result) { - perf_db_client_.setQps(qps); - perf_db_client_.setConfigs(result.client_config, result.server_config); } -void PerfDbReporter::ReportQPSPerCore(const ScenarioResult& result) { - auto qps = - result.latencies.Count() / average(result.client_resources, WallTime); - - auto qps_per_core = qps / sum(result.server_resources, Cores); - - perf_db_client_.setQps(qps); - perf_db_client_.setQpsPerCore(qps_per_core); - perf_db_client_.setConfigs(result.client_config, result.server_config); -} - -void PerfDbReporter::ReportLatency(const ScenarioResult& result) { - perf_db_client_.setLatencies(result.latencies.Percentile(50) / 1000, - result.latencies.Percentile(90) / 1000, - result.latencies.Percentile(95) / 1000, - result.latencies.Percentile(99) / 1000, - result.latencies.Percentile(99.9) / 1000); - perf_db_client_.setConfigs(result.client_config, result.server_config); +void JsonReporter::ReportQPSPerCore(const ScenarioResult& result) { + // NOP - all reporting is handled by ReportQPS. } -void PerfDbReporter::ReportTimes(const ScenarioResult& result) { - const double server_system_time = 100.0 * - sum(result.server_resources, SystemTime) / - sum(result.server_resources, WallTime); - const double server_user_time = 100.0 * - sum(result.server_resources, UserTime) / - sum(result.server_resources, WallTime); - const double client_system_time = 100.0 * - sum(result.client_resources, SystemTime) / - sum(result.client_resources, WallTime); - const double client_user_time = 100.0 * - sum(result.client_resources, UserTime) / - sum(result.client_resources, WallTime); - - perf_db_client_.setTimes(server_system_time, server_user_time, - client_system_time, client_user_time); - perf_db_client_.setConfigs(result.client_config, result.server_config); +void JsonReporter::ReportLatency(const ScenarioResult& result) { + // NOP - all reporting is handled by ReportQPS. } -void PerfDbReporter::SendData() { - // send data to performance database - bool data_state = - perf_db_client_.sendData(hashed_id_, test_name_, sys_info_, tag_); - - // check state of data sending - if (data_state) { - gpr_log(GPR_INFO, "Data sent to performance database successfully"); - } else { - gpr_log(GPR_INFO, "Data could not be sent to performance database"); - } +void JsonReporter::ReportTimes(const ScenarioResult& result) { + // NOP - all reporting is handled by ReportQPS. } } // namespace testing diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index 5caf3fe69a2..b299e415f18 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -104,33 +104,16 @@ class GprLogReporter : public Reporter { void ReportTimes(const ScenarioResult& result) GRPC_OVERRIDE; }; -/** Reporter for performance database tool */ -class PerfDbReporter : public Reporter { +/** Dumps the report to a JSON file. */ +class JsonReporter : public Reporter { public: - PerfDbReporter(const string& name, const string& hashed_id, - const string& test_name, const string& sys_info, - const string& server_address, const string& tag) - : Reporter(name), - hashed_id_(hashed_id), - test_name_(test_name), - sys_info_(sys_info), - tag_(tag) { - perf_db_client_.init(grpc::CreateChannel( - server_address, grpc::InsecureChannelCredentials())); - } - ~PerfDbReporter() GRPC_OVERRIDE { SendData(); }; + JsonReporter(const string& name) : Reporter(name) {} private: - PerfDbClient perf_db_client_; - std::string hashed_id_; - std::string test_name_; - std::string sys_info_; - std::string tag_; void ReportQPS(const ScenarioResult& result) GRPC_OVERRIDE; void ReportQPSPerCore(const ScenarioResult& result) GRPC_OVERRIDE; void ReportLatency(const ScenarioResult& result) GRPC_OVERRIDE; void ReportTimes(const ScenarioResult& result) GRPC_OVERRIDE; - void SendData(); }; } // namespace testing diff --git a/test/cpp/util/benchmark_config.cc b/test/cpp/util/benchmark_config.cc index 746d3d7ae65..ca4c27ec355 100644 --- a/test/cpp/util/benchmark_config.cc +++ b/test/cpp/util/benchmark_config.cc @@ -37,9 +37,6 @@ DEFINE_bool(enable_log_reporter, true, "Enable reporting of benchmark results through GprLog"); -DEFINE_bool(report_metrics_db, false, - "True if metrics to be reported to performance database"); - DEFINE_string(hashed_id, "", "Hash of the user id"); DEFINE_string(test_name, "", "Name of the test being executed"); @@ -71,11 +68,6 @@ static std::shared_ptr InitBenchmarkReporters() { composite_reporter->add( std::unique_ptr(new GprLogReporter("LogReporter"))); } - if (FLAGS_report_metrics_db) { - composite_reporter->add(std::unique_ptr( - new PerfDbReporter("PerfDbReporter", FLAGS_hashed_id, FLAGS_test_name, - FLAGS_sys_info, FLAGS_server_address, FLAGS_tag))); - } return std::shared_ptr(composite_reporter); } From 969ffaf5c61aeec0c52a721d64b39528da233fd3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 12:59:42 -0700 Subject: [PATCH 36/93] Enable JSON reports for qps drivers --- test/cpp/qps/qps_json_driver.cc | 6 +++++- test/cpp/qps/report.cc | 21 ++++++++++++++++++++- test/cpp/qps/report.h | 6 +++++- test/cpp/util/benchmark_config.cc | 7 +++++++ tools/run_tests/run_performance_tests.py | 1 + 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index 8943a43ba87..e9266a5711b 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -102,12 +102,16 @@ static void QpsDriver() { for (int i = 0; i < scenarios.scenarios_size(); i++) { const Scenario &scenario = scenarios.scenarios(i); std::cerr << "RUNNING SCENARIO: " << scenario.name() << "\n"; - const auto result = + auto result = RunScenario(scenario.client_config(), scenario.num_clients(), scenario.server_config(), scenario.num_servers(), scenario.warmup_seconds(), scenario.benchmark_seconds(), scenario.spawn_local_worker_count()); + // Amend the result with scenario config. Eventually we should adjust + // RunScenario contract so we don't need to touch the result here. + result->mutable_scenario()->CopyFrom(scenario); + GetReporter()->ReportQPS(*result); GetReporter()->ReportQPSPerCore(*result); GetReporter()->ReportLatency(*result); diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 6037ac76038..05fb1111206 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -33,6 +33,11 @@ #include "test/cpp/qps/report.h" +#include + +#include +#include + #include #include "test/cpp/qps/driver.h" #include "test/cpp/qps/stats.h" @@ -120,7 +125,21 @@ void GprLogReporter::ReportTimes(const ScenarioResult& result) { } void JsonReporter::ReportQPS(const ScenarioResult& result) { - + std::unique_ptr type_resolver( + google::protobuf::util::NewTypeResolverForDescriptorPool( + "type.googleapis.com", + google::protobuf::DescriptorPool::generated_pool())); + grpc::string binary; + grpc::string json_string; + result.SerializeToString(&binary); + auto status = BinaryToJsonString(type_resolver.get(), + "type.googleapis.com/grpc.testing.ScenarioResult", + binary, &json_string); + GPR_ASSERT(status.ok()); + + std::ofstream output_file(report_file_); + output_file << json_string; + output_file.close(); } void JsonReporter::ReportQPSPerCore(const ScenarioResult& result) { diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index b299e415f18..e32a129e76a 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -107,13 +107,17 @@ class GprLogReporter : public Reporter { /** Dumps the report to a JSON file. */ class JsonReporter : public Reporter { public: - JsonReporter(const string& name) : Reporter(name) {} + JsonReporter(const string& name, const string& report_file) : + Reporter(name), + report_file_(report_file) {} private: void ReportQPS(const ScenarioResult& result) GRPC_OVERRIDE; void ReportQPSPerCore(const ScenarioResult& result) GRPC_OVERRIDE; void ReportLatency(const ScenarioResult& result) GRPC_OVERRIDE; void ReportTimes(const ScenarioResult& result) GRPC_OVERRIDE; + + const string report_file_; }; } // namespace testing diff --git a/test/cpp/util/benchmark_config.cc b/test/cpp/util/benchmark_config.cc index ca4c27ec355..6fc864069ef 100644 --- a/test/cpp/util/benchmark_config.cc +++ b/test/cpp/util/benchmark_config.cc @@ -37,6 +37,9 @@ DEFINE_bool(enable_log_reporter, true, "Enable reporting of benchmark results through GprLog"); +DEFINE_string(scenario_result_file, "", + "Write JSON benchmark report to the file specified."); + DEFINE_string(hashed_id, "", "Hash of the user id"); DEFINE_string(test_name, "", "Name of the test being executed"); @@ -68,6 +71,10 @@ static std::shared_ptr InitBenchmarkReporters() { composite_reporter->add( std::unique_ptr(new GprLogReporter("LogReporter"))); } + if (FLAGS_scenario_result_file != "") { + composite_reporter->add(std::unique_ptr( + new JsonReporter("JsonReporter", FLAGS_scenario_result_file))); + } return std::shared_ptr(composite_reporter); } diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index b3729acd9f5..b62a4287477 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -98,6 +98,7 @@ def create_scenario_jobspec(scenario_json, workers, remote_host=None): # setting QPS_WORKERS env variable here makes sure it works with SSH too. cmd = 'QPS_WORKERS="%s" bins/opt/qps_json_driver ' % ','.join(workers) cmd += '--scenarios_json=%s' % pipes.quote(json.dumps({'scenarios': [scenario_json]})) + cmd += ' --scenario_result_file=scenario_result.json' if remote_host: user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, remote_host) cmd = 'ssh %s "cd ~/performance_workspace/grpc/ && %s"' % (user_at_host, cmd) From e2b86c74239603cdf84afdaf0ee201002abf3877 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 14 Apr 2016 17:34:01 -0700 Subject: [PATCH 37/93] Fix crash --- src/core/ext/lb_policy/pick_first/pick_first.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 5926f9d70bf..0d215cd1968 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -109,7 +109,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { if (selected != NULL) { grpc_connected_subchannel_notify_on_state_change( exec_ctx, selected, NULL, NULL, &p->connectivity_changed); - } else { + } else if (p->num_subchannels > 0) { grpc_subchannel_notify_on_state_change( exec_ctx, p->subchannels[p->checking_subchannel], NULL, NULL, &p->connectivity_changed); From 453442eefb742a7a9b4b87e434da5d135d4fa2f4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 18:05:42 -0700 Subject: [PATCH 38/93] fix formatting --- test/cpp/qps/report.cc | 12 +++++------- test/cpp/qps/report.h | 5 ++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 05fb1111206..9cef7bf52f8 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -85,7 +85,7 @@ void GprLogReporter::ReportQPS(const ScenarioResult& result) { Histogram histogram; histogram.MergeProto(result.latencies()); gpr_log(GPR_INFO, "QPS: %.1f", - histogram.Count() / average(result.client_stats(), WallTime)); + histogram.Count() / average(result.client_stats(), WallTime)); } void GprLogReporter::ReportQPSPerCore(const ScenarioResult& result) { @@ -102,10 +102,8 @@ void GprLogReporter::ReportLatency(const ScenarioResult& result) { histogram.MergeProto(result.latencies()); gpr_log(GPR_INFO, "Latencies (50/90/95/99/99.9%%-ile): %.1f/%.1f/%.1f/%.1f/%.1f us", - histogram.Percentile(50) / 1000, - histogram.Percentile(90) / 1000, - histogram.Percentile(95) / 1000, - histogram.Percentile(99) / 1000, + histogram.Percentile(50) / 1000, histogram.Percentile(90) / 1000, + histogram.Percentile(95) / 1000, histogram.Percentile(99) / 1000, histogram.Percentile(99.9) / 1000); } @@ -133,8 +131,8 @@ void JsonReporter::ReportQPS(const ScenarioResult& result) { grpc::string json_string; result.SerializeToString(&binary); auto status = BinaryToJsonString(type_resolver.get(), - "type.googleapis.com/grpc.testing.ScenarioResult", - binary, &json_string); + "type.googleapis.com/grpc.testing.ScenarioResult", + binary, &json_string); GPR_ASSERT(status.ok()); std::ofstream output_file(report_file_); diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index e32a129e76a..8f04d841245 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -107,9 +107,8 @@ class GprLogReporter : public Reporter { /** Dumps the report to a JSON file. */ class JsonReporter : public Reporter { public: - JsonReporter(const string& name, const string& report_file) : - Reporter(name), - report_file_(report_file) {} + JsonReporter(const string& name, const string& report_file) + : Reporter(name), report_file_(report_file) {} private: void ReportQPS(const ScenarioResult& result) GRPC_OVERRIDE; From 6321cec58e708ded42ae736b6caf56b0df868735 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 20:00:29 -0700 Subject: [PATCH 39/93] fix formatting --- test/cpp/qps/report.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 9cef7bf52f8..07ab0a8f284 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -130,8 +130,8 @@ void JsonReporter::ReportQPS(const ScenarioResult& result) { grpc::string binary; grpc::string json_string; result.SerializeToString(&binary); - auto status = BinaryToJsonString(type_resolver.get(), - "type.googleapis.com/grpc.testing.ScenarioResult", + auto status = BinaryToJsonString( + type_resolver.get(), "type.googleapis.com/grpc.testing.ScenarioResult", binary, &json_string); GPR_ASSERT(status.ok()); From 418b9f9a42bdc4d29a8ac2654da42076aea85cb8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 15 Apr 2016 09:06:55 -0700 Subject: [PATCH 40/93] Fix bug in test --- test/core/surface/concurrent_connectivity_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 2d060444f70..a2fdf735962 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -194,6 +194,7 @@ int main(int argc, char **argv) { gpr_log(GPR_DEBUG, "Wave 3"); args.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(args.pollset, &args.mu); + gpr_event_init(&args.ready); gpr_thd_new(&server, bad_server_thread, &args, &options); gpr_event_wait(&args.ready, gpr_inf_future(GPR_CLOCK_MONOTONIC)); From efd9803be5dfb367d0649987136a02be0b70ea0b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 16:29:24 -0700 Subject: [PATCH 41/93] Uploading results to big query --- tools/run_tests/performance/export_utils.py | 88 +++++++++++++++ .../performance/scenario_result_schema.json | 103 ++++++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 tools/run_tests/performance/export_utils.py create mode 100644 tools/run_tests/performance/scenario_result_schema.json diff --git a/tools/run_tests/performance/export_utils.py b/tools/run_tests/performance/export_utils.py new file mode 100644 index 00000000000..bdb36a5e822 --- /dev/null +++ b/tools/run_tests/performance/export_utils.py @@ -0,0 +1,88 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# utilities for exporting benchmark results + +import json +import os +import sys +import uuid + + +gcp_utils_dir = os.path.abspath(os.path.join( + os.path.dirname(__file__), '../../gcp/utils')) +sys.path.append(gcp_utils_dir) +import big_query_utils + + +_PROJECT_ID='grpc-testing' +_DATASET_ID='test_dataset' +_RESULTS_TABLE_ID='scenario_results' + + +def upload_scenario_result_to_bigquery(result_file): + bq = big_query_utils.create_big_query() + _create_results_table(bq) + + with open(result_file, 'r') as f: + scenario_result = json.loads(f.read()) + _insert_result(bq, scenario_result) + + +def _insert_result(bq, scenario_result): + _flatten_result_inplace(scenario_result) + + # TODO: handle errors... + row = big_query_utils.make_row(str(uuid.uuid4()), scenario_result) + return big_query_utils.insert_rows(bq, + _PROJECT_ID, + _DATASET_ID, + _RESULTS_TABLE_ID, + [row]) + + +def _create_results_table(bq): + with open(os.path.dirname(__file__) + '/scenario_result_schema.json', 'r') as f: + table_schema = json.loads(f.read()) + desc = 'Results of performance benchmarks.' + return big_query_utils.create_table2(bq, _PROJECT_ID, _DATASET_ID, + _RESULTS_TABLE_ID, table_schema, desc) + + +def _flatten_result_inplace(scenario_result): + """Bigquery is not really great for handling deeply nested data + and repeated fields. To maintain values of some fields while keeping + the schema relatively simple, we artificially leave some of the fields + as JSON strings. + """ + scenario_result['scenario']['clientConfig'] = json.dumps(scenario_result['scenario']['clientConfig']) + scenario_result['scenario']['serverConfig'] = json.dumps(scenario_result['scenario']['serverConfig']) + scenario_result['latencies'] = json.dumps(scenario_result['latencies']) + for stats in scenario_result['clientStats']: + stats['latencies'] = json.dumps(stats['latencies']) diff --git a/tools/run_tests/performance/scenario_result_schema.json b/tools/run_tests/performance/scenario_result_schema.json new file mode 100644 index 00000000000..39aba21b0c2 --- /dev/null +++ b/tools/run_tests/performance/scenario_result_schema.json @@ -0,0 +1,103 @@ +[ + { + "name": "scenario", + "type": "RECORD", + "mode": "NULLABLE", + "fields": [ + { + "name": "name", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "clientConfig", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "numClients", + "type": "INTEGER", + "mode": "NULLABLE" + }, + { + "name": "serverConfig", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "numServers", + "type": "INTEGER", + "mode": "NULLABLE" + }, + { + "name": "warmupSeconds", + "type": "INTEGER", + "mode": "NULLABLE" + }, + { + "name": "benchmarkSeconds", + "type": "INTEGER", + "mode": "NULLABLE" + } + ] + }, + { + "name": "latencies", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "clientStats", + "type": "RECORD", + "mode": "REPEATED", + "fields": [ + { + "name": "latencies", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "timeElapsed", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "timeUser", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "timeSystem", + "type": "FLOAT", + "mode": "NULLABLE" + } + ] + }, + { + "name": "serverStats", + "type": "RECORD", + "mode": "REPEATED", + "fields": [ + { + "name": "timeElapsed", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "timeUser", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "timeSystem", + "type": "FLOAT", + "mode": "NULLABLE" + } + ] + }, + { + "name": "serverCores", + "type": "INTEGER", + "mode": "REPEATED" + } +] From 7d54db8d490b986bd5b704241d38ff0e28141eac Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 16:57:45 -0700 Subject: [PATCH 42/93] minor refactoring of biq_query_utils --- tools/gcp/utils/big_query_utils.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/gcp/utils/big_query_utils.py b/tools/gcp/utils/big_query_utils.py index c331a679422..913afd059eb 100755 --- a/tools/gcp/utils/big_query_utils.py +++ b/tools/gcp/utils/big_query_utils.py @@ -71,16 +71,22 @@ def create_dataset(biq_query, project_id, dataset_id): def create_table(big_query, project_id, dataset_id, table_id, table_schema, description): + fields = [{'name': field_name, + 'type': field_type, + 'description': field_description + } for (field_name, field_type, field_description) in table_schema] + return create_table2(big_query, project_id, dataset_id, table_id, + fields, description) + + +def create_table2(big_query, project_id, dataset_id, table_id, fields_schema, + description): is_success = True body = { 'description': description, 'schema': { - 'fields': [{ - 'name': field_name, - 'type': field_type, - 'description': field_description - } for (field_name, field_type, field_description) in table_schema] + 'fields': fields_schema }, 'tableReference': { 'datasetId': dataset_id, @@ -112,9 +118,7 @@ def insert_rows(big_query, project_id, dataset_id, table_id, rows_list): datasetId=dataset_id, tableId=table_id, body=body) - print body res = insert_req.execute(num_retries=NUM_RETRIES) - print res except HttpError as http_error: print 'Error in inserting rows in the table %s' % table_id is_success = False From 88cc4e26edc158b95f5aa2d54d59e3ffff1a2fc0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 16:58:50 -0700 Subject: [PATCH 43/93] minor changes to schema --- tools/run_tests/performance/export_utils.py | 1 + .../performance/scenario_result_schema.json | 103 +++++++++++++++++- 2 files changed, 102 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/performance/export_utils.py b/tools/run_tests/performance/export_utils.py index bdb36a5e822..6df64cca1f1 100644 --- a/tools/run_tests/performance/export_utils.py +++ b/tools/run_tests/performance/export_utils.py @@ -86,3 +86,4 @@ def _flatten_result_inplace(scenario_result): scenario_result['latencies'] = json.dumps(scenario_result['latencies']) for stats in scenario_result['clientStats']: stats['latencies'] = json.dumps(stats['latencies']) + scenario_result['serverCores'] = json.dumps(scenario_result['serverCores']) diff --git a/tools/run_tests/performance/scenario_result_schema.json b/tools/run_tests/performance/scenario_result_schema.json index 39aba21b0c2..10d24a25177 100644 --- a/tools/run_tests/performance/scenario_result_schema.json +++ b/tools/run_tests/performance/scenario_result_schema.json @@ -1,4 +1,41 @@ [ + { + "name": "metadata", + "type": "RECORD", + "mode": "NULLABLE", + "fields": [ + { + "name": "buildNumber", + "type": "INTEGER", + "mode": "NULLABLE" + }, + { + "name": "buildUrl", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "jobName", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "gitCommit", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "gitActualCommit", + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "created", + "type": "TIMESTAMP", + "mode": "NULLABLE" + } + ] + }, { "name": "scenario", "type": "RECORD", @@ -97,7 +134,69 @@ }, { "name": "serverCores", - "type": "INTEGER", - "mode": "REPEATED" + "type": "STRING", + "mode": "NULLABLE" + }, + { + "name": "summary", + "type": "RECORD", + "mode": "NULLABLE", + "fields": [ + { + "name": "qps", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "qps_per_server_core", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "server_system_time", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "server_user_time", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "client_system_time", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "client_user_time", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "latency_50", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "latency_90", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "latency_95", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "latency_99", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "latency_999", + "type": "FLOAT", + "mode": "NULLABLE" + } + ] } ] From 6d7fa5572e507f6d541b3bca035ba19ad3761e42 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 14 Apr 2016 17:42:54 -0700 Subject: [PATCH 44/93] result uploading --- .../{export_utils.py => bq_upload_result.py} | 42 ++++++++++++------- tools/run_tests/performance/run_qps_driver.sh | 40 ++++++++++++++++++ tools/run_tests/run_performance_tests.py | 28 +++++++++---- 3 files changed, 87 insertions(+), 23 deletions(-) rename tools/run_tests/performance/{export_utils.py => bq_upload_result.py} (70%) mode change 100644 => 100755 create mode 100755 tools/run_tests/performance/run_qps_driver.sh diff --git a/tools/run_tests/performance/export_utils.py b/tools/run_tests/performance/bq_upload_result.py old mode 100644 new mode 100755 similarity index 70% rename from tools/run_tests/performance/export_utils.py rename to tools/run_tests/performance/bq_upload_result.py index 6df64cca1f1..0f53ba5d02d --- a/tools/run_tests/performance/export_utils.py +++ b/tools/run_tests/performance/bq_upload_result.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2.7 # Copyright 2016, Google Inc. # All rights reserved. # @@ -27,8 +28,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# utilities for exporting benchmark results +# Uploads performance benchmark result file to bigquery. +import argparse import json import os import sys @@ -42,37 +44,36 @@ import big_query_utils _PROJECT_ID='grpc-testing' -_DATASET_ID='test_dataset' -_RESULTS_TABLE_ID='scenario_results' -def upload_scenario_result_to_bigquery(result_file): +def _upload_scenario_result_to_bigquery(dataset_id, table_id, result_file): bq = big_query_utils.create_big_query() - _create_results_table(bq) + _create_results_table(bq, dataset_id, table_id) with open(result_file, 'r') as f: scenario_result = json.loads(f.read()) - _insert_result(bq, scenario_result) + if not _insert_result(bq, dataset_id, table_id, scenario_result): + print 'Error uploading result to bigquery.' + sys.exit(1) -def _insert_result(bq, scenario_result): - _flatten_result_inplace(scenario_result) - # TODO: handle errors... +def _insert_result(bq, dataset_id, table_id, scenario_result): + _flatten_result_inplace(scenario_result) row = big_query_utils.make_row(str(uuid.uuid4()), scenario_result) return big_query_utils.insert_rows(bq, _PROJECT_ID, - _DATASET_ID, - _RESULTS_TABLE_ID, + dataset_id, + table_id, [row]) -def _create_results_table(bq): +def _create_results_table(bq, dataset_id, table_id): with open(os.path.dirname(__file__) + '/scenario_result_schema.json', 'r') as f: table_schema = json.loads(f.read()) desc = 'Results of performance benchmarks.' - return big_query_utils.create_table2(bq, _PROJECT_ID, _DATASET_ID, - _RESULTS_TABLE_ID, table_schema, desc) + return big_query_utils.create_table2(bq, _PROJECT_ID, dataset_id, + table_id, table_schema, desc) def _flatten_result_inplace(scenario_result): @@ -87,3 +88,16 @@ def _flatten_result_inplace(scenario_result): for stats in scenario_result['clientStats']: stats['latencies'] = json.dumps(stats['latencies']) scenario_result['serverCores'] = json.dumps(scenario_result['serverCores']) + + +argp = argparse.ArgumentParser(description='Upload result to big query.') +argp.add_argument('--bq_result_table', required=True, default=None, type=str, + help='Bigquery "dataset.table" to upload results to.') +argp.add_argument('--file_to_upload', default='scenario_result.json', type=str, + help='Report file to upload.') + +args = argp.parse_args() + +dataset_id, table_id = args.bq_result_table.split('.', 2) +_upload_scenario_result_to_bigquery(dataset_id, table_id, args.file_to_upload) +print 'Successfully uploaded %s to BigQuery.\n' % args.file_to_upload diff --git a/tools/run_tests/performance/run_qps_driver.sh b/tools/run_tests/performance/run_qps_driver.sh new file mode 100755 index 00000000000..c8c6890df9d --- /dev/null +++ b/tools/run_tests/performance/run_qps_driver.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../../.. + +bins/opt/qps_json_driver "$@" + +if [ "$BQ_RESULT_TABLE" != "" ] +then + tools/run_tests/performance/bq_upload_result.py --bq_result_table="$BQ_RESULT_TABLE" +fi diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index b62a4287477..beedd819ad0 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -93,15 +93,19 @@ def create_qpsworker_job(language, shortname=None, return QpsWorkerJob(jobspec, language, host_and_port) -def create_scenario_jobspec(scenario_json, workers, remote_host=None): +def create_scenario_jobspec(scenario_json, workers, remote_host=None, + bq_result_table=None): """Runs one scenario using QPS driver.""" # setting QPS_WORKERS env variable here makes sure it works with SSH too. - cmd = 'QPS_WORKERS="%s" bins/opt/qps_json_driver ' % ','.join(workers) - cmd += '--scenarios_json=%s' % pipes.quote(json.dumps({'scenarios': [scenario_json]})) - cmd += ' --scenario_result_file=scenario_result.json' + cmd = 'QPS_WORKERS="%s" ' % ','.join(workers) + if bq_result_table: + cmd += 'BQ_RESULT_TABLE="%s" ' % bq_result_table + cmd += 'tools/run_tests/performance/run_qps_driver.sh ' + cmd += '--scenarios_json=%s ' % pipes.quote(json.dumps({'scenarios': [scenario_json]})) + cmd += '--scenario_result_file=scenario_result.json' if remote_host: user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, remote_host) - cmd = 'ssh %s "cd ~/performance_workspace/grpc/ && %s"' % (user_at_host, cmd) + cmd = 'ssh %s "cd ~/performance_workspace/grpc/ && "%s' % (user_at_host, pipes.quote(cmd)) return jobset.JobSpec( cmdline=[cmd], @@ -117,7 +121,7 @@ def create_quit_jobspec(workers, remote_host=None): cmd = 'QPS_WORKERS="%s" bins/opt/qps_driver --quit' % ','.join(workers) if remote_host: user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, remote_host) - cmd = 'ssh %s "cd ~/performance_workspace/grpc/ && %s"' % (user_at_host, cmd) + cmd = 'ssh %s "cd ~/performance_workspace/grpc/ && "%s' % (user_at_host, pipes.quote(cmd)) return jobset.JobSpec( cmdline=[cmd], @@ -226,7 +230,8 @@ def start_qpsworkers(languages, worker_hosts): for worker_idx, worker in enumerate(workers)] -def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*'): +def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', + bq_result_table=None): """Create jobspecs for scenarios to run.""" scenarios = [] for language in languages: @@ -248,7 +253,8 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*'): workers[idx] = workers_by_lang[custom_server_lang][idx] scenario = create_scenario_jobspec(scenario_json, workers, - remote_host=remote_host) + remote_host=remote_host, + bq_result_table=bq_result_table) scenarios.append(scenario) # the very last scenario requests shutting down the workers. @@ -290,6 +296,8 @@ argp.add_argument('--remote_worker_host', help='Worker hosts where to start QPS workers.') argp.add_argument('-r', '--regex', default='.*', type=str, help='Regex to select scenarios to run.') +argp.add_argument('--bq_result_table', default=None, type=str, + help='Bigquery "dataset.table" to upload results to.') args = argp.parse_args() @@ -298,6 +306,7 @@ languages = set(scenario_config.LANGUAGES[l] scenario_config.LANGUAGES.iterkeys() if x == 'all' else [x] for x in args.language)) + # Put together set of remote hosts where to run and build remote_hosts = set() if args.remote_worker_host: @@ -329,7 +338,8 @@ try: scenarios = create_scenarios(languages, workers_by_lang=worker_addresses, remote_host=args.remote_driver_host, - regex=args.regex) + regex=args.regex, + bq_result_table=args.bq_result_table) if not scenarios: raise Exception('No scenarios to run') From 95e4c484306fa205ecc5bcc26caef258685c791e Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 15 Apr 2016 10:38:24 -0700 Subject: [PATCH 45/93] Add knob for default core output verbosity --- include/grpc/impl/codegen/log.h | 8 +++++ src/core/lib/support/log.c | 30 ++++++++++++++++ src/core/lib/surface/init.c | 2 ++ test/core/support/log_test.c | 62 +++++++++++++++++++++++++++++++++ 4 files changed, 102 insertions(+) diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h index 0853350a262..c64b961b80a 100644 --- a/include/grpc/impl/codegen/log.h +++ b/include/grpc/impl/codegen/log.h @@ -38,6 +38,7 @@ #include /* for abort() */ #include +#include #ifdef __cplusplus extern "C" { @@ -61,6 +62,8 @@ typedef enum gpr_log_severity { GPR_LOG_SEVERITY_ERROR } gpr_log_severity; +#define GPR_LOG_VERBOSITY_UNSET -1 + /* Returns a string representation of the log severity */ const char *gpr_log_severity_string(gpr_log_severity severity); @@ -77,6 +80,11 @@ GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, GPRAPI void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message); +/* Set global log verbosity */ +GPRAPI void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print); + +GPRAPI void gpr_log_verbosity_init(); + /* Log overrides: applications can use this API to intercept logging calls and use their own implementations */ diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c index 04156a5b1fc..cdcd3770455 100644 --- a/src/core/lib/support/log.c +++ b/src/core/lib/support/log.c @@ -31,14 +31,20 @@ * */ +#include +#include #include #include +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" + #include #include extern void gpr_default_log(gpr_log_func_args *args); static gpr_log_func g_log_func = gpr_default_log; +static gpr_atm g_min_severity_to_print = GPR_LOG_VERBOSITY_UNSET; const char *gpr_log_severity_string(gpr_log_severity severity) { switch (severity) { @@ -54,6 +60,8 @@ const char *gpr_log_severity_string(gpr_log_severity severity) { void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message) { + if (severity < gpr_atm_acq_load(&g_min_severity_to_print)) return; + gpr_log_func_args lfargs; memset(&lfargs, 0, sizeof(lfargs)); lfargs.file = file; @@ -63,4 +71,26 @@ void gpr_log_message(const char *file, int line, gpr_log_severity severity, g_log_func(&lfargs); } +void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print) { + gpr_atm_rel_store(&g_min_severity_to_print, (gpr_atm)min_severity_to_print); +} + +void gpr_log_verbosity_init() { + char *verbosity = gpr_getenv("GRPC_VERBOSITY"); + if (verbosity == NULL) return; + + gpr_log_severity min_severity_to_print = GPR_LOG_VERBOSITY_UNSET; + if (strcmp(verbosity, "DEBUG") == 0) { + min_severity_to_print = GPR_LOG_SEVERITY_DEBUG; + } else if (strcmp(verbosity, "INFO") == 0) { + min_severity_to_print = GPR_LOG_SEVERITY_INFO; + } else if (strcmp(verbosity, "ERROR") == 0) { + min_severity_to_print = GPR_LOG_SEVERITY_ERROR; + } + gpr_free(verbosity); + if ((gpr_atm_acq_load(&g_min_severity_to_print)) == GPR_LOG_VERBOSITY_UNSET) { + gpr_atm_rel_store(&g_min_severity_to_print, (gpr_atm)min_severity_to_print); + } +} + void gpr_set_log_function(gpr_log_func f) { g_log_func = f; } diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index ec75af6e06f..d4eb2f8ddd9 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -38,6 +38,7 @@ #include #include +#include #include #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/compress_filter.h" @@ -69,6 +70,7 @@ static gpr_mu g_init_mu; static int g_initializations; static void do_basic_init(void) { + gpr_log_verbosity_init(); gpr_mu_init(&g_init_mu); grpc_register_built_in_plugins(); g_initializations = 0; diff --git a/test/core/support/log_test.c b/test/core/support/log_test.c index b39b0699134..0ae298aa4c0 100644 --- a/test/core/support/log_test.c +++ b/test/core/support/log_test.c @@ -33,16 +33,40 @@ #include +#include #include +#include "src/core/lib/support/env.h" #include "test/core/util/test_config.h" +static bool log_func_reached = false; + static void test_callback(gpr_log_func_args *args) { GPR_ASSERT(0 == strcmp(__FILE__, args->file)); GPR_ASSERT(args->severity == GPR_LOG_SEVERITY_INFO); GPR_ASSERT(0 == strcmp(args->message, "hello 1 2 3")); } +static void test_should_log(gpr_log_func_args *args) { + log_func_reached = true; +} + +static void test_should_not_log(gpr_log_func_args *args) { GPR_ASSERT(false); } + +#define test_log_function_reached(SEVERITY) \ + gpr_set_log_function(test_should_log); \ + log_func_reached = false; \ + gpr_log_message(SEVERITY, "hello 1 2 3"); \ + GPR_ASSERT(log_func_reached); \ + log_func_reached = false; \ + gpr_log(SEVERITY, "hello %d %d %d", 1, 2, 3); \ + GPR_ASSERT(log_func_reached); + +#define test_log_function_unreached(SEVERITY) \ + gpr_set_log_function(test_should_not_log); \ + gpr_log_message(SEVERITY, "hello 1 2 3"); \ + gpr_log(SEVERITY, "hello %d %d %d", 1, 2, 3); + int main(int argc, char **argv) { grpc_test_init(argc, argv); /* test logging at various verbosity levels */ @@ -54,6 +78,44 @@ int main(int argc, char **argv) { gpr_set_log_function(test_callback); gpr_log_message(GPR_INFO, "hello 1 2 3"); gpr_log(GPR_INFO, "hello %d %d %d", 1, 2, 3); + + /* gpr_log_verbosity_init() will be effective only once, and only before + * gpr_set_log_verbosity() is called */ + gpr_setenv("GRPC_VERBOSITY", "ERROR"); + gpr_log_verbosity_init(); + test_log_function_reached(GPR_ERROR); + test_log_function_unreached(GPR_INFO); + test_log_function_unreached(GPR_DEBUG); + + /* gpr_log_verbosity_init() should not be effective */ + gpr_setenv("GRPC_VERBOSITY", "DEBUG"); + gpr_log_verbosity_init(); + test_log_function_reached(GPR_ERROR); + test_log_function_unreached(GPR_INFO); + test_log_function_unreached(GPR_DEBUG); + + gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG); + test_log_function_reached(GPR_ERROR); + test_log_function_reached(GPR_INFO); + test_log_function_reached(GPR_DEBUG); + + gpr_set_log_verbosity(GPR_LOG_SEVERITY_INFO); + test_log_function_reached(GPR_ERROR); + test_log_function_reached(GPR_INFO); + test_log_function_unreached(GPR_DEBUG); + + gpr_set_log_verbosity(GPR_LOG_SEVERITY_ERROR); + test_log_function_reached(GPR_ERROR); + test_log_function_unreached(GPR_INFO); + test_log_function_unreached(GPR_DEBUG); + + /* gpr_log_verbosity_init() should not be effective */ + gpr_setenv("GRPC_VERBOSITY", "DEBUG"); + gpr_log_verbosity_init(); + test_log_function_reached(GPR_ERROR); + test_log_function_unreached(GPR_INFO); + test_log_function_unreached(GPR_DEBUG); + /* TODO(ctiller): should we add a GPR_ASSERT failure test here */ return 0; } From 4843b513c6036fbdb032fa84ecff37be4f43064e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 15 Apr 2016 13:43:39 -0700 Subject: [PATCH 46/93] populate metadata about jenkins build in benchmark results --- .../run_tests/performance/bq_upload_result.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tools/run_tests/performance/bq_upload_result.py b/tools/run_tests/performance/bq_upload_result.py index 0f53ba5d02d..ebd28f75918 100755 --- a/tools/run_tests/performance/bq_upload_result.py +++ b/tools/run_tests/performance/bq_upload_result.py @@ -31,9 +31,11 @@ # Uploads performance benchmark result file to bigquery. import argparse +import calendar import json import os import sys +import time import uuid @@ -60,6 +62,7 @@ def _upload_scenario_result_to_bigquery(dataset_id, table_id, result_file): def _insert_result(bq, dataset_id, table_id, scenario_result): _flatten_result_inplace(scenario_result) + _populate_metadata_inplace(scenario_result) row = big_query_utils.make_row(str(uuid.uuid4()), scenario_result) return big_query_utils.insert_rows(bq, _PROJECT_ID, @@ -90,6 +93,35 @@ def _flatten_result_inplace(scenario_result): scenario_result['serverCores'] = json.dumps(scenario_result['serverCores']) +def _populate_metadata_inplace(scenario_result): + """Populates metadata based on environment variables set by Jenkins.""" + # NOTE: Grabbing the Jenkins environment variables will only work if the + # driver is running locally on the same machine where Jenkins has started + # the job. For our setup, this is currently the case, so just assume that. + build_number = os.getenv('BUILD_NUMBER') + build_url = os.getenv('BUILD_URL') + job_name = os.getenv('JOB_NAME') + git_commit = os.getenv('GIT_COMMIT') + # actual commit is the actual head of PR that is getting tested + git_actual_commit = os.getenv('ghprbActualCommit') + + utc_timestamp = str(calendar.timegm(time.gmtime())) + metadata = {'created': utc_timestamp} + + if build_number: + metadata['buildNumber'] = build_number + if build_url: + metadata['buildUrl'] = build_url + if job_name: + metadata['jobName'] = job_name + if git_commit: + metadata['gitCommit'] = git_commit + if git_actual_commit: + metadata['gitActualCommit'] = git_actual_commit + + scenario_result['metadata'] = metadata + + argp = argparse.ArgumentParser(description='Upload result to big query.') argp.add_argument('--bq_result_table', required=True, default=None, type=str, help='Bigquery "dataset.table" to upload results to.') From 796cdc78eb67e0845ff90b8dd50ff3c3e2cc0212 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 15 Apr 2016 14:15:21 -0700 Subject: [PATCH 47/93] Expand corpus --- .../025215e11687c7d2e0055e5b2b902d08e0436f78 | Bin 0 -> 11 bytes .../02ba99615d1d69eb328adce99670f659959c1bc1 | Bin 0 -> 391 bytes .../0d8c547f1d261ba07c2648bae009636c17709600 | Bin 0 -> 167 bytes .../0fd8859246740606c498755ab00d6147abcfec00 | Bin 0 -> 378 bytes .../1f040e756f76357979f317e0c6541f72fd93df06 | Bin 0 -> 39 bytes .../20216d27af2b3dcc83d944e5f7a489ed2eff98fd | Bin 0 -> 157 bytes .../205cf2b6994f10b783aa0a06938a5e47cb581126 | Bin 0 -> 99 bytes .../2467fa0f8a9f4bd121f544892f0782498b2df533 | Bin 0 -> 422 bytes .../246dcf347eba7f4d4e04d97dabc002f0acf2164e | Bin 0 -> 50 bytes .../31545e9fe4c6aa43329dc0d4a735842574fcaaed | Bin 0 -> 21 bytes .../3336748264594689041e4080b51bc56f716d0689 | Bin 0 -> 58 bytes .../4a4553c2e939cd50981bc38e8ddb1f2109ddb3a4 | Bin 0 -> 444 bytes .../51c6c5297acebf9d21a8a7d6261d0a17c2adfb56 | Bin 0 -> 444 bytes .../57ee6efc38f4c544a3ea3e5e73987e825bdf2980 | Bin 0 -> 442 bytes .../5a2447fdfdbf123f4592c1284007b7d50a01750b | Bin 0 -> 287 bytes .../5ca233a53e3e425cc12e04b466a49789291eaa00 | Bin 0 -> 358 bytes .../605e474e9d9436488dfe084d348908e4dfab81a3 | Bin 0 -> 12 bytes .../611343a6b8879b393ba2f38ed41c7f5355355920 | Bin 0 -> 156 bytes .../64d27dc9f984c49d421a5b0cb0391992d5aac1a4 | Bin 0 -> 114 bytes .../6bfd3679f4e30aaaa1808e96c980edcfa9cac1c0 | Bin 0 -> 355 bytes .../9dfdce1b090a559a14f9a5852f78547413b1d1ed | Bin 0 -> 442 bytes .../a3cd54d43d3b3bdfcf224d636dc11ce1b5ee4d30 | Bin 0 -> 283 bytes .../baf7839388e10ff0c410a58797482cb83693b309 | Bin 0 -> 49 bytes .../c685689a9d5b259afe237d857b7c6551dc95c176 | Bin 0 -> 69 bytes .../ce990633c0f2b2a2ddb66144ed942d4bc9bcd8fb | Bin 0 -> 138 bytes .../d257c41db22b60cd937de16b9d90a44b9fa8e426 | Bin 0 -> 355 bytes .../d91281daad9b821294db204dfc244b2d0d5496e4 | Bin 0 -> 156 bytes .../dc815fd6d5e817898238481472f359bc50b510c4 | Bin 0 -> 359 bytes .../dd662353bad317cee7d16191a39e094bfa4898f2 | Bin 0 -> 165 bytes .../ec180175f0edea0a6c3eea2ae719b006bc029ff8 | Bin 0 -> 136 bytes .../ed6358fbe6721c9ac01a6f4cab4d2df377eb1f11 | Bin 0 -> 50 bytes .../ee436743977b8e31feec22a91b1ce23dee96665e | 1 + .../f9c875c00b7327df5bf21c3e051b55b0d2ed3cc8 | Bin 0 -> 188 bytes tools/run_tests/tests.json | 1004 ++++++++++++++--- 34 files changed, 866 insertions(+), 139 deletions(-) create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/025215e11687c7d2e0055e5b2b902d08e0436f78 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/02ba99615d1d69eb328adce99670f659959c1bc1 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/0d8c547f1d261ba07c2648bae009636c17709600 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/0fd8859246740606c498755ab00d6147abcfec00 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/1f040e756f76357979f317e0c6541f72fd93df06 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/20216d27af2b3dcc83d944e5f7a489ed2eff98fd create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/205cf2b6994f10b783aa0a06938a5e47cb581126 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/2467fa0f8a9f4bd121f544892f0782498b2df533 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/246dcf347eba7f4d4e04d97dabc002f0acf2164e create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/31545e9fe4c6aa43329dc0d4a735842574fcaaed create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/3336748264594689041e4080b51bc56f716d0689 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/4a4553c2e939cd50981bc38e8ddb1f2109ddb3a4 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/51c6c5297acebf9d21a8a7d6261d0a17c2adfb56 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/57ee6efc38f4c544a3ea3e5e73987e825bdf2980 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/5a2447fdfdbf123f4592c1284007b7d50a01750b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/5ca233a53e3e425cc12e04b466a49789291eaa00 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/605e474e9d9436488dfe084d348908e4dfab81a3 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/611343a6b8879b393ba2f38ed41c7f5355355920 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/64d27dc9f984c49d421a5b0cb0391992d5aac1a4 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/6bfd3679f4e30aaaa1808e96c980edcfa9cac1c0 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/9dfdce1b090a559a14f9a5852f78547413b1d1ed create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/a3cd54d43d3b3bdfcf224d636dc11ce1b5ee4d30 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/baf7839388e10ff0c410a58797482cb83693b309 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/c685689a9d5b259afe237d857b7c6551dc95c176 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/ce990633c0f2b2a2ddb66144ed942d4bc9bcd8fb create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/d257c41db22b60cd937de16b9d90a44b9fa8e426 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/d91281daad9b821294db204dfc244b2d0d5496e4 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/dc815fd6d5e817898238481472f359bc50b510c4 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/dd662353bad317cee7d16191a39e094bfa4898f2 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/ec180175f0edea0a6c3eea2ae719b006bc029ff8 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/ed6358fbe6721c9ac01a6f4cab4d2df377eb1f11 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/ee436743977b8e31feec22a91b1ce23dee96665e create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/f9c875c00b7327df5bf21c3e051b55b0d2ed3cc8 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/025215e11687c7d2e0055e5b2b902d08e0436f78 b/test/core/end2end/fuzzers/client_fuzzer_corpus/025215e11687c7d2e0055e5b2b902d08e0436f78 new file mode 100644 index 0000000000000000000000000000000000000000..bd442b3beea01f555ca1c55a4e15243c2e6ee19b GIT binary patch literal 11 ScmZQzU}R)xU|?XJ{~rJXjRC0u literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/02ba99615d1d69eb328adce99670f659959c1bc1 b/test/core/end2end/fuzzers/client_fuzzer_corpus/02ba99615d1d69eb328adce99670f659959c1bc1 new file mode 100644 index 0000000000000000000000000000000000000000..6eae44de51331d2c0eb98cf67a3ee167764e3307 GIT binary patch literal 391 zcmZ{gyAi@b3`9?i1BQ$aP-ILA5I_YR&;bRg3L5YRW=u#(ca*^Dj0X}lb3f_c-s(1S zFb*j6V{fG;w|Cr1DUE5G!b*gP8wS!DPM~GCdy)@+Q&{M>$Fk5o!s_ISRKgEo{Q$Q3 zh@LDa)hoT@8b3<^#3|in;%RNh|C*{E_4;g?@aP(~A^%_3dW))Pyhioa5h9=+FlH@P pYR9#`%-1wwb{0jfco9;mRNXVC?;-XnGDlL{E2qnfM5l8uz#ES4etQ4_ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/0d8c547f1d261ba07c2648bae009636c17709600 b/test/core/end2end/fuzzers/client_fuzzer_corpus/0d8c547f1d261ba07c2648bae009636c17709600 new file mode 100644 index 0000000000000000000000000000000000000000..07d6767502d73d579932743642f662ae9b963698 GIT binary patch literal 167 zcmYL?!41Mt3_~4S3D$5q6c_<^$N=o%K{)#G2j~r!U^U2Z4^@=tS&?lZ;s_vKz&K2u zYH{9RTtz_QTa0WrEjn}d_4X@7>Iro=`Q^2@XoJ N9%lR5dr7eu`~gL6DxUxV literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/0fd8859246740606c498755ab00d6147abcfec00 b/test/core/end2end/fuzzers/client_fuzzer_corpus/0fd8859246740606c498755ab00d6147abcfec00 new file mode 100644 index 0000000000000000000000000000000000000000..88c3f427d1cf52254a036d9853036be8b1df4b32 GIT binary patch literal 378 zcmZ8d!A%1}3>+sXkv0Y%$E5_2Qi2Oe4=#jPWTcb$@*__gpr#Z+v>D$WiO6c#Ua!65 z83Wx0T83S@Q&(0|1aYX#aw5XwopfN#Z)Pyv`y95%%+G9N=KKa7FcDHk?;4a?D=vlo&3svlU8qlL%J znAn3aC55G6gEUI&WLRwel;U^TDq3WEI%DWWOmnyq5rwSnPMMSZkX}O)zeb_AHsM1b EFRg=UmjD0& literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/1f040e756f76357979f317e0c6541f72fd93df06 b/test/core/end2end/fuzzers/client_fuzzer_corpus/1f040e756f76357979f317e0c6541f72fd93df06 new file mode 100644 index 0000000000000000000000000000000000000000..0a2a1b3953bae4f5be7972e380f0ebdf82f423ad GIT binary patch literal 39 vcmZQzU}4N=U|?WWRGg?dF*lcU;>0+`seTjx`>9X#o5;Xmr8#k;pPwH9xK0Z~ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/20216d27af2b3dcc83d944e5f7a489ed2eff98fd b/test/core/end2end/fuzzers/client_fuzzer_corpus/20216d27af2b3dcc83d944e5f7a489ed2eff98fd new file mode 100644 index 0000000000000000000000000000000000000000..f79cdf251c62b0cf874859e24deb4d9a1600289f GIT binary patch literal 157 zcmYLC!41Md40Gr`DlvuWqreDshYY|D9>$LwpwBMBY~(#94?Edq40$vD_J(T+B8c00B$B?snc$7Ug!$B#=;z*hB I3vtzsH*Pp5fB*mh literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/205cf2b6994f10b783aa0a06938a5e47cb581126 b/test/core/end2end/fuzzers/client_fuzzer_corpus/205cf2b6994f10b783aa0a06938a5e47cb581126 new file mode 100644 index 0000000000000000000000000000000000000000..eafa9e1b850ee08e4dffc98b7a6397d580f40612 GIT binary patch literal 99 zcmZQzU}0ooU|?VbBLs(GK2StaaiSsv!^GTNP7TKY6DP(gPW7Ak-%owwM4$$Il2)1% MfoP(ipC1SV094c%3IG5A literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/2467fa0f8a9f4bd121f544892f0782498b2df533 b/test/core/end2end/fuzzers/client_fuzzer_corpus/2467fa0f8a9f4bd121f544892f0782498b2df533 new file mode 100644 index 0000000000000000000000000000000000000000..0ee6efab9dc240532d4e55aedbc6aa7c8c35c469 GIT binary patch literal 422 zcma)%!41Md3n5bdzLCM(kM*H}XnZJDClZ&e()#vUmOB#EJ~}x&cjrHvBSn zPNHgRW_T@K^;YD!aj2=970^$TiR8Nd5TGy=6;crwy@>fx8CxFH)|#sy<>wIpp#n(O KkRj23XU7wq;fvh> literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/246dcf347eba7f4d4e04d97dabc002f0acf2164e b/test/core/end2end/fuzzers/client_fuzzer_corpus/246dcf347eba7f4d4e04d97dabc002f0acf2164e new file mode 100644 index 0000000000000000000000000000000000000000..eb0195382bd26e89f153a118da8690341ec1873a GIT binary patch literal 50 zcmZQzU}0ooU|?Vb;`u;AQE{Ro1H;7JTuu$f{}U(1DNgm9_}@=`;zR}pE6s@${rvm@ D+I9?8 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/31545e9fe4c6aa43329dc0d4a735842574fcaaed b/test/core/end2end/fuzzers/client_fuzzer_corpus/31545e9fe4c6aa43329dc0d4a735842574fcaaed new file mode 100644 index 0000000000000000000000000000000000000000..a505a18e01f95ece1d11c79b3606aaf425654f09 GIT binary patch literal 21 dcmY%R&uBeys-NOSd-Vy-44M-s`pxw70{~Gg2T1?` literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/3336748264594689041e4080b51bc56f716d0689 b/test/core/end2end/fuzzers/client_fuzzer_corpus/3336748264594689041e4080b51bc56f716d0689 new file mode 100644 index 0000000000000000000000000000000000000000..d3eb5f7d7d61025b65c4043897f65fb8d13a21ce GIT binary patch literal 58 zcmZQzU}0ooU|?Vb;`tx~1c0=n;zUIThKaekoEnV(Cr*r0oa#66zn}WVi3|)@niD7b H`S}3=-}4Ms literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/4a4553c2e939cd50981bc38e8ddb1f2109ddb3a4 b/test/core/end2end/fuzzers/client_fuzzer_corpus/4a4553c2e939cd50981bc38e8ddb1f2109ddb3a4 new file mode 100644 index 0000000000000000000000000000000000000000..ba96c6469110d3ad935f159b354c71d01d05fcfb GIT binary patch literal 444 zcmbVI!3~2j40M1;)h+x&FhaXQAKsw@c$VraA@SwOvzxI&drlCvJZmXVbh)$77FimJ zNaC*Yh{t-|J^54BLN3r7L?^%8qL?3yMu?!Nv)}?=~jej5RzK&b~ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/51c6c5297acebf9d21a8a7d6261d0a17c2adfb56 b/test/core/end2end/fuzzers/client_fuzzer_corpus/51c6c5297acebf9d21a8a7d6261d0a17c2adfb56 new file mode 100644 index 0000000000000000000000000000000000000000..efb8e23b36ff3ca67e26f88e8d673b587077618b GIT binary patch literal 444 zcmaJ-%MHRX40TEmh%J1o(h*<>@4x__1wEuny>jf4&AI_RH=#w9z-rROvERocb1M-^ z+*NLIsLS1x-&IXyz*FH0vktkRfCpX!P;z1oOZaAEry_*IVMTOJwpK>>#NI7o&BCXC z6eK0#vT3w@_<%l>sa#>|xg{vIY$$|9d}ge(ng0yiGsA~Vg0Uc^QY$+`5ECa{Bh3|Y tj*SM|m_&(XID5c4h>&4L9o>lh^OAd#)Ui>J&wj$Qx& literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/57ee6efc38f4c544a3ea3e5e73987e825bdf2980 b/test/core/end2end/fuzzers/client_fuzzer_corpus/57ee6efc38f4c544a3ea3e5e73987e825bdf2980 new file mode 100644 index 0000000000000000000000000000000000000000..44854ee462b23d54521234359e2475589f693fad GIT binary patch literal 442 zcmb_Y$qm9l4D>=Ch%Wq!LJ82r^gscw1r1W9e0kSl70xi4CNWS>#$r>{pRH7V)*3AURhDJ2_*K$!<{xk+zF?0Fgetq>|mp;D@jl%v3z_YCW%UDHWa flY6K(uVxRptRZEfiv8Oxb&jD9lDdAl7Aobw!`zNt literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/5a2447fdfdbf123f4592c1284007b7d50a01750b b/test/core/end2end/fuzzers/client_fuzzer_corpus/5a2447fdfdbf123f4592c1284007b7d50a01750b new file mode 100644 index 0000000000000000000000000000000000000000..2089c4997aca0fae9b4db2e665b29fc7c97de3c7 GIT binary patch literal 287 zcmZur!41Md47(tN5HC6b%Imm}KzHyC43H_9z>kyo@?(p%p}l%M^ZWDol?5BAe!iyS3z_3W4$Saw9QEq z9df^if@LNWtLMsZ!MhILb3sbwNE9(RDqAl*YhA}b>P4(T&nlV)gHD7)I6)X#lQG=s m6cAz-qn;O!Vgl_NSLL6u$Z!D`Qv@DH-#e4|p-}gw_D3Iu&SX;n literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/605e474e9d9436488dfe084d348908e4dfab81a3 b/test/core/end2end/fuzzers/client_fuzzer_corpus/605e474e9d9436488dfe084d348908e4dfab81a3 new file mode 100644 index 0000000000000000000000000000000000000000..d561e8682ee104ef49b1ba0e44be8725e9858727 GIT binary patch literal 12 NcmZQzVBuhZ0ssJf01W^D literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/611343a6b8879b393ba2f38ed41c7f5355355920 b/test/core/end2end/fuzzers/client_fuzzer_corpus/611343a6b8879b393ba2f38ed41c7f5355355920 new file mode 100644 index 0000000000000000000000000000000000000000..3c9af3d9fdefed575c99d96189bb6e0c6eeeaca5 GIT binary patch literal 156 zcmYLC!4U#M2n*gmu8rv9)DpA@3b2P1lgActPn)ndLB|mWhLA}DjO7R*YSz>D7!B$p zQH-26Ejn}a<@zjiS9s>xTLQcPd>()oLgWmkKDq%C5AfDppWfA2WA5^QlSD=qzu7#zQ7Cj?Q>q{ZFaJ$3i)H1 pjil2JtK^~!=+qB~wCkTxM->WNNC{?BJkLnd+uS7*5}>fb_yF=AD}Mk0 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/6bfd3679f4e30aaaa1808e96c980edcfa9cac1c0 b/test/core/end2end/fuzzers/client_fuzzer_corpus/6bfd3679f4e30aaaa1808e96c980edcfa9cac1c0 new file mode 100644 index 0000000000000000000000000000000000000000..928473a378524844e65e96ff07e368e04374984a GIT binary patch literal 355 zcmYjN!41MN478yVta0!tWdzv41F(Y!;e`&V5?_AsWC3M80#t8QNWLJopmHiBed s3N`vvL_k`Z+Kl|GPlGpAc#1EWOw?$|m}ZF3#oo~Jf70B*9IWx^1Miw+vj6}9 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/9dfdce1b090a559a14f9a5852f78547413b1d1ed b/test/core/end2end/fuzzers/client_fuzzer_corpus/9dfdce1b090a559a14f9a5852f78547413b1d1ed new file mode 100644 index 0000000000000000000000000000000000000000..7b32feee018d92977ca9797f5decf06e615fa81a GIT binary patch literal 442 zcmb_Y$qm9l4D>=Ch%Wq!LJ82r^gscw1r1W9eDmZ(Js>!zL4NmQ4M dsP^5>7O?FhWuS`v+bngCsSc95ez+QyavynWjh6rb literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/a3cd54d43d3b3bdfcf224d636dc11ce1b5ee4d30 b/test/core/end2end/fuzzers/client_fuzzer_corpus/a3cd54d43d3b3bdfcf224d636dc11ce1b5ee4d30 new file mode 100644 index 0000000000000000000000000000000000000000..19ca73971cc9a2f0468dc206ddb3cec15bf331bf GIT binary patch literal 283 zcmZ{fu?+$-5CqT2!9zd~7d=l26tN||M2rqvpoI-AkrL7!9l+iT>mvfMY~Sr@*Q}O{ znH6_BBeu*(O}Y1xMR<5YJLHNJ7&#qZc?Ev91RY65t z8NyPNJaHS8=`W~z_IMMVF-c`pG~kh#jHo)l;60^fF;(l0=nec_M>)+-*zruZ%pelK DD;QT@ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/baf7839388e10ff0c410a58797482cb83693b309 b/test/core/end2end/fuzzers/client_fuzzer_corpus/baf7839388e10ff0c410a58797482cb83693b309 new file mode 100644 index 0000000000000000000000000000000000000000..5f51d62ccdd0970ba6d2ba4645f7d69f12f9035d GIT binary patch literal 49 zcmZQzU}0ooU|?VbBL+pqiHZyi6LWJpH5mU-oEWD#)oJg48(lWONcR20V^;>Mqq;<<_cJQ5Ci>E8pikvvO#|6u`2b;uBTE1P literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/d257c41db22b60cd937de16b9d90a44b9fa8e426 b/test/core/end2end/fuzzers/client_fuzzer_corpus/d257c41db22b60cd937de16b9d90a44b9fa8e426 new file mode 100644 index 0000000000000000000000000000000000000000..975530c26df39c4c919c115913cdc3360314a972 GIT binary patch literal 355 zcmYjN!A%1(5Zp~pf;J{Rj-!Oo!xoSpwh&%ukSy`#N1il54|I|SqGR@a;jrxW+B=?^ zwb^B`8g7}e*Gl?2W~S#G5N3^EV1f}Nr>8Ud!MU+tS?q+k&hz{}!fau4zblp(9ruTo z&mMX*lt7pJOn5Y|M8W-EWhwmJ3KBg_azpL}#A*f4>1^@HQ8xaALa1-^1e#}Lmw}xO w$La&ces6TO=}_ZSW8 zBTS~d&+mn3 zXvjw(SqtdmQCT7qsWU>GN literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/dd662353bad317cee7d16191a39e094bfa4898f2 b/test/core/end2end/fuzzers/client_fuzzer_corpus/dd662353bad317cee7d16191a39e094bfa4898f2 new file mode 100644 index 0000000000000000000000000000000000000000..2683cbb756e5ee29cdfad557ba705c03ced281ff GIT binary patch literal 165 zcmXXJQ5Ci>E8pikvvOGyYVex$bA6HY!&- GT)hGPggU7J literal 0 HcmV?d00001 diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index ad03f16420c..ec2832cf7f0 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -22412,7 +22412,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/03abf728ac1d833c2d4a9ff7e0c912b949edc04c" + "test/core/end2end/fuzzers/client_fuzzer_corpus/025215e11687c7d2e0055e5b2b902d08e0436f78" ], "ci_platforms": [ "linux", @@ -22434,7 +22434,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/078232947d7ff25557e836b4e9e907214e99b320" + "test/core/end2end/fuzzers/client_fuzzer_corpus/02ba99615d1d69eb328adce99670f659959c1bc1" ], "ci_platforms": [ "linux", @@ -22456,7 +22456,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/0949f4ac376808482be6ab2dcb18a2ecb08d9a52" + "test/core/end2end/fuzzers/client_fuzzer_corpus/03abf728ac1d833c2d4a9ff7e0c912b949edc04c" ], "ci_platforms": [ "linux", @@ -22478,7 +22478,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/0c5e0660ddf5f14af8f3fbcc754a967506994c9b" + "test/core/end2end/fuzzers/client_fuzzer_corpus/078232947d7ff25557e836b4e9e907214e99b320" ], "ci_platforms": [ "linux", @@ -22500,7 +22500,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/0d36da88698737ec1ca7b55b30fe2b2036de7e19" + "test/core/end2end/fuzzers/client_fuzzer_corpus/0949f4ac376808482be6ab2dcb18a2ecb08d9a52" ], "ci_platforms": [ "linux", @@ -22522,7 +22522,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/0dd33527db106a3e84172e8f2189734b00ced4ed" + "test/core/end2end/fuzzers/client_fuzzer_corpus/0c5e0660ddf5f14af8f3fbcc754a967506994c9b" ], "ci_platforms": [ "linux", @@ -22544,7 +22544,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/0e354d89d02c6c5cbba2f140dab7b609bf00793e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/0d36da88698737ec1ca7b55b30fe2b2036de7e19" ], "ci_platforms": [ "linux", @@ -22566,7 +22566,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/1402bbcac6fa24eeb0475250e33f704096e2fb45" + "test/core/end2end/fuzzers/client_fuzzer_corpus/0d8c547f1d261ba07c2648bae009636c17709600" ], "ci_platforms": [ "linux", @@ -22588,7 +22588,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/1602788cf33d0354d6d48ead549e5137cd211979" + "test/core/end2end/fuzzers/client_fuzzer_corpus/0dd33527db106a3e84172e8f2189734b00ced4ed" ], "ci_platforms": [ "linux", @@ -22610,7 +22610,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/18185cbf9e9cfc1fd28d27ed0d651d7cee6a2c06" + "test/core/end2end/fuzzers/client_fuzzer_corpus/0e354d89d02c6c5cbba2f140dab7b609bf00793e" ], "ci_platforms": [ "linux", @@ -22632,7 +22632,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/18850965807039500c7f5450a907e86825cf823d" + "test/core/end2end/fuzzers/client_fuzzer_corpus/0fd8859246740606c498755ab00d6147abcfec00" ], "ci_platforms": [ "linux", @@ -22654,7 +22654,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/18926cdc608599e8df6b0f4df99d4ad856ef4373" + "test/core/end2end/fuzzers/client_fuzzer_corpus/1402bbcac6fa24eeb0475250e33f704096e2fb45" ], "ci_platforms": [ "linux", @@ -22676,7 +22676,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/19e984af62c36fe982284c87421d8ee46173e9f0" + "test/core/end2end/fuzzers/client_fuzzer_corpus/1602788cf33d0354d6d48ead549e5137cd211979" ], "ci_platforms": [ "linux", @@ -22698,7 +22698,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/1c222dae4e2cde1fca9f9bf6226200f70d625342" + "test/core/end2end/fuzzers/client_fuzzer_corpus/18185cbf9e9cfc1fd28d27ed0d651d7cee6a2c06" ], "ci_platforms": [ "linux", @@ -22720,7 +22720,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/1cbcaad71950c62d41bab50f9c242d014cc0d904" + "test/core/end2end/fuzzers/client_fuzzer_corpus/18850965807039500c7f5450a907e86825cf823d" ], "ci_platforms": [ "linux", @@ -22742,7 +22742,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/1d19042e6db2a90c52fcc3cb0aa76f2fd335014e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/18926cdc608599e8df6b0f4df99d4ad856ef4373" ], "ci_platforms": [ "linux", @@ -22764,7 +22764,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/1fe7d16ffc2084d5d3c5f23d16902ae8810a5393" + "test/core/end2end/fuzzers/client_fuzzer_corpus/19e984af62c36fe982284c87421d8ee46173e9f0" ], "ci_platforms": [ "linux", @@ -22786,7 +22786,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/20539e464ced1a0a63d74bae731ca0a75db05967" + "test/core/end2end/fuzzers/client_fuzzer_corpus/1c222dae4e2cde1fca9f9bf6226200f70d625342" ], "ci_platforms": [ "linux", @@ -22808,7 +22808,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/207e12d6a84dc8fa020b3a60b3f75932ca4f8fa5" + "test/core/end2end/fuzzers/client_fuzzer_corpus/1cbcaad71950c62d41bab50f9c242d014cc0d904" ], "ci_platforms": [ "linux", @@ -22830,7 +22830,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/20ea73876cc9cd5b3d3efa1bda21deb5eac2d61e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/1d19042e6db2a90c52fcc3cb0aa76f2fd335014e" ], "ci_platforms": [ "linux", @@ -22852,7 +22852,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/21a6a133f3d1e06c077032ba56a7df4161f62efe" + "test/core/end2end/fuzzers/client_fuzzer_corpus/1f040e756f76357979f317e0c6541f72fd93df06" ], "ci_platforms": [ "linux", @@ -22874,7 +22874,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/230527b90b0179139c961aca426187893191fdf2" + "test/core/end2end/fuzzers/client_fuzzer_corpus/1fe7d16ffc2084d5d3c5f23d16902ae8810a5393" ], "ci_platforms": [ "linux", @@ -22896,7 +22896,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/25761748660a64111a8daa46f72ea1f336c2046a" + "test/core/end2end/fuzzers/client_fuzzer_corpus/20216d27af2b3dcc83d944e5f7a489ed2eff98fd" ], "ci_platforms": [ "linux", @@ -22918,7 +22918,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/25949b623930511f9d43fea4aa56a4389a28e11a" + "test/core/end2end/fuzzers/client_fuzzer_corpus/20539e464ced1a0a63d74bae731ca0a75db05967" ], "ci_platforms": [ "linux", @@ -22940,7 +22940,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/26b8a9d27cef1ce4c3c5aefa2dee50001aab4b13" + "test/core/end2end/fuzzers/client_fuzzer_corpus/205cf2b6994f10b783aa0a06938a5e47cb581126" ], "ci_platforms": [ "linux", @@ -22962,7 +22962,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/29952a15459cce9c647255ab5d7486df0507eff4" + "test/core/end2end/fuzzers/client_fuzzer_corpus/207e12d6a84dc8fa020b3a60b3f75932ca4f8fa5" ], "ci_platforms": [ "linux", @@ -22984,7 +22984,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2a8260b23460f90f770cedcafa14868d24db201e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/20ea73876cc9cd5b3d3efa1bda21deb5eac2d61e" ], "ci_platforms": [ "linux", @@ -23006,7 +23006,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2b71439e9ebf611a92386b9f21ad44bde7926184" + "test/core/end2end/fuzzers/client_fuzzer_corpus/21a6a133f3d1e06c077032ba56a7df4161f62efe" ], "ci_platforms": [ "linux", @@ -23028,7 +23028,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2c342f8715556398d49bcf3343b5a249d968e19e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/230527b90b0179139c961aca426187893191fdf2" ], "ci_platforms": [ "linux", @@ -23050,7 +23050,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2c79128c697b53256c56b9c57c7259866e0e2347" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2467fa0f8a9f4bd121f544892f0782498b2df533" ], "ci_platforms": [ "linux", @@ -23072,7 +23072,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2d83097b3cbd2245b085e749fe923fb590790e0c" + "test/core/end2end/fuzzers/client_fuzzer_corpus/246dcf347eba7f4d4e04d97dabc002f0acf2164e" ], "ci_platforms": [ "linux", @@ -23094,7 +23094,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2deb1aeb93c2abca4177b1fe886eb354c83fe8af" + "test/core/end2end/fuzzers/client_fuzzer_corpus/25761748660a64111a8daa46f72ea1f336c2046a" ], "ci_platforms": [ "linux", @@ -23116,7 +23116,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2e9860242d55a74cec244bb5c5445eb2797a3157" + "test/core/end2end/fuzzers/client_fuzzer_corpus/25949b623930511f9d43fea4aa56a4389a28e11a" ], "ci_platforms": [ "linux", @@ -23138,7 +23138,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2f288409c5f3cf2a10b3e1970a9c3d037dabe080" + "test/core/end2end/fuzzers/client_fuzzer_corpus/26b8a9d27cef1ce4c3c5aefa2dee50001aab4b13" ], "ci_platforms": [ "linux", @@ -23160,7 +23160,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/2f5f6d281a3d0473a04a17cbcbc6fd06cb73fd8b" + "test/core/end2end/fuzzers/client_fuzzer_corpus/29952a15459cce9c647255ab5d7486df0507eff4" ], "ci_platforms": [ "linux", @@ -23182,7 +23182,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/301e10bb6d9f60d91efde4e0c48893203a5b8b88" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2a8260b23460f90f770cedcafa14868d24db201e" ], "ci_platforms": [ "linux", @@ -23204,7 +23204,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/3128887b8e02f1873ed6b36766a870543269ea00" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2b71439e9ebf611a92386b9f21ad44bde7926184" ], "ci_platforms": [ "linux", @@ -23226,7 +23226,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/31d12a2b1378120d15b4097371d792daa95de0a9" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2c342f8715556398d49bcf3343b5a249d968e19e" ], "ci_platforms": [ "linux", @@ -23248,7 +23248,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/320dc10f64b59b0eb0ae140912eded1ef9276556" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2c79128c697b53256c56b9c57c7259866e0e2347" ], "ci_platforms": [ "linux", @@ -23270,7 +23270,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/333d0554d91872e693d118d6988132d95b7920ae" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2d83097b3cbd2245b085e749fe923fb590790e0c" ], "ci_platforms": [ "linux", @@ -23292,7 +23292,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/33c32a80db0ec311ee8744991c5b19345bfd8fe9" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2deb1aeb93c2abca4177b1fe886eb354c83fe8af" ], "ci_platforms": [ "linux", @@ -23314,7 +23314,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/35fbd748458e3fd6068957d46a9fbb2b0113d2b3" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2e9860242d55a74cec244bb5c5445eb2797a3157" ], "ci_platforms": [ "linux", @@ -23336,7 +23336,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/370b2c16cc353621091eda4964d4c4329205ffc3" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2f288409c5f3cf2a10b3e1970a9c3d037dabe080" ], "ci_platforms": [ "linux", @@ -23358,7 +23358,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/379b177d55b1eb86ddb66dc3a037fd8283ee07c0" + "test/core/end2end/fuzzers/client_fuzzer_corpus/2f5f6d281a3d0473a04a17cbcbc6fd06cb73fd8b" ], "ci_platforms": [ "linux", @@ -23380,7 +23380,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/3a01c85934363bd2067f76d0d40c491f9f846c8a" + "test/core/end2end/fuzzers/client_fuzzer_corpus/301e10bb6d9f60d91efde4e0c48893203a5b8b88" ], "ci_platforms": [ "linux", @@ -23402,7 +23402,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/3ae87e3150628c422ada13002b08f2d9c5a9d78e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/3128887b8e02f1873ed6b36766a870543269ea00" ], "ci_platforms": [ "linux", @@ -23424,7 +23424,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/3afbc4c35885b79c6e6628afce93ce852d7767de" + "test/core/end2end/fuzzers/client_fuzzer_corpus/31545e9fe4c6aa43329dc0d4a735842574fcaaed" ], "ci_platforms": [ "linux", @@ -23446,7 +23446,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/3c7b516e302ad3503a933b5dcfb8c58acaea07a0" + "test/core/end2end/fuzzers/client_fuzzer_corpus/31d12a2b1378120d15b4097371d792daa95de0a9" ], "ci_platforms": [ "linux", @@ -23468,7 +23468,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/3da7577acd806e1d92d48211b22fd9db352fd834" + "test/core/end2end/fuzzers/client_fuzzer_corpus/320dc10f64b59b0eb0ae140912eded1ef9276556" ], "ci_platforms": [ "linux", @@ -23490,7 +23490,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/3fcc2da89f438b247cb5b4b41e15aceccfa75b36" + "test/core/end2end/fuzzers/client_fuzzer_corpus/3336748264594689041e4080b51bc56f716d0689" ], "ci_platforms": [ "linux", @@ -23512,7 +23512,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/4040224f3df361afe45bce682d56d26f13829413" + "test/core/end2end/fuzzers/client_fuzzer_corpus/333d0554d91872e693d118d6988132d95b7920ae" ], "ci_platforms": [ "linux", @@ -23534,7 +23534,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/41aad2f11a7ab418213352e84de872d9997db8d2" + "test/core/end2end/fuzzers/client_fuzzer_corpus/33c32a80db0ec311ee8744991c5b19345bfd8fe9" ], "ci_platforms": [ "linux", @@ -23556,7 +23556,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/42554ddbe59429d30d718282ca606ed8b5a90eb3" + "test/core/end2end/fuzzers/client_fuzzer_corpus/35fbd748458e3fd6068957d46a9fbb2b0113d2b3" ], "ci_platforms": [ "linux", @@ -23578,7 +23578,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/43202ad9b1a689d919ab9ae91c2d0223394867bf" + "test/core/end2end/fuzzers/client_fuzzer_corpus/370b2c16cc353621091eda4964d4c4329205ffc3" ], "ci_platforms": [ "linux", @@ -23600,7 +23600,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/44d64196fb2e8d9506734a81304f6ef17b9bc29d" + "test/core/end2end/fuzzers/client_fuzzer_corpus/379b177d55b1eb86ddb66dc3a037fd8283ee07c0" ], "ci_platforms": [ "linux", @@ -23622,7 +23622,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/44f0973ec77d6fb9eac931e84fa7ec6fdadccca6" + "test/core/end2end/fuzzers/client_fuzzer_corpus/3a01c85934363bd2067f76d0d40c491f9f846c8a" ], "ci_platforms": [ "linux", @@ -23644,7 +23644,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/450f9f56c80c8b71e37302a254ba7c3f7298dfd7" + "test/core/end2end/fuzzers/client_fuzzer_corpus/3ae87e3150628c422ada13002b08f2d9c5a9d78e" ], "ci_platforms": [ "linux", @@ -23666,7 +23666,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/46dcb1c399e5a514267fbbd5a50939f34e0ad6be" + "test/core/end2end/fuzzers/client_fuzzer_corpus/3afbc4c35885b79c6e6628afce93ce852d7767de" ], "ci_platforms": [ "linux", @@ -23688,7 +23688,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/489e9830136adcc53f4b191199c33504685b3737" + "test/core/end2end/fuzzers/client_fuzzer_corpus/3c7b516e302ad3503a933b5dcfb8c58acaea07a0" ], "ci_platforms": [ "linux", @@ -23710,7 +23710,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/4e21c4b5c454df51c102f09ea1ba78c42133ee16" + "test/core/end2end/fuzzers/client_fuzzer_corpus/3da7577acd806e1d92d48211b22fd9db352fd834" ], "ci_platforms": [ "linux", @@ -23732,7 +23732,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/4eaff3c3515a1ca019d46b9be0b7318eaffb63d1" + "test/core/end2end/fuzzers/client_fuzzer_corpus/3fcc2da89f438b247cb5b4b41e15aceccfa75b36" ], "ci_platforms": [ "linux", @@ -23754,7 +23754,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/4ec113a0126fc5746fa3f955727d009040e8377f" + "test/core/end2end/fuzzers/client_fuzzer_corpus/4040224f3df361afe45bce682d56d26f13829413" ], "ci_platforms": [ "linux", @@ -23776,7 +23776,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/52c00bde7f4af95a86deb0a6717d1faf2828a939" + "test/core/end2end/fuzzers/client_fuzzer_corpus/41aad2f11a7ab418213352e84de872d9997db8d2" ], "ci_platforms": [ "linux", @@ -23798,7 +23798,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/54e67ed1036f3f5b315e0e3c02948c30eba900fd" + "test/core/end2end/fuzzers/client_fuzzer_corpus/42554ddbe59429d30d718282ca606ed8b5a90eb3" ], "ci_platforms": [ "linux", @@ -23820,7 +23820,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/55ca8f6d9928c239a7abb32554463e6e1e1ee084" + "test/core/end2end/fuzzers/client_fuzzer_corpus/43202ad9b1a689d919ab9ae91c2d0223394867bf" ], "ci_platforms": [ "linux", @@ -23842,7 +23842,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/570ca8d2555dde94aa3b3121e8f5256e83eabe5e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/44d64196fb2e8d9506734a81304f6ef17b9bc29d" ], "ci_platforms": [ "linux", @@ -23864,7 +23864,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/58a067ec6eda7191a5a910d8120633271d3af074" + "test/core/end2end/fuzzers/client_fuzzer_corpus/44f0973ec77d6fb9eac931e84fa7ec6fdadccca6" ], "ci_platforms": [ "linux", @@ -23886,7 +23886,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/591ef436ef8cc982b48fd827a4555b57cd9780e5" + "test/core/end2end/fuzzers/client_fuzzer_corpus/450f9f56c80c8b71e37302a254ba7c3f7298dfd7" ], "ci_platforms": [ "linux", @@ -23908,7 +23908,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/5e1659e7cd840ab3f958273ebffdd215f2c81da6" + "test/core/end2end/fuzzers/client_fuzzer_corpus/46dcb1c399e5a514267fbbd5a50939f34e0ad6be" ], "ci_platforms": [ "linux", @@ -23930,7 +23930,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/6066fc9e28b4ce704230f0e8cf21e7c3195aa2a3" + "test/core/end2end/fuzzers/client_fuzzer_corpus/489e9830136adcc53f4b191199c33504685b3737" ], "ci_platforms": [ "linux", @@ -23952,7 +23952,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/607dac8012f188cb035b189fc3637028137023e0" + "test/core/end2end/fuzzers/client_fuzzer_corpus/4a4553c2e939cd50981bc38e8ddb1f2109ddb3a4" ], "ci_platforms": [ "linux", @@ -23974,7 +23974,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/62c843359941660da3fc9eea62a5732aaa3be283" + "test/core/end2end/fuzzers/client_fuzzer_corpus/4e21c4b5c454df51c102f09ea1ba78c42133ee16" ], "ci_platforms": [ "linux", @@ -23996,7 +23996,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/64696e93ead18265cdac3fb37dae29ad3be6d764" + "test/core/end2end/fuzzers/client_fuzzer_corpus/4eaff3c3515a1ca019d46b9be0b7318eaffb63d1" ], "ci_platforms": [ "linux", @@ -24018,7 +24018,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/64cad305e1858eae27cd723778fb9f4b7052eaa5" + "test/core/end2end/fuzzers/client_fuzzer_corpus/4ec113a0126fc5746fa3f955727d009040e8377f" ], "ci_platforms": [ "linux", @@ -24040,7 +24040,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/66145518601b1405361df12570f6e0b2b9a2e5b3" + "test/core/end2end/fuzzers/client_fuzzer_corpus/51c6c5297acebf9d21a8a7d6261d0a17c2adfb56" ], "ci_platforms": [ "linux", @@ -24062,7 +24062,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/685fbddd9ea612b25e325a50bd659997b4d77da1" + "test/core/end2end/fuzzers/client_fuzzer_corpus/52c00bde7f4af95a86deb0a6717d1faf2828a939" ], "ci_platforms": [ "linux", @@ -24084,7 +24084,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/69542ed81b00a5ec8daaf4e8d509201eecd502c5" + "test/core/end2end/fuzzers/client_fuzzer_corpus/54e67ed1036f3f5b315e0e3c02948c30eba900fd" ], "ci_platforms": [ "linux", @@ -24106,7 +24106,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/6e2796549e29e5066f780a5e926fd6e3bb362450" + "test/core/end2end/fuzzers/client_fuzzer_corpus/55ca8f6d9928c239a7abb32554463e6e1e1ee084" ], "ci_platforms": [ "linux", @@ -24128,7 +24128,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/71106770243ccca03f5025aadb298ee3a825824b" + "test/core/end2end/fuzzers/client_fuzzer_corpus/570ca8d2555dde94aa3b3121e8f5256e83eabe5e" ], "ci_platforms": [ "linux", @@ -24150,7 +24150,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/717695057d76b81c344ed8c23cc024195caa9405" + "test/core/end2end/fuzzers/client_fuzzer_corpus/57ee6efc38f4c544a3ea3e5e73987e825bdf2980" ], "ci_platforms": [ "linux", @@ -24172,7 +24172,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/7353a7b2ea9f61325728b2f118416549e89dd79b" + "test/core/end2end/fuzzers/client_fuzzer_corpus/58a067ec6eda7191a5a910d8120633271d3af074" ], "ci_platforms": [ "linux", @@ -24194,7 +24194,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/739228a1400cd69c47f110002c34dbe1661e8c41" + "test/core/end2end/fuzzers/client_fuzzer_corpus/591ef436ef8cc982b48fd827a4555b57cd9780e5" ], "ci_platforms": [ "linux", @@ -24216,7 +24216,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/7465a4955a064e8f1bb777d4b0de5b3df8469831" + "test/core/end2end/fuzzers/client_fuzzer_corpus/5a2447fdfdbf123f4592c1284007b7d50a01750b" ], "ci_platforms": [ "linux", @@ -24238,7 +24238,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/7af3156d286a32a6a6fede46d93ec12ded1ac138" + "test/core/end2end/fuzzers/client_fuzzer_corpus/5ca233a53e3e425cc12e04b466a49789291eaa00" ], "ci_platforms": [ "linux", @@ -24260,7 +24260,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/7c73c0671308e37a8075a20863e70e180ef8b6ea" + "test/core/end2end/fuzzers/client_fuzzer_corpus/5e1659e7cd840ab3f958273ebffdd215f2c81da6" ], "ci_platforms": [ "linux", @@ -24282,7 +24282,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/80bd4827db81a1da28fae8c150f5e2d46651c598" + "test/core/end2end/fuzzers/client_fuzzer_corpus/605e474e9d9436488dfe084d348908e4dfab81a3" ], "ci_platforms": [ "linux", @@ -24304,7 +24304,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/82c0e02a867a5fdfb805e01ebf1a008220311e27" + "test/core/end2end/fuzzers/client_fuzzer_corpus/6066fc9e28b4ce704230f0e8cf21e7c3195aa2a3" ], "ci_platforms": [ "linux", @@ -24326,7 +24326,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/8382c249fc9c7a248833d89de554e63807c475f7" + "test/core/end2end/fuzzers/client_fuzzer_corpus/607dac8012f188cb035b189fc3637028137023e0" ], "ci_platforms": [ "linux", @@ -24348,7 +24348,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/857ce08213a5106c746767352c6863d7bd134208" + "test/core/end2end/fuzzers/client_fuzzer_corpus/611343a6b8879b393ba2f38ed41c7f5355355920" ], "ci_platforms": [ "linux", @@ -24370,7 +24370,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/86eb156ff8ddd7edc535840d412342ada6f3b184" + "test/core/end2end/fuzzers/client_fuzzer_corpus/62c843359941660da3fc9eea62a5732aaa3be283" ], "ci_platforms": [ "linux", @@ -24392,7 +24392,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/871a2e4d73a7fbb50f71558517a2f704b7fdb868" + "test/core/end2end/fuzzers/client_fuzzer_corpus/64696e93ead18265cdac3fb37dae29ad3be6d764" ], "ci_platforms": [ "linux", @@ -24414,7 +24414,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/87e97b460042d045629263ad10ff3de7b000f0a1" + "test/core/end2end/fuzzers/client_fuzzer_corpus/64cad305e1858eae27cd723778fb9f4b7052eaa5" ], "ci_platforms": [ "linux", @@ -24436,7 +24436,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/8b8b9fcdfff1f891b1694614b7309cb4a2098f4b" + "test/core/end2end/fuzzers/client_fuzzer_corpus/64d27dc9f984c49d421a5b0cb0391992d5aac1a4" ], "ci_platforms": [ "linux", @@ -24458,7 +24458,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/8b8f6d58dff9ab0c37183ec93c9a600d5ba5d9e6" + "test/core/end2end/fuzzers/client_fuzzer_corpus/66145518601b1405361df12570f6e0b2b9a2e5b3" ], "ci_platforms": [ "linux", @@ -24480,7 +24480,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/8c527bdf0f304a31866f71cdb298511041ecd320" + "test/core/end2end/fuzzers/client_fuzzer_corpus/685fbddd9ea612b25e325a50bd659997b4d77da1" ], "ci_platforms": [ "linux", @@ -24502,7 +24502,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/8d352ea63259e26e1bb61f5a8f78254be4e3e7b1" + "test/core/end2end/fuzzers/client_fuzzer_corpus/69542ed81b00a5ec8daaf4e8d509201eecd502c5" ], "ci_platforms": [ "linux", @@ -24524,7 +24524,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/8ea624983d766ed45780378a3eec24eb2faeb229" + "test/core/end2end/fuzzers/client_fuzzer_corpus/6bfd3679f4e30aaaa1808e96c980edcfa9cac1c0" ], "ci_platforms": [ "linux", @@ -24546,7 +24546,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9125277ed9ec5d59e51f3e1a8d97d25ef88a5d4f" + "test/core/end2end/fuzzers/client_fuzzer_corpus/6e2796549e29e5066f780a5e926fd6e3bb362450" ], "ci_platforms": [ "linux", @@ -24568,7 +24568,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/91916df7c8f04d8c2b6b8f4aeaeee6972ce0de74" + "test/core/end2end/fuzzers/client_fuzzer_corpus/71106770243ccca03f5025aadb298ee3a825824b" ], "ci_platforms": [ "linux", @@ -24590,7 +24590,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/92cce6dc5c31acd62347b15d89d52ab94b507e0f" + "test/core/end2end/fuzzers/client_fuzzer_corpus/717695057d76b81c344ed8c23cc024195caa9405" ], "ci_platforms": [ "linux", @@ -24612,7 +24612,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/92ea0d3200665e1836ac12bed0837425cb9f43de" + "test/core/end2end/fuzzers/client_fuzzer_corpus/7353a7b2ea9f61325728b2f118416549e89dd79b" ], "ci_platforms": [ "linux", @@ -24634,7 +24634,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9329b80d0125cc994d7ad36540c7a8265d76983c" + "test/core/end2end/fuzzers/client_fuzzer_corpus/739228a1400cd69c47f110002c34dbe1661e8c41" ], "ci_platforms": [ "linux", @@ -24656,7 +24656,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/94108ac8420347598c7cee743b2a158b1270fb8f" + "test/core/end2end/fuzzers/client_fuzzer_corpus/7465a4955a064e8f1bb777d4b0de5b3df8469831" ], "ci_platforms": [ "linux", @@ -24678,7 +24678,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/954ea72fdbeaf5b46d18c6d5bb77fc1a0f97569d" + "test/core/end2end/fuzzers/client_fuzzer_corpus/7af3156d286a32a6a6fede46d93ec12ded1ac138" ], "ci_platforms": [ "linux", @@ -24700,7 +24700,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/970fccda0b34b59ade44d52e1212699b4d2419a8" + "test/core/end2end/fuzzers/client_fuzzer_corpus/7c73c0671308e37a8075a20863e70e180ef8b6ea" ], "ci_platforms": [ "linux", @@ -24722,7 +24722,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/97c4b73f72b248b4ebf4bf30892d0db828a85297" + "test/core/end2end/fuzzers/client_fuzzer_corpus/80bd4827db81a1da28fae8c150f5e2d46651c598" ], "ci_platforms": [ "linux", @@ -24744,7 +24744,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/98da5edafac67704810f093b38c86e4c77b75349" + "test/core/end2end/fuzzers/client_fuzzer_corpus/82c0e02a867a5fdfb805e01ebf1a008220311e27" ], "ci_platforms": [ "linux", @@ -24766,7 +24766,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/999d0995c2f09beda8783eac95d7643a11d5c89a" + "test/core/end2end/fuzzers/client_fuzzer_corpus/8382c249fc9c7a248833d89de554e63807c475f7" ], "ci_platforms": [ "linux", @@ -24788,7 +24788,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9a43f48d4f6219618f8cc9e876880fe81109ad72" + "test/core/end2end/fuzzers/client_fuzzer_corpus/857ce08213a5106c746767352c6863d7bd134208" ], "ci_platforms": [ "linux", @@ -24810,7 +24810,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9abf980e8909aeb31936553ca22ccfd8680c4dab" + "test/core/end2end/fuzzers/client_fuzzer_corpus/86eb156ff8ddd7edc535840d412342ada6f3b184" ], "ci_platforms": [ "linux", @@ -24832,7 +24832,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9b4d4ce0457f5300d6b4b309762acfdbc41e3965" + "test/core/end2end/fuzzers/client_fuzzer_corpus/871a2e4d73a7fbb50f71558517a2f704b7fdb868" ], "ci_platforms": [ "linux", @@ -24854,7 +24854,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9bd059ff0a90e86ada1ba7e5b90ae04637ae9e90" + "test/core/end2end/fuzzers/client_fuzzer_corpus/87e97b460042d045629263ad10ff3de7b000f0a1" ], "ci_platforms": [ "linux", @@ -24876,7 +24876,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9d2dd744ba59c1e8ec091e23938e46d1bb5ee519" + "test/core/end2end/fuzzers/client_fuzzer_corpus/8b8b9fcdfff1f891b1694614b7309cb4a2098f4b" ], "ci_platforms": [ "linux", @@ -24898,7 +24898,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9d6947df24c9ebcbec72c568d9708d7b1ecae63c" + "test/core/end2end/fuzzers/client_fuzzer_corpus/8b8f6d58dff9ab0c37183ec93c9a600d5ba5d9e6" ], "ci_platforms": [ "linux", @@ -24920,7 +24920,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9e2ab07030bd35a4c31df32c79aca5e76c1d04f8" + "test/core/end2end/fuzzers/client_fuzzer_corpus/8c527bdf0f304a31866f71cdb298511041ecd320" ], "ci_platforms": [ "linux", @@ -24942,7 +24942,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/9fee3212240d4bccfdab3696dbbc579b06d39982" + "test/core/end2end/fuzzers/client_fuzzer_corpus/8d352ea63259e26e1bb61f5a8f78254be4e3e7b1" ], "ci_platforms": [ "linux", @@ -24964,7 +24964,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/a33e1b28074a41fc5c2611a67161ae5638a47dd5" + "test/core/end2end/fuzzers/client_fuzzer_corpus/8ea624983d766ed45780378a3eec24eb2faeb229" ], "ci_platforms": [ "linux", @@ -24986,7 +24986,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/a4874327383ca168f9d9d59cffe327f61e9a6610" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9125277ed9ec5d59e51f3e1a8d97d25ef88a5d4f" ], "ci_platforms": [ "linux", @@ -25008,7 +25008,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/a6603e797695274d10bce000f66ca0a715f7d8c0" + "test/core/end2end/fuzzers/client_fuzzer_corpus/91916df7c8f04d8c2b6b8f4aeaeee6972ce0de74" ], "ci_platforms": [ "linux", @@ -25030,7 +25030,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/a814c5743d492b96d2b402f9e819bf8406262224" + "test/core/end2end/fuzzers/client_fuzzer_corpus/92cce6dc5c31acd62347b15d89d52ab94b507e0f" ], "ci_platforms": [ "linux", @@ -25052,7 +25052,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/a9d71e1ff2912d8874e38fc61cbd9a8ef28af4a9" + "test/core/end2end/fuzzers/client_fuzzer_corpus/92ea0d3200665e1836ac12bed0837425cb9f43de" ], "ci_platforms": [ "linux", @@ -25074,7 +25074,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/aaada46c7f3bff58c2dd6f4a8394135ed5f253ee" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9329b80d0125cc994d7ad36540c7a8265d76983c" ], "ci_platforms": [ "linux", @@ -25096,7 +25096,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/ab27fb527771c7d86f74afb6864e95402328ec0e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/94108ac8420347598c7cee743b2a158b1270fb8f" ], "ci_platforms": [ "linux", @@ -25118,7 +25118,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/ab8d6e1ecbd80c6223b8623a386c61023502a57c" + "test/core/end2end/fuzzers/client_fuzzer_corpus/954ea72fdbeaf5b46d18c6d5bb77fc1a0f97569d" ], "ci_platforms": [ "linux", @@ -25140,7 +25140,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/ac38a6572f8420b4df37d9e39088d1905fced71d" + "test/core/end2end/fuzzers/client_fuzzer_corpus/970fccda0b34b59ade44d52e1212699b4d2419a8" ], "ci_platforms": [ "linux", @@ -25162,7 +25162,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/adb9bf315315338bcad85929917b9def2aa098cb" + "test/core/end2end/fuzzers/client_fuzzer_corpus/97c4b73f72b248b4ebf4bf30892d0db828a85297" ], "ci_platforms": [ "linux", @@ -25184,7 +25184,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/b00a32e8bfb75e75f31410dfe3592da6248275c6" + "test/core/end2end/fuzzers/client_fuzzer_corpus/98da5edafac67704810f093b38c86e4c77b75349" ], "ci_platforms": [ "linux", @@ -25206,7 +25206,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/b24a0dd1bc0bfabb832f0d1c8410c018c4ddaf4e" + "test/core/end2end/fuzzers/client_fuzzer_corpus/999d0995c2f09beda8783eac95d7643a11d5c89a" ], "ci_platforms": [ "linux", @@ -25228,7 +25228,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/b283eb8884c98dd50523995ce221aa1ecb3ca182" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9a43f48d4f6219618f8cc9e876880fe81109ad72" ], "ci_platforms": [ "linux", @@ -25250,7 +25250,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/b2aa4861b5104e8bb8bb173f4b023a2172a7b9a2" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9abf980e8909aeb31936553ca22ccfd8680c4dab" ], "ci_platforms": [ "linux", @@ -25272,7 +25272,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/b46e762671a5e28c7061da3baee6fc41dcc0122b" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9b4d4ce0457f5300d6b4b309762acfdbc41e3965" ], "ci_platforms": [ "linux", @@ -25294,7 +25294,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/b6d86bedf3cf19441114e463458a454709e627b4" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9bd059ff0a90e86ada1ba7e5b90ae04637ae9e90" ], "ci_platforms": [ "linux", @@ -25316,7 +25316,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/b7b664a39372dd6142b8ef7906857e4ab3f1fc84" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9d2dd744ba59c1e8ec091e23938e46d1bb5ee519" ], "ci_platforms": [ "linux", @@ -25338,7 +25338,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/b7c31bb5f6acc65b88e31400dcae71f7be392c86" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9d6947df24c9ebcbec72c568d9708d7b1ecae63c" ], "ci_platforms": [ "linux", @@ -25360,7 +25360,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/baa28a5baedb645f4430940a4b4b1142f4b03e0f" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9dfdce1b090a559a14f9a5852f78547413b1d1ed" ], "ci_platforms": [ "linux", @@ -25382,7 +25382,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/bcc7340f8876a7dff381ca676efc39d30eed9f48" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9e2ab07030bd35a4c31df32c79aca5e76c1d04f8" ], "ci_platforms": [ "linux", @@ -25404,7 +25404,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/be3237e72b3d8d56eec0520145dd7d1a5064eede" + "test/core/end2end/fuzzers/client_fuzzer_corpus/9fee3212240d4bccfdab3696dbbc579b06d39982" ], "ci_platforms": [ "linux", @@ -25426,7 +25426,7 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/be8cc5bab95e0ea7af538ca11175d710da6207d9" + "test/core/end2end/fuzzers/client_fuzzer_corpus/a33e1b28074a41fc5c2611a67161ae5638a47dd5" ], "ci_platforms": [ "linux", @@ -25448,7 +25448,513 @@ }, { "args": [ - "test/core/end2end/fuzzers/client_fuzzer_corpus/c0deaead93c9b3f2fc211fb7f0711ac192715a40" + "test/core/end2end/fuzzers/client_fuzzer_corpus/a3cd54d43d3b3bdfcf224d636dc11ce1b5ee4d30" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/a4874327383ca168f9d9d59cffe327f61e9a6610" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/a6603e797695274d10bce000f66ca0a715f7d8c0" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/a814c5743d492b96d2b402f9e819bf8406262224" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/a9d71e1ff2912d8874e38fc61cbd9a8ef28af4a9" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/aaada46c7f3bff58c2dd6f4a8394135ed5f253ee" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/ab27fb527771c7d86f74afb6864e95402328ec0e" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/ab8d6e1ecbd80c6223b8623a386c61023502a57c" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/ac38a6572f8420b4df37d9e39088d1905fced71d" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/adb9bf315315338bcad85929917b9def2aa098cb" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/b00a32e8bfb75e75f31410dfe3592da6248275c6" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/b24a0dd1bc0bfabb832f0d1c8410c018c4ddaf4e" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/b283eb8884c98dd50523995ce221aa1ecb3ca182" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/b2aa4861b5104e8bb8bb173f4b023a2172a7b9a2" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/b46e762671a5e28c7061da3baee6fc41dcc0122b" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/b6d86bedf3cf19441114e463458a454709e627b4" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/b7b664a39372dd6142b8ef7906857e4ab3f1fc84" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/b7c31bb5f6acc65b88e31400dcae71f7be392c86" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/baa28a5baedb645f4430940a4b4b1142f4b03e0f" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/baf7839388e10ff0c410a58797482cb83693b309" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/bcc7340f8876a7dff381ca676efc39d30eed9f48" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/be3237e72b3d8d56eec0520145dd7d1a5064eede" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/be8cc5bab95e0ea7af538ca11175d710da6207d9" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/c0deaead93c9b3f2fc211fb7f0711ac192715a40" ], "ci_platforms": [ "linux", @@ -25534,6 +26040,28 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/c685689a9d5b259afe237d857b7c6551dc95c176" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/c77087b4651f4c62a780d77a3b4c233490244e8a" @@ -25644,6 +26172,28 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/ce990633c0f2b2a2ddb66144ed942d4bc9bcd8fb" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/ceb297908903ba0fc24982ad4e6010e79dfbdd5e" @@ -25864,6 +26414,28 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/d257c41db22b60cd937de16b9d90a44b9fa8e426" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/d363f288f48fba8fde401978b7e764295735645e" @@ -25974,6 +26546,28 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/d91281daad9b821294db204dfc244b2d0d5496e4" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/da4d300d0a8e6f803ec053e3e7689c4b91eaef90" @@ -26106,6 +26700,50 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/dc815fd6d5e817898238481472f359bc50b510c4" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/dd662353bad317cee7d16191a39e094bfa4898f2" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/e1bd70aa5c802cd4462ff4833c09ed432ce4c9fa" @@ -26348,6 +26986,72 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/ec180175f0edea0a6c3eea2ae719b006bc029ff8" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/ed6358fbe6721c9ac01a6f4cab4d2df377eb1f11" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/ee436743977b8e31feec22a91b1ce23dee96665e" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/ef1984d6146670122c7a7246374bca460e7284e5" @@ -26612,6 +27316,28 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/f9c875c00b7327df5bf21c3e051b55b0d2ed3cc8" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/fb340fff42a4d7ebf6b82adb9345655ffeeb05d9" From 53b28fba881515ee5c796c961103c9169b6ac379 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 15 Apr 2016 14:17:23 -0700 Subject: [PATCH 48/93] Expand corpus --- .../6f3bd9f33ca05bebe3811f7b3ae6ed112e1e45b9 | Bin 0 -> 286 bytes ...t-1b6c4b5c1949adae3efd5e3264bb32a40eea524e | Bin 0 -> 2047 bytes ...t-7281d9eaed0d20b0b6b5e7709c57e78fefe9c315 | Bin 0 -> 2046 bytes ...t-9a176b6f7e0dc5f681a1788d8954f76fabd08cad | Bin 0 -> 2047 bytes ...t-a61a28cf78149518466b87e5463ec5c771dc504e | Bin 0 -> 2047 bytes ...t-aa23c18f6badd88a7bec65e8b04f7801ba624ec6 | Bin 0 -> 2047 bytes ...t-ddfe613d8791b2d377e14fbdffb18b84a89d49b6 | Bin 0 -> 2047 bytes tools/run_tests/tests.json | 154 ++++++++++++++++++ 8 files changed, 154 insertions(+) create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/6f3bd9f33ca05bebe3811f7b3ae6ed112e1e45b9 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-1b6c4b5c1949adae3efd5e3264bb32a40eea524e create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-7281d9eaed0d20b0b6b5e7709c57e78fefe9c315 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-9a176b6f7e0dc5f681a1788d8954f76fabd08cad create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a61a28cf78149518466b87e5463ec5c771dc504e create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-aa23c18f6badd88a7bec65e8b04f7801ba624ec6 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ddfe613d8791b2d377e14fbdffb18b84a89d49b6 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/6f3bd9f33ca05bebe3811f7b3ae6ed112e1e45b9 b/test/core/end2end/fuzzers/server_fuzzer_corpus/6f3bd9f33ca05bebe3811f7b3ae6ed112e1e45b9 new file mode 100644 index 0000000000000000000000000000000000000000..4069f677a86ec52314a3f6c4fe1da801037910ca GIT binary patch literal 286 zcmY+9%}&EG49B}s#HcnY2e_hYrvXdbaoiKI1EQjR0Wa|yqqK=y7crij2O!-I%eH?0 z`$Ka1aY&!i*SaqAm#kPNtE76Hauh{zh{=9u6V1f+-UFLOesV59LN9LigEH7+Y?yth zT4dvNT)tPeh>aWg);a}tBC%AiW9(S++2aFvZ%F}@>++`e>X{7Y97fVW0TC)p)YNxNUyOi#g+hdmxMbAd+#wUP2QF*GJG&Sqhk5&Z)e}cHzaW aNH>-~$L~k6yfm0vbR%Ewit4{IFRDK~LRYf@ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-1b6c4b5c1949adae3efd5e3264bb32a40eea524e b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-1b6c4b5c1949adae3efd5e3264bb32a40eea524e new file mode 100644 index 0000000000000000000000000000000000000000..88310984dc41ed716d13f5714ecb278a1a1aec6d GIT binary patch literal 2047 zcmeHDJx{|h5KSP65>d$m>=6qeYCd4h!b%53MDho&_BFBO+Lm*XD8HQnCu^s!QBJz2 z_fB^wy;ps2lb7V9X{!7!E7tKku0KZ%f*|tk>oN#O7P70-0(Gl=Z%n=e$F9qscX+_4 zBeGr{kUArx>Z@*8T*Ba$lXSdMhJ)%%PwbW(O{giQqeTYRD#?MQ(Ru4EXLlo}z&Tn< zQF9}tZtn%|6%cNu@R$DIru~(cT@bFwfmG;v77snT6k5OVumh2DB|S~1cRVk$S8pvV rk|!ng@betJ|4qii2^Uxrm|+6-3_UHD&P|{^_h8vSN#OBhGNZvib$Uv+ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-7281d9eaed0d20b0b6b5e7709c57e78fefe9c315 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-7281d9eaed0d20b0b6b5e7709c57e78fefe9c315 new file mode 100644 index 0000000000000000000000000000000000000000..44c3397886c2117fde698e6377f637d9ae14f2fd GIT binary patch literal 2046 zcmeHD!Ait15N);MT3pCM@5PhKwy7R_@v4W#V*3NL>1-3oCLx`I>$iI_?H}xQ?Z7-{ z;JpX$)n6akbN1f0HGeJ2b-GTQ?SxSjC1Jx{M)7pT?5c7=a>e)7@*Q|~T@6Cw0TW5& z!goNDwoB^Ire$dbWB9zH%#uxFQcqqaRp04(M~}1L0u@T`sf=XExgjUKTGQT2W?? lTAA_tDSG>zgT*s0urzRn4K!z%X^C`d1J$X5h5xS__yY+*N{;{l literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-9a176b6f7e0dc5f681a1788d8954f76fabd08cad b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-9a176b6f7e0dc5f681a1788d8954f76fabd08cad new file mode 100644 index 0000000000000000000000000000000000000000..ef52cd7c81a487e5da090d60afe5f1201384a590 GIT binary patch literal 2047 zcmeHD!Ait15N);MT3pCM@5PhKwy7R_@v4W#V*3NL>1-3oCLx`I>$iI_?H}xQ?Z7-{ z;JpX$)n6akbN1f0HGeJ2b-GTQ?SxSjC1Jx{M)7pT?5c7=a>e)7@*Q|~T@6Cw0TW5& z!goNDwoB^Ire$dbWB9zH%#uxFQcqqaRp04(M~}1L0u@T`sf=XExgjUKTGQT2W?? lTAA_tDSG>zgT*s0urzRn4K!z%X^C`d1J$X5h5x@A_ybeVN{;{l literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a61a28cf78149518466b87e5463ec5c771dc504e b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a61a28cf78149518466b87e5463ec5c771dc504e new file mode 100644 index 0000000000000000000000000000000000000000..293360770cc3c9cfa432bf8ea6c3bde6d431a51a GIT binary patch literal 2047 zcmeH@KTpFj5XBt`qC`~k0DHvLqUH~bSy*8}L?mC}>Rb~`u5CFNi8AoX8E~>QbZv9e zJ>5xnPx`&`^DTaiU+cQep3{68Eu-pvRK{57+t(!v#wp-eg$3#s+0K}33yxnGz36a{ zVMk>Bwnyqr6P6!U&7%Sazd1>V8)XEj&h*4@h0%nX5;|DqV6Bn@NE)5B&I*1vY63!_ zr3AGwjnwUZgF6L;8`=0z@3(2crR5id3vwV8x}HZvk1m1MA3SWKNraMqj3+yh<>`}0 sOY?Z8q#nN3?B#a?3nraqPT&L+s7{b+Mmjcu;@F2Xy8k&N)_+m|0MtcG4FCWD literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-aa23c18f6badd88a7bec65e8b04f7801ba624ec6 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-aa23c18f6badd88a7bec65e8b04f7801ba624ec6 new file mode 100644 index 0000000000000000000000000000000000000000..3d7f426338f4757c83ecaddb023c10e13470762a GIT binary patch literal 2047 zcmeHDO;5ux3{6=PqheAHaIZK4T0h{}3s*QyRJ4D;)`SAD&w&*`pds{A!8*2y}lKPF_1#bLu-vuI)wzbPG1zse8R=6mo#53 z>WI|aHm*MFh9@PAL3u@|TWuxi-VVg?q&0+w1f3jma84@;q^!w1?AoE7C`; k%=rDp-hSs`(Toc$4P0OY^#x{HBAwendG5n<|Gyge17mkekpKVy literal 0 HcmV?d00001 diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index ec2832cf7f0..556a540f043 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -54596,6 +54596,28 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/6f3bd9f33ca05bebe3811f7b3ae6ed112e1e45b9" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/6f9d75e1af7ae7010d32872da888a582a25fddb4" @@ -57940,6 +57962,28 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-1b6c4b5c1949adae3efd5e3264bb32a40eea524e" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-6e980a9d12c392175b5f66683e608626ae983276" @@ -57962,6 +58006,116 @@ "posix" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-7281d9eaed0d20b0b6b5e7709c57e78fefe9c315" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-9a176b6f7e0dc5f681a1788d8954f76fabd08cad" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a61a28cf78149518466b87e5463ec5c771dc504e" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-aa23c18f6badd88a7bec65e8b04f7801ba624ec6" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ddfe613d8791b2d377e14fbdffb18b84a89d49b6" + ], + "ci_platforms": [ + "linux", + "mac", + "windows", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux", + "mac", + "windows", + "posix" + ] + }, { "args": [ "test/core/client_config/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342" From 92265f6904b238ed9af524c2816490445d60d90b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 15 Apr 2016 14:34:13 -0700 Subject: [PATCH 49/93] fix field names in schema --- .../performance/scenario_result_schema.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/run_tests/performance/scenario_result_schema.json b/tools/run_tests/performance/scenario_result_schema.json index 10d24a25177..03254147571 100644 --- a/tools/run_tests/performance/scenario_result_schema.json +++ b/tools/run_tests/performance/scenario_result_schema.json @@ -148,52 +148,52 @@ "mode": "NULLABLE" }, { - "name": "qps_per_server_core", + "name": "qpsPerServerCore", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "server_system_time", + "name": "serverSystemTime", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "server_user_time", + "name": "serverUserTime", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "client_system_time", + "name": "clientSystemTime", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "client_user_time", + "name": "clientUserTime", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "latency_50", + "name": "latency50", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "latency_90", + "name": "latency90", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "latency_95", + "name": "latency95", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "latency_99", + "name": "latency99", "type": "FLOAT", "mode": "NULLABLE" }, { - "name": "latency_999", + "name": "latency999", "type": "FLOAT", "mode": "NULLABLE" } From ac4251aa0e973e3b2bdcf640afcb831744cf8777 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 15 Apr 2016 14:44:59 -0700 Subject: [PATCH 50/93] fix error handling in big_query_utils.insert_rows --- tools/gcp/utils/big_query_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/gcp/utils/big_query_utils.py b/tools/gcp/utils/big_query_utils.py index 913afd059eb..9dbc69c5d66 100755 --- a/tools/gcp/utils/big_query_utils.py +++ b/tools/gcp/utils/big_query_utils.py @@ -119,9 +119,13 @@ def insert_rows(big_query, project_id, dataset_id, table_id, rows_list): tableId=table_id, body=body) res = insert_req.execute(num_retries=NUM_RETRIES) + if res.get('insertErrors', None): + print 'Error inserting rows! Response: %s' % res + is_success = False except HttpError as http_error: - print 'Error in inserting rows in the table %s' % table_id + print 'Error inserting rows to the table %s' % table_id is_success = False + return is_success From 33c161dffa0aab7f81cf65b1faffcb4cd397cfdf Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 15 Apr 2016 14:45:49 -0700 Subject: [PATCH 51/93] populate ScenarioResult.summary in JSON report --- test/cpp/qps/driver.cc | 43 +++++++++++++++++++++++++++++++++++++++++ test/cpp/qps/report.cc | 44 +++++++++++++----------------------------- 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 9c0649cae68..f672708813c 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -52,6 +52,7 @@ #include "test/cpp/qps/driver.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/qps_worker.h" +#include "test/cpp/qps/stats.h" using std::list; using std::thread; @@ -115,6 +116,46 @@ static deque get_workers(const string& name) { } } +// helpers for postprocess_scenario_result +static double WallTime(ClientStats s) { return s.time_elapsed(); } +static double SystemTime(ClientStats s) { return s.time_system(); } +static double UserTime(ClientStats s) { return s.time_user(); } +static double ServerWallTime(ServerStats s) { return s.time_elapsed(); } +static double ServerSystemTime(ServerStats s) { return s.time_system(); } +static double ServerUserTime(ServerStats s) { return s.time_user(); } +static int Cores(int n) { return n; } + +// Postprocess ScenarioResult and populate result summary. +static void postprocess_scenario_result(ScenarioResult* result) { + Histogram histogram; + histogram.MergeProto(result->latencies()); + + auto qps = histogram.Count() / average(result->client_stats(), WallTime); + auto qps_per_server_core = qps / sum(result->server_cores(), Cores); + + result->mutable_summary()->set_qps(qps); + result->mutable_summary()->set_qps_per_server_core(qps_per_server_core); + result->mutable_summary()->set_latency_50(histogram.Percentile(50)); + result->mutable_summary()->set_latency_90(histogram.Percentile(90)); + result->mutable_summary()->set_latency_95(histogram.Percentile(95)); + result->mutable_summary()->set_latency_99(histogram.Percentile(99)); + result->mutable_summary()->set_latency_999(histogram.Percentile(99.9)); + + auto server_system_time = 100.0 * sum(result->server_stats(), ServerSystemTime) / + sum(result->server_stats(), ServerWallTime); + auto server_user_time = 100.0 * sum(result->server_stats(), ServerUserTime) / + sum(result->server_stats(), ServerWallTime); + auto client_system_time = 100.0 * sum(result->client_stats(), SystemTime) / + sum(result->client_stats(), WallTime); + auto client_user_time = 100.0 * sum(result->client_stats(), UserTime) / + sum(result->client_stats(), WallTime); + + result->mutable_summary()->set_server_system_time(server_system_time); + result->mutable_summary()->set_server_user_time(server_user_time); + result->mutable_summary()->set_client_system_time(client_system_time); + result->mutable_summary()->set_client_user_time(client_user_time); +} + // Namespace for classes and functions used only in RunScenario // Using this rather than local definitions to workaround gcc-4.4 limitations // regarding using templates without linkage @@ -380,6 +421,8 @@ std::unique_ptr RunScenario( } delete[] servers; + + postprocess_scenario_result(result.get()); return result; } diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 07ab0a8f284..a158b7d6877 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -45,14 +45,6 @@ namespace grpc { namespace testing { -static double WallTime(ClientStats s) { return s.time_elapsed(); } -static double SystemTime(ClientStats s) { return s.time_system(); } -static double UserTime(ClientStats s) { return s.time_user(); } -static double ServerWallTime(ServerStats s) { return s.time_elapsed(); } -static double ServerSystemTime(ServerStats s) { return s.time_system(); } -static double ServerUserTime(ServerStats s) { return s.time_user(); } -static int Cores(int n) { return n; } - void CompositeReporter::add(std::unique_ptr reporter) { reporters_.emplace_back(std::move(reporter)); } @@ -82,44 +74,34 @@ void CompositeReporter::ReportTimes(const ScenarioResult& result) { } void GprLogReporter::ReportQPS(const ScenarioResult& result) { - Histogram histogram; - histogram.MergeProto(result.latencies()); - gpr_log(GPR_INFO, "QPS: %.1f", - histogram.Count() / average(result.client_stats(), WallTime)); + gpr_log(GPR_INFO, "QPS: %.1f", result.summary().qps()); } void GprLogReporter::ReportQPSPerCore(const ScenarioResult& result) { - Histogram histogram; - histogram.MergeProto(result.latencies()); - auto qps = histogram.Count() / average(result.client_stats(), WallTime); - - gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", qps, - qps / sum(result.server_cores(), Cores)); + gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", + result.summary().qps(), + result.summary().qps_per_server_core()); } void GprLogReporter::ReportLatency(const ScenarioResult& result) { - Histogram histogram; - histogram.MergeProto(result.latencies()); gpr_log(GPR_INFO, "Latencies (50/90/95/99/99.9%%-ile): %.1f/%.1f/%.1f/%.1f/%.1f us", - histogram.Percentile(50) / 1000, histogram.Percentile(90) / 1000, - histogram.Percentile(95) / 1000, histogram.Percentile(99) / 1000, - histogram.Percentile(99.9) / 1000); + result.summary().latency_50() / 1000, + result.summary().latency_90() / 1000, + result.summary().latency_95() / 1000, + result.summary().latency_99() / 1000, + result.summary().latency_999() / 1000); } void GprLogReporter::ReportTimes(const ScenarioResult& result) { gpr_log(GPR_INFO, "Server system time: %.2f%%", - 100.0 * sum(result.server_stats(), ServerSystemTime) / - sum(result.server_stats(), ServerWallTime)); + result.summary().server_system_time()); gpr_log(GPR_INFO, "Server user time: %.2f%%", - 100.0 * sum(result.server_stats(), ServerUserTime) / - sum(result.server_stats(), ServerWallTime)); + result.summary().server_user_time()); gpr_log(GPR_INFO, "Client system time: %.2f%%", - 100.0 * sum(result.client_stats(), SystemTime) / - sum(result.client_stats(), WallTime)); + result.summary().client_system_time()); gpr_log(GPR_INFO, "Client user time: %.2f%%", - 100.0 * sum(result.client_stats(), UserTime) / - sum(result.client_stats(), WallTime)); + result.summary().client_user_time()); } void JsonReporter::ReportQPS(const ScenarioResult& result) { From 0c999523f35bae7739200f8d2a1d16cd8804eaac Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 15 Apr 2016 15:03:08 -0700 Subject: [PATCH 52/93] remove barrier --- src/core/lib/support/log.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c index cdcd3770455..5a47d2d3d5a 100644 --- a/src/core/lib/support/log.c +++ b/src/core/lib/support/log.c @@ -60,7 +60,7 @@ const char *gpr_log_severity_string(gpr_log_severity severity) { void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message) { - if (severity < gpr_atm_acq_load(&g_min_severity_to_print)) return; + if (severity < gpr_atm_no_barrier_load(&g_min_severity_to_print)) return; gpr_log_func_args lfargs; memset(&lfargs, 0, sizeof(lfargs)); @@ -72,24 +72,26 @@ void gpr_log_message(const char *file, int line, gpr_log_severity severity, } void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print) { - gpr_atm_rel_store(&g_min_severity_to_print, (gpr_atm)min_severity_to_print); + gpr_atm_no_barrier_store(&g_min_severity_to_print, + (gpr_atm)min_severity_to_print); } void gpr_log_verbosity_init() { char *verbosity = gpr_getenv("GRPC_VERBOSITY"); if (verbosity == NULL) return; - gpr_log_severity min_severity_to_print = GPR_LOG_VERBOSITY_UNSET; + gpr_atm min_severity_to_print = GPR_LOG_VERBOSITY_UNSET; if (strcmp(verbosity, "DEBUG") == 0) { - min_severity_to_print = GPR_LOG_SEVERITY_DEBUG; + min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG; } else if (strcmp(verbosity, "INFO") == 0) { - min_severity_to_print = GPR_LOG_SEVERITY_INFO; + min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_INFO; } else if (strcmp(verbosity, "ERROR") == 0) { - min_severity_to_print = GPR_LOG_SEVERITY_ERROR; + min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_ERROR; } gpr_free(verbosity); - if ((gpr_atm_acq_load(&g_min_severity_to_print)) == GPR_LOG_VERBOSITY_UNSET) { - gpr_atm_rel_store(&g_min_severity_to_print, (gpr_atm)min_severity_to_print); + if ((gpr_atm_no_barrier_load(&g_min_severity_to_print)) == + GPR_LOG_VERBOSITY_UNSET) { + gpr_atm_no_barrier_store(&g_min_severity_to_print, min_severity_to_print); } } From b63fb4d20694242df417d98234b95e40775da23a Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 15 Apr 2016 15:16:52 -0700 Subject: [PATCH 53/93] explicit convert severity to a signed type --- src/core/lib/support/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c index 5a47d2d3d5a..882abf673c1 100644 --- a/src/core/lib/support/log.c +++ b/src/core/lib/support/log.c @@ -60,7 +60,8 @@ const char *gpr_log_severity_string(gpr_log_severity severity) { void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message) { - if (severity < gpr_atm_no_barrier_load(&g_min_severity_to_print)) return; + if ((gpr_atm)severity < gpr_atm_no_barrier_load(&g_min_severity_to_print)) + return; gpr_log_func_args lfargs; memset(&lfargs, 0, sizeof(lfargs)); From e9a8d89dc2708eb4da1ce9afd8ba5a0cc1537303 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 15 Apr 2016 15:38:17 -0700 Subject: [PATCH 54/93] fix formatting --- test/cpp/qps/driver.cc | 11 ++++++----- test/cpp/qps/report.cc | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index f672708813c..2583ceb8192 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -141,14 +141,15 @@ static void postprocess_scenario_result(ScenarioResult* result) { result->mutable_summary()->set_latency_99(histogram.Percentile(99)); result->mutable_summary()->set_latency_999(histogram.Percentile(99.9)); - auto server_system_time = 100.0 * sum(result->server_stats(), ServerSystemTime) / - sum(result->server_stats(), ServerWallTime); + auto server_system_time = 100.0 * + sum(result->server_stats(), ServerSystemTime) / + sum(result->server_stats(), ServerWallTime); auto server_user_time = 100.0 * sum(result->server_stats(), ServerUserTime) / - sum(result->server_stats(), ServerWallTime); + sum(result->server_stats(), ServerWallTime); auto client_system_time = 100.0 * sum(result->client_stats(), SystemTime) / - sum(result->client_stats(), WallTime); + sum(result->client_stats(), WallTime); auto client_user_time = 100.0 * sum(result->client_stats(), UserTime) / - sum(result->client_stats(), WallTime); + sum(result->client_stats(), WallTime); result->mutable_summary()->set_server_system_time(server_system_time); result->mutable_summary()->set_server_user_time(server_user_time); diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index a158b7d6877..3ae41399cfc 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -78,8 +78,7 @@ void GprLogReporter::ReportQPS(const ScenarioResult& result) { } void GprLogReporter::ReportQPSPerCore(const ScenarioResult& result) { - gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", - result.summary().qps(), + gpr_log(GPR_INFO, "QPS: %.1f (%.1f/server core)", result.summary().qps(), result.summary().qps_per_server_core()); } From 02fb54ea9bb1f0d95b1c037d09f543cce637cd19 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Fri, 15 Apr 2016 16:25:24 -0700 Subject: [PATCH 55/93] Fixing op duplication in test. --- test/core/end2end/tests/filter_causes_close.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index e74d3239de9..9f9ee856485 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -207,10 +207,7 @@ static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg, bool success) { call_data *calld = elem->call_data; if (success) { // close the stream with an error. - gpr_slice message; - grpc_transport_stream_op close_op; - memset(&close_op, 0, sizeof(close_op)); - message = + gpr_slice message = gpr_slice_from_copied_string("Random failure that's not preventable."); grpc_transport_stream_op op; memset(&op, 0, sizeof(op)); From 18746637f5a5507b03c5f34c417e26ba5d3bee63 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 15 Apr 2016 17:40:05 -0700 Subject: [PATCH 56/93] After running generate_projects.sh --- grpc.def | 2 ++ include/grpc/impl/codegen/log.h | 1 - src/python/grpcio/grpc/_cython/imports.generated.c | 4 ++++ src/python/grpcio/grpc/_cython/imports.generated.h | 6 ++++++ src/ruby/ext/grpc/rb_grpc_imports.generated.c | 4 ++++ src/ruby/ext/grpc/rb_grpc_imports.generated.h | 6 ++++++ 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/grpc.def b/grpc.def index f81aa1b05a6..8456952dfdb 100644 --- a/grpc.def +++ b/grpc.def @@ -136,6 +136,8 @@ EXPORTS grpc_raw_byte_buffer_from_reader gpr_log gpr_log_message + gpr_set_log_verbosity + gpr_log_verbosity_init gpr_set_log_function gpr_slice_ref gpr_slice_unref diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h index c64b961b80a..aa86fc4c179 100644 --- a/include/grpc/impl/codegen/log.h +++ b/include/grpc/impl/codegen/log.h @@ -38,7 +38,6 @@ #include /* for abort() */ #include -#include #ifdef __cplusplus extern "C" { diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 8bd6ae6372b..3922f438338 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -174,6 +174,8 @@ grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import; grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import; gpr_log_type gpr_log_import; gpr_log_message_type gpr_log_message_import; +gpr_set_log_verbosity_type gpr_set_log_verbosity_import; +gpr_log_verbosity_init_type gpr_log_verbosity_init_import; gpr_set_log_function_type gpr_set_log_function_import; gpr_slice_ref_type gpr_slice_ref_import; gpr_slice_unref_type gpr_slice_unref_import; @@ -440,6 +442,8 @@ void pygrpc_load_imports(HMODULE library) { grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader"); gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log"); gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message"); + gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity"); + gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init"); gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function"); gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref"); gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 272e85b4857..bd032ac8d0f 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -472,6 +472,12 @@ extern gpr_log_type gpr_log_import; typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message); extern gpr_log_message_type gpr_log_message_import; #define gpr_log_message gpr_log_message_import +typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print); +extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import; +#define gpr_set_log_verbosity gpr_set_log_verbosity_import +typedef void(*gpr_log_verbosity_init_type)(); +extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import; +#define gpr_log_verbosity_init gpr_log_verbosity_init_import typedef void(*gpr_set_log_function_type)(gpr_log_func func); extern gpr_set_log_function_type gpr_set_log_function_import; #define gpr_set_log_function gpr_set_log_function_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 56db4ec686b..702e0244bbd 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -174,6 +174,8 @@ grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import; grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import; gpr_log_type gpr_log_import; gpr_log_message_type gpr_log_message_import; +gpr_set_log_verbosity_type gpr_set_log_verbosity_import; +gpr_log_verbosity_init_type gpr_log_verbosity_init_import; gpr_set_log_function_type gpr_set_log_function_import; gpr_slice_ref_type gpr_slice_ref_import; gpr_slice_unref_type gpr_slice_unref_import; @@ -436,6 +438,8 @@ void grpc_rb_load_imports(HMODULE library) { grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader"); gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log"); gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message"); + gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity"); + gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init"); gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function"); gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref"); gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index c526f434c61..52c0e43f910 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -472,6 +472,12 @@ extern gpr_log_type gpr_log_import; typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message); extern gpr_log_message_type gpr_log_message_import; #define gpr_log_message gpr_log_message_import +typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print); +extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import; +#define gpr_set_log_verbosity gpr_set_log_verbosity_import +typedef void(*gpr_log_verbosity_init_type)(); +extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import; +#define gpr_log_verbosity_init gpr_log_verbosity_init_import typedef void(*gpr_set_log_function_type)(gpr_log_func func); extern gpr_set_log_function_type gpr_set_log_function_import; #define gpr_set_log_function gpr_set_log_function_import From 295a1ff6cd9324c1286d51db6e5982c5410e2e72 Mon Sep 17 00:00:00 2001 From: vjpai Date: Fri, 15 Apr 2016 17:46:42 -0700 Subject: [PATCH 57/93] Add a #include that was needed as everything moved to gpr_malloc --- test/core/network_benchmarks/low_level_ping_pong.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c index b3a38a55ad0..1b40895a719 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.c +++ b/test/core/network_benchmarks/low_level_ping_pong.c @@ -49,6 +49,7 @@ #endif #include +#include #include #include #include From 2e3e0039b30edaf89fb93bfb2c1d0909098519fa Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 18 Apr 2016 07:54:53 -0700 Subject: [PATCH 58/93] Expand corpus, fix crash --- .../transport/chttp2/transport/hpack_parser.c | 12 +- .../07048654244e377ddf246e8cc18f71443035cd2b | Bin 0 -> 66 bytes .../0c30868720d5e1a19ff23c53740749c37a43540d | Bin 0 -> 22 bytes .../101305ccd08c7a8bd0c2913c37d3dd0d39d4bb64 | Bin 0 -> 70 bytes .../1160214cdb23e8fc187078a8d6796656c1ade925 | Bin 0 -> 294 bytes .../17b1758fc7cd69a00d140f113b1ac894023ff20b | Bin 0 -> 161 bytes .../1aee32faadffa3c2ec508e8fd30006423665488f | Bin 0 -> 184 bytes .../1ca51ab2fefef4f549c4a8e7f4910c6b5a4b4b1d | 1 + .../1dc86d0febe4adc5353230cea24b5f7cce829283 | Bin 0 -> 665 bytes .../2166c7093c424a2136c4cb8b10d0b124047320d4 | Bin 0 -> 420 bytes .../28ee8cae75efa07da9649933a9482d00643b5395 | Bin 0 -> 22 bytes .../29be7d33920998bae7329d77d4c81989eae91647 | Bin 0 -> 535 bytes .../361c6f4374443671f039fd9659577e4460178020 | Bin 0 -> 139 bytes .../375c2462d6ae891222686f9519294811fa5de010 | Bin 0 -> 153 bytes .../4b585eb75ebca2187c0aa5a6abe4c8125aa80127 | Bin 0 -> 270 bytes .../534c900ade27c8f7fccb1f3b7e7703f77f13a8f5 | Bin 0 -> 398 bytes .../5482dc4af170def9c183315efaa48f9c186926a1 | Bin 0 -> 151 bytes .../5dc7b2086a39f56d8b9135f524d34a01fcabafd8 | Bin 0 -> 479 bytes .../653ec14661c40ea25bdbab4a7cb9371c669d10d9 | Bin 0 -> 124 bytes .../759a1e2e34cad14321a5e5790b1e6a783312fea1 | Bin 0 -> 669 bytes .../807b8c4ca068cff4bc0fc8e854c1215a2fe65960 | Bin 0 -> 185 bytes .../831248cea079b629bf0ef6d9d02c159d6f8ed41b | Bin 0 -> 294 bytes .../850c639595eae3cc9c2cfef473e28fd4e8174dc8 | Bin 0 -> 167 bytes .../9552c3f6304af40224b800f3a3a5df3887a530f6 | Bin 0 -> 154 bytes .../96e5126447131d3d59cc6547f6b91d3433ce37c8 | Bin 0 -> 456 bytes .../98dddd3f679af150e9933bd864ae20e20b7aa25a | Bin 0 -> 178 bytes .../9a4da2a37a26c114e1226bfbe1cf80ec5ca99a66 | Bin 0 -> 184 bytes .../a706f2067bfbda7837eaad68972d60547e2957c3 | Bin 0 -> 639 bytes .../ade2d2f0e120a9527487e9b92458ee6844800e4e | Bin 0 -> 154 bytes .../af8b24ffaecdfaf96c0cd7c76f31dc9e1b4d0935 | Bin 0 -> 582 bytes .../b3f33b78433af7f607bc99b569b0cef95a1a6ca0 | Bin 0 -> 669 bytes .../c784ad2e205ba49b5bb1302746723dbc57320981 | Bin 0 -> 290 bytes .../cd4be18b1ae872c40580edc4fe8cbdf1fe2a3881 | Bin 0 -> 392 bytes ...h-8e546795782dffa5d5f5e94c9510aac178fcee39 | Bin 0 -> 369 bytes .../d727b7edb460c549d7b12b90f581048c9f4747e5 | Bin 0 -> 113 bytes .../d90c312791129dee8c5f85cb3308323d0c39b70d | Bin 0 -> 290 bytes .../da322a6b88da87babb52d1527fe54cb4ac214b32 | Bin 0 -> 22 bytes .../e5a7c086208248a15ee6fa5195fc4ce22469de15 | Bin 0 -> 84 bytes .../f84f5d6188cf099465f0b70337b87ad8aa8efb78 | Bin 0 -> 69 bytes .../fe1390762579b5c335bbdea73e251b95b979c3c9 | Bin 0 -> 12 bytes .../fecccfc70b1cf1a524b9f28a9ba2c153c8e14d0e | Bin 0 -> 13 bytes .../fef80aa34c31700ac8e53bede4a97131176ceef0 | Bin 0 -> 421 bytes tools/run_tests/tests.json | 1198 +++++++++++++++-- 43 files changed, 1057 insertions(+), 154 deletions(-) create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/07048654244e377ddf246e8cc18f71443035cd2b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/0c30868720d5e1a19ff23c53740749c37a43540d create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/101305ccd08c7a8bd0c2913c37d3dd0d39d4bb64 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/1160214cdb23e8fc187078a8d6796656c1ade925 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/17b1758fc7cd69a00d140f113b1ac894023ff20b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/1aee32faadffa3c2ec508e8fd30006423665488f create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/1ca51ab2fefef4f549c4a8e7f4910c6b5a4b4b1d create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/1dc86d0febe4adc5353230cea24b5f7cce829283 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/2166c7093c424a2136c4cb8b10d0b124047320d4 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/28ee8cae75efa07da9649933a9482d00643b5395 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/29be7d33920998bae7329d77d4c81989eae91647 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/361c6f4374443671f039fd9659577e4460178020 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/375c2462d6ae891222686f9519294811fa5de010 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/4b585eb75ebca2187c0aa5a6abe4c8125aa80127 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/534c900ade27c8f7fccb1f3b7e7703f77f13a8f5 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/5482dc4af170def9c183315efaa48f9c186926a1 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/5dc7b2086a39f56d8b9135f524d34a01fcabafd8 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/653ec14661c40ea25bdbab4a7cb9371c669d10d9 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/759a1e2e34cad14321a5e5790b1e6a783312fea1 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/807b8c4ca068cff4bc0fc8e854c1215a2fe65960 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/831248cea079b629bf0ef6d9d02c159d6f8ed41b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/850c639595eae3cc9c2cfef473e28fd4e8174dc8 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/9552c3f6304af40224b800f3a3a5df3887a530f6 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/96e5126447131d3d59cc6547f6b91d3433ce37c8 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/98dddd3f679af150e9933bd864ae20e20b7aa25a create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/9a4da2a37a26c114e1226bfbe1cf80ec5ca99a66 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/a706f2067bfbda7837eaad68972d60547e2957c3 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/ade2d2f0e120a9527487e9b92458ee6844800e4e create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/af8b24ffaecdfaf96c0cd7c76f31dc9e1b4d0935 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/b3f33b78433af7f607bc99b569b0cef95a1a6ca0 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/c784ad2e205ba49b5bb1302746723dbc57320981 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/cd4be18b1ae872c40580edc4fe8cbdf1fe2a3881 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/crash-8e546795782dffa5d5f5e94c9510aac178fcee39 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/d727b7edb460c549d7b12b90f581048c9f4747e5 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/d90c312791129dee8c5f85cb3308323d0c39b70d create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/da322a6b88da87babb52d1527fe54cb4ac214b32 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/e5a7c086208248a15ee6fa5195fc4ce22469de15 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/f84f5d6188cf099465f0b70337b87ad8aa8efb78 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/fe1390762579b5c335bbdea73e251b95b979c3c9 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/fecccfc70b1cf1a524b9f28a9ba2c153c8e14d0e create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/fef80aa34c31700ac8e53bede4a97131176ceef0 diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index a36d2fc3820..93c3e6d8b47 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -638,6 +638,10 @@ static int on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, return 0; } } + if (p->on_header == NULL) { + grpc_mdelem_unref(md); + return 0; + } p->on_header(p->on_header_user_data, md); return 1; } @@ -1382,12 +1386,8 @@ static int parse_value_string_with_literal_key(grpc_chttp2_hpack_parser *p, /* PUBLIC INTERFACE */ -static void on_header_not_set(void *user_data, grpc_mdelem *md) { - GPR_UNREACHABLE_CODE(return ); -} - void grpc_chttp2_hpack_parser_init(grpc_chttp2_hpack_parser *p) { - p->on_header = on_header_not_set; + p->on_header = NULL; p->on_header_user_data = NULL; p->state = parse_begin; p->key.str = NULL; @@ -1455,7 +1455,7 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( stream_parsing->received_close = 1; } } - parser->on_header = on_header_not_set; + parser->on_header = NULL; parser->on_header_user_data = NULL; parser->is_boundary = 0xde; parser->is_eof = 0xde; diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/07048654244e377ddf246e8cc18f71443035cd2b b/test/core/end2end/fuzzers/client_fuzzer_corpus/07048654244e377ddf246e8cc18f71443035cd2b new file mode 100644 index 0000000000000000000000000000000000000000..142efb75d8eead564670ff87002ae485ad585b2c GIT binary patch literal 66 zcmXYoIT3&W5XANXBTK`8m=l196_Wx1l(^&>(k78gA2ld(Tz!CvrD>cWRi=B<&bnPP Jocsar=iHDy4&?v< literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/0c30868720d5e1a19ff23c53740749c37a43540d b/test/core/end2end/fuzzers/client_fuzzer_corpus/0c30868720d5e1a19ff23c53740749c37a43540d new file mode 100644 index 0000000000000000000000000000000000000000..e5a32af6fe161d8afc7cee7f73648fac87b5d849 GIT binary patch literal 22 bcmZQz;9z55U}OYhh7}A93<3uC8KM~g4P^o} literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/101305ccd08c7a8bd0c2913c37d3dd0d39d4bb64 b/test/core/end2end/fuzzers/client_fuzzer_corpus/101305ccd08c7a8bd0c2913c37d3dd0d39d4bb64 new file mode 100644 index 0000000000000000000000000000000000000000..b6e8b42b3116bd2deefce6a14ee8d216d29cddb7 GIT binary patch literal 70 zcmZQzU|>{cVgLe0MovW#Lvi9nzubwrn%gG&`RPy8)LJ=l;=+kjCr(tHn5zgB@&l;> P(KFO1Y66w|SpnGqI7Jh; literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/1160214cdb23e8fc187078a8d6796656c1ade925 b/test/core/end2end/fuzzers/client_fuzzer_corpus/1160214cdb23e8fc187078a8d6796656c1ade925 new file mode 100644 index 0000000000000000000000000000000000000000..cad5f5a378d2dc6c5ea8a0ec219495aaa3e8d8c5 GIT binary patch literal 294 zcmZWk!3_d23`-2n$oc0ERHQSG0ZuuK2WkLxIIsPE#_$QnD)4S|>w&dw|B@1M#zk3-EIP-?sN| zs704tm~k9#(K10H2W^Rd=MUR#sihU0Yxqe-awhNNynBN)D@i=Y7-V_nk%4{3hbK0O BT?7CC literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/17b1758fc7cd69a00d140f113b1ac894023ff20b b/test/core/end2end/fuzzers/client_fuzzer_corpus/17b1758fc7cd69a00d140f113b1ac894023ff20b new file mode 100644 index 0000000000000000000000000000000000000000..e9781cd249b82ba54d6ac8cb5c84d09ed88f48d8 GIT binary patch literal 161 zcmYLC!41Md40E6otYLT*7=iAP0ocLA_;CaD$r5aajvRedks~{iZD2ZH07T&gTsJxm zSvQGdWV30}nX~VYcd13;mN(A{tls~506qwjEtJ}P#0z{5Giyddg;QrZD8+wql4alQmminA>H`~cKIfwctVnuDqKSm75Z(NeMWfg3QpH=OROGdKl}=LL2W1-=2EX7vS+`oEX*nCPbL{ Qaz!*#zzo}lyR+zx2l|=P9{>OV literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/2166c7093c424a2136c4cb8b10d0b124047320d4 b/test/core/end2end/fuzzers/client_fuzzer_corpus/2166c7093c424a2136c4cb8b10d0b124047320d4 new file mode 100644 index 0000000000000000000000000000000000000000..96ca5f72210ecf354dfc9b81ceabba7e47a40949 GIT binary patch literal 420 zcmbtQu?@mN47AY~5d}NAN_6Z6L_~`) zN#<6lSeW`9FoeN<#QXxD=pEnjr^O&pi_n%V5i6k1tQ&rEhg;Obom|#;jHuv*?@f*h zCxBlWj~tP;LZs-miHcZ6O8RGm|m#cdG%dEI)*VMBhbs=r>qo6AbKBYclb UUfihYH?ooEFL7kwPo9Q-0C9GPBLDyZ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/28ee8cae75efa07da9649933a9482d00643b5395 b/test/core/end2end/fuzzers/client_fuzzer_corpus/28ee8cae75efa07da9649933a9482d00643b5395 new file mode 100644 index 0000000000000000000000000000000000000000..66a1990467e1444c217915cbe31faac47950eb05 GIT binary patch literal 22 XcmZQz;9zHDU}OLS#ufKL6bJwS56=Ob literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/29be7d33920998bae7329d77d4c81989eae91647 b/test/core/end2end/fuzzers/client_fuzzer_corpus/29be7d33920998bae7329d77d4c81989eae91647 new file mode 100644 index 0000000000000000000000000000000000000000..73ca08460915ffda247013c39341e203248cb854 GIT binary patch literal 535 zcmZ`#J5Izv4E2N*D{f&?WRoN838;JrT9D7ez50l|Nc1u2SRM2)M+DD@YTJn=>e5YUErV;-@~;3 I4W+%|1M5yFH2?qr literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/4b585eb75ebca2187c0aa5a6abe4c8125aa80127 b/test/core/end2end/fuzzers/client_fuzzer_corpus/4b585eb75ebca2187c0aa5a6abe4c8125aa80127 new file mode 100644 index 0000000000000000000000000000000000000000..13a67df57a9309b0fcb602e674e240f677848b11 GIT binary patch literal 270 zcmZXPF%H5o3`M_DBzlZ`D&+`t;0C@(Wg%|DAA(?H7FT$E|1Fw&i>I#2Wi=|Zv+i~J+BikiPp5E3Kfs}l!^zW0HPh!IK8wlNfvMNPJH?E%bk zRY)6ra~!w8{7SjHM<6^qUo%;HA@L4WQBc*%ePbW=2Y`%(^fzl$sAy u?DWhNTWPALT8;3(UUW}szg*>e=BzB<+K;0Kr1oEB{3~H5tR|?ucD(=t^MQK+ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/5482dc4af170def9c183315efaa48f9c186926a1 b/test/core/end2end/fuzzers/client_fuzzer_corpus/5482dc4af170def9c183315efaa48f9c186926a1 new file mode 100644 index 0000000000000000000000000000000000000000..f6b3c8cdc625fb22243944d62485cfc581fab624 GIT binary patch literal 151 zcmZXMu?>Vk3ywvAyk2X@B1Ib!(e4vd zREyV4u478&wP=4X+xO+mXyug1*3-|?mf+>(_Q7S$cOnQGa2|EAZEpm;;5;s7z|GduHM?>G~R)h-f>u`%9SL|5R ztuy;Ce+Uy&%T@&E>r^3|5t&2gDiMyEtq02;* idsbOb>Che0>%pg1X_?n-wB(^OqQ4$OKhpetwYdji(;<%l literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/759a1e2e34cad14321a5e5790b1e6a783312fea1 b/test/core/end2end/fuzzers/client_fuzzer_corpus/759a1e2e34cad14321a5e5790b1e6a783312fea1 new file mode 100644 index 0000000000000000000000000000000000000000..ebb072620c839b1b2ef52590fe8d9b5138ac207e GIT binary patch literal 669 zcma)(!A%4)3`LV=4l7P<1;|{onHyJDLR8=axKV(spaLHv?UmzJv)TrzffD%N$qW)J zAtFu2c4FuGJEduxuyT6lZ@PJ)BQLK>;4y?FGcnm|a~D6GxN7mwdGG$=5sQ#+a93=b zJd0V5O_<{&qt38VAzW9nYLZc`l_kj6idV}cc7Fli1NEj^_>ogO(IvF zPmVIn&CZ@X`wDXU16}^dJ`MP_qX7>1F9=j!(X7H!J<63%Jzgl3=p%QlsL0OO0=ND~ z!Jr5Fi3DBSz@?)8gyN0jDbir`D;MfVi)vze(5m*L`;KMpkV!Y-$W7fa;$MRHK~vD{ rL0|BI9*Hs1VFqw)?7i>}ax9CqTEmNY_~CX-yxeP=H(Br4LR0+)Dwfl& literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/807b8c4ca068cff4bc0fc8e854c1215a2fe65960 b/test/core/end2end/fuzzers/client_fuzzer_corpus/807b8c4ca068cff4bc0fc8e854c1215a2fe65960 new file mode 100644 index 0000000000000000000000000000000000000000..a577c535418b2ce04ed3f0f616bbce86f0fa148e GIT binary patch literal 185 zcmY+6!3~2@3`3pjALtl9Q5YtRAgiG F+W`cKG=l&D literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/831248cea079b629bf0ef6d9d02c159d6f8ed41b b/test/core/end2end/fuzzers/client_fuzzer_corpus/831248cea079b629bf0ef6d9d02c159d6f8ed41b new file mode 100644 index 0000000000000000000000000000000000000000..4bf2f2b6872035be7e61ea7a579cbd4eff0e5f15 GIT binary patch literal 294 zcmZWk!3_d23`#Srg6zN-lqHw|KNx@~+c5#f>45-Isj2Kbjw5m|GLEut zv+(Rr<57#y2n$oc0ERHQPpIt%T=AiNLA}LF4x?oh%a(VCT5Uv_ULK(Fw;+C|Z~$ia z|7jaN3D$5q6c_<^$N=o%K{)2{2j~r!U^U2Z4^@=tS&?mkJObbg7>B7- zEzTQ^t03(6PZpzPDy@u|^LqP~dYIYbl5+q{?*BLdU(iyc!<$cdLicV~O;4yE`Gllw Mu1CFO?1VWx4e5!U~}{5_s;>?5h7bCb^3@Ee04KxdO}506C9M{dzkjW HqO><0Mg}MN literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/96e5126447131d3d59cc6547f6b91d3433ce37c8 b/test/core/end2end/fuzzers/client_fuzzer_corpus/96e5126447131d3d59cc6547f6b91d3433ce37c8 new file mode 100644 index 0000000000000000000000000000000000000000..90f80d8edf6b7d8deff627319023b05766abafa4 GIT binary patch literal 456 zcmY*W!BGP-3|xhqfuRZn564#me5gPL&z(1WkxtK z-8^1^Zh@!aP6HPkP`MuEn=4X@!DGWKQT8@#lu6!_S@O0p^=dmJGY(FrwKH#+W=b?C zF}ZHp10ZWs2-cg`FfO%Lqz?Mx5{vDl7_b!u_=33VB5pqPQyierNmlu#l3YBMBOhXP cLn!}gt<|x27XJaJh~KS6J<@4*&v&rEFRwa?`2YX_ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/98dddd3f679af150e9933bd864ae20e20b7aa25a b/test/core/end2end/fuzzers/client_fuzzer_corpus/98dddd3f679af150e9933bd864ae20e20b7aa25a new file mode 100644 index 0000000000000000000000000000000000000000..bea145a96c50f0e961d32c8fd81677522c222c87 GIT binary patch literal 178 zcmYL?!41Mt3_~4S3Dz(iJ}?5^Ap@{OWR^Da?Axi?*|&vZ+e`dQ6^RomHjzzY^+xA6GA5qI$Bjt9`Ph^mt8XB;47 T#Gm$+ENl@spq6y+F~*7y`LQi^ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/9a4da2a37a26c114e1226bfbe1cf80ec5ca99a66 b/test/core/end2end/fuzzers/client_fuzzer_corpus/9a4da2a37a26c114e1226bfbe1cf80ec5ca99a66 new file mode 100644 index 0000000000000000000000000000000000000000..f07452e2e6a358c101691a2909c6a6f654f9fa4a GIT binary patch literal 184 zcmY+6u?>V!3`3pMFIdCX0mEbw6x|B9f(r(qWJ~BcfQ#gR0+5$L)5B+qOS+{BmWTcMh}*3B|wNhrJUYyJS- z`-Acbp*_B-^yEN{=B0}^QNNY#Sx8vCU(vP@Q3K%tr@RUvg(98qD^B+b=g@GLe*h&^ zu!`zAQJEjMqN@WhgWO%h|G<0T?SkytR2JyJDE<@l3ue4kof)Z`rl9V)Sz3`A{&6tM*s1^P7U!w$DXCh#CBuRuzhE(|~>VIOi|p-6Q;`Mopi{9dkgA%j`D$GcaE0#HqEz;k4g1y#??$ncxqKM55T@IMrs N=2I7U>idCeeF0Z7EQ$aC literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/af8b24ffaecdfaf96c0cd7c76f31dc9e1b4d0935 b/test/core/end2end/fuzzers/client_fuzzer_corpus/af8b24ffaecdfaf96c0cd7c76f31dc9e1b4d0935 new file mode 100644 index 0000000000000000000000000000000000000000..eb20913e285dcde69351d2e24b32291b2ade2bec GIT binary patch literal 582 zcmbu7(Fp=E42BaqP;Lr?57HaKA+m!5WEcO3g0DV0ggZHcf67%+6b=kDpIa_!>j;rSENiGlSeW|j$hWMNvDgUIBD6Wn zl&%xhwOS_bbaA*v8CaSmZ^gksTz3K%I1`+a`z^*h5)9pm+?ak4SrSY{+>PLF&TeV$!wJzakZ06%KG H9R||_^=_@{ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/b3f33b78433af7f607bc99b569b0cef95a1a6ca0 b/test/core/end2end/fuzzers/client_fuzzer_corpus/b3f33b78433af7f607bc99b569b0cef95a1a6ca0 new file mode 100644 index 0000000000000000000000000000000000000000..e27af01c2d9d622b4ec7f485ed704af2a556a418 GIT binary patch literal 669 zcma)(F-`Bwi7$g-zkl|gq71Hf8*619eH|50*@ganTg3>o4fdjiK`a>oDS~q9EtN0-t6qTvu_}$KhWiW?BfEzb+mv3{tE(CS2U}zRA;%+smBY2620ec6&2a}R^ZxS zDH!xXKarqY8@N=|A5gqeJVhF8e&tO4Xi-f}4_eh;^w6=a9W&|T((_Di>V^^j60{GR tf?f{#j0bck#*z**fMa9tg>R5!U8L0-Uc|!>w_D=nR?{?Oywx<0*JE6W!6fMmAkgZIkyTgad~=srr#U$?SEDP literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/crash-8e546795782dffa5d5f5e94c9510aac178fcee39 b/test/core/end2end/fuzzers/client_fuzzer_corpus/crash-8e546795782dffa5d5f5e94c9510aac178fcee39 new file mode 100644 index 0000000000000000000000000000000000000000..53d6fd7911940df00050d8fed3345a728e9e3b74 GIT binary patch literal 369 zcmcgo!41MN5c8ot${6=5Wtdx}Ilp4cE}2xl&V5VJbB#7a_qzo04vaH^9{tp z)+f$$*JOISMZM6O&WMrIbs-N$Ysnbwzw&JTw$P;BlNk6?ICMK|9Y`gzXE+`cps3*j3~U(UWIl literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/d727b7edb460c549d7b12b90f581048c9f4747e5 b/test/core/end2end/fuzzers/client_fuzzer_corpus/d727b7edb460c549d7b12b90f581048c9f4747e5 new file mode 100644 index 0000000000000000000000000000000000000000..ce308070d77bdac1661854dc3c612fafb89111af GIT binary patch literal 113 zcmXYo!3{uA5JdlqgOeWiB$V*=Fb92XEiw@aM@I#yNFm<@?>KLs$8Fvgk7!bzMERH_ pnQINhN;<;{bnJ(dJoryLfJ%)NHc1j@lb)B7tY&!|X=X@@@d1*yDiQzy literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/d90c312791129dee8c5f85cb3308323d0c39b70d b/test/core/end2end/fuzzers/client_fuzzer_corpus/d90c312791129dee8c5f85cb3308323d0c39b70d new file mode 100644 index 0000000000000000000000000000000000000000..9ac484174b972443775ae33cb42a3212d65ac9e8 GIT binary patch literal 290 zcmZWk%MC&?3`@{EAhyV<^sT@S-hnG9yWqncfFs*60#4!a5mgn{sbf24m&wL)Gu@x# zk?9#3j)e?n5NPc4jlA;H!bW3}TRV-3Q3A_>Tt__mEX4K_p@hYF6EeSTJw5CTxnSU84MMo0K2j=&K1Hw=Y|tt&c#moFs`fN{p3$V?_fmrb9vw0PZ` Y{kT_2@6u4~BHe{{)1-cX5#WIWe2IS*t^fc4 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/f84f5d6188cf099465f0b70337b87ad8aa8efb78 b/test/core/end2end/fuzzers/client_fuzzer_corpus/f84f5d6188cf099465f0b70337b87ad8aa8efb78 new file mode 100644 index 0000000000000000000000000000000000000000..bc36c652de7d7a9a99592b8f503da6b5bb006939 GIT binary patch literal 69 zcmZQzU|>{cVgLe0MovY=sf@XPxf3TUPRv!D=;x#EA_6Z6L_~`) zN#-n+wS}qQ0YezvN6ataiQe%Yzgi3ewFqs=60rj6%(~$xceq6@+{tBq$A}6}_}=8G za02+1@yHQbD@2N3Q-H!%HlSN{=9BIR@GlG;LYZ=IKub1 U Date: Mon, 18 Apr 2016 08:14:20 -0700 Subject: [PATCH 59/93] Dictionary support for fuzzers --- build.yaml | 3 + templates/tools/fuzzer/runners.template | 4 + test/core/end2end/fuzzers/hpack.dictionary | 91 +++++++++++++++++++ tools/codegen/core/gen_static_metadata.py | 32 +++++++ tools/fuzzer/runners/client_fuzzer.sh | 2 + .../runners/hpack_parser_fuzzer_test.sh | 2 + tools/fuzzer/runners/http_fuzzer_test.sh | 1 + tools/fuzzer/runners/json_fuzzer_test.sh | 1 + .../runners/nanopb_fuzzer_response_test.sh | 1 + .../runners/nanopb_fuzzer_serverlist_test.sh | 1 + tools/fuzzer/runners/server_fuzzer.sh | 2 + tools/fuzzer/runners/uri_fuzzer_test.sh | 1 + 12 files changed, 141 insertions(+) create mode 100644 test/core/end2end/fuzzers/hpack.dictionary diff --git a/build.yaml b/build.yaml index a6feea50746..253a76448aa 100644 --- a/build.yaml +++ b/build.yaml @@ -1185,6 +1185,7 @@ targets: - gpr corpus_dirs: - test/core/end2end/fuzzers/client_fuzzer_corpus + dict: test/core/end2end/fuzzers/hpack.dictionary maxlen: 2048 - name: compression_test build: test @@ -1674,6 +1675,7 @@ targets: - gpr corpus_dirs: - test/core/transport/chttp2/hpack_parser_corpus + dict: test/core/end2end/fuzzers/hpack.dictionary maxlen: 512 - name: hpack_parser_test build: test @@ -2025,6 +2027,7 @@ targets: - gpr corpus_dirs: - test/core/end2end/fuzzers/server_fuzzer_corpus + dict: test/core/end2end/fuzzers/hpack.dictionary maxlen: 2048 - name: server_test build: test diff --git a/templates/tools/fuzzer/runners.template b/templates/tools/fuzzer/runners.template index 4b8d4f3c68f..358d4315c27 100644 --- a/templates/tools/fuzzer/runners.template +++ b/templates/tools/fuzzer/runners.template @@ -37,6 +37,10 @@ template: | flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=${selected.maxlen}" + %if selected.get('dict'): + flags="$flags -dict=${selected.dict}" + %endif + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary new file mode 100644 index 00000000000..185048600fc --- /dev/null +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -0,0 +1,91 @@ +# hpack fuzzing dictionary +kw0="\x01""0" +kw1="\x01""1" +kw2="\x01""2" +kw3="\x03""200" +kw4="\x03""204" +kw5="\x03""206" +kw6="\x03""304" +kw7="\x03""400" +kw8="\x03""404" +kw9="\x03""500" +kw10="\x06""accept" +kw11="\x0e""accept-charset" +kw12="\x0f""accept-encoding" +kw13="\x0f""accept-language" +kw14="\x0d""accept-ranges" +kw15="\x1b""access-control-allow-origin" +kw16="\x03""age" +kw17="\x05""allow" +kw18="\x10""application/grpc" +kw19="\x0a:authority" +kw20="\x0d""authorization" +kw21="\x0d""cache-control" +kw22="\x0a""census-bin" +kw23="\x11""census-binary-bin" +kw24="\x13""content-disposition" +kw25="\x10""content-encoding" +kw26="\x10""content-language" +kw27="\x0e""content-length" +kw28="\x10""content-location" +kw29="\x0d""content-range" +kw30="\x0c""content-type" +kw31="\x06""cookie" +kw32="\x04""date" +kw33="\x07""deflate" +kw34="\x0c""deflate,gzip" +kw35="\x00" +kw36="\x04""etag" +kw37="\x06""expect" +kw38="\x07""expires" +kw39="\x04""from" +kw40="\x03GET" +kw41="\x04grpc" +kw42="\x14grpc-accept-encoding" +kw43="\x0dgrpc-encoding" +kw44="\x1egrpc-internal-encoding-request" +kw45="\x0cgrpc-message" +kw46="\x0bgrpc-status" +kw47="\x0cgrpc-timeout" +kw48="\x04gzip" +kw49="\x0dgzip, deflate" +kw50="\x04host" +kw51="\x04http" +kw52="\x05https" +kw53="\x08identity" +kw54="\x10identity,deflate" +kw55="\x15identity,deflate,gzip" +kw56="\x0didentity,gzip" +kw57="\x08if-match" +kw58="\x11if-modified-since" +kw59="\x0dif-none-match" +kw60="\x08if-range" +kw61="\x13if-unmodified-since" +kw62="\x0dlast-modified" +kw63="\x04link" +kw64="\x08location" +kw65="\x0cmax-forwards" +kw66="\x07:method" +kw67="\x05:path" +kw68="\x04POST" +kw69="\x12proxy-authenticate" +kw70="\x13proxy-authorization" +kw71="\x03PUT" +kw72="\x05range" +kw73="\x07referer" +kw74="\x07refresh" +kw75="\x0bretry-after" +kw76="\x07:scheme" +kw77="\x06server" +kw78="\x0aset-cookie" +kw79="\x01/" +kw80="\x0b/index.html" +kw81="\x07:status" +kw82="\x19strict-transport-security" +kw83="\x02te" +kw84="\x08trailers" +kw85="\x11transfer-encoding" +kw86="\x0auser-agent" +kw87="\x04vary" +kw88="\x03via" +kw89="\x10www-authenticate" diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index b4ba02bbe58..ad73a5e357b 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -205,6 +205,7 @@ all_elems = sorted(list(all_elems), key=mangle) args = sys.argv[1:] H = None C = None +D = None if args: if 'header' in args: H = sys.stdout @@ -214,11 +215,17 @@ if args: C = sys.stdout else: C = open('/dev/null', 'w') + if 'dictionary' in args: + D = sys.stdout + else: + D = open('/dev/null', 'w') else: H = open(os.path.join( os.path.dirname(sys.argv[0]), '../../../src/core/lib/transport/static_metadata.h'), 'w') C = open(os.path.join( os.path.dirname(sys.argv[0]), '../../../src/core/lib/transport/static_metadata.c'), 'w') + D = open(os.path.join( + os.path.dirname(sys.argv[0]), '../../../test/core/end2end/fuzzers/hpack.dictionary'), 'w') # copy-paste copyright notice from this file with open(sys.argv[0]) as my_source: @@ -235,6 +242,27 @@ with open(sys.argv[0]) as my_source: copyright.append(line) put_banner([H,C], [line[2:].rstrip() for line in copyright]) + +hex_bytes = [ord(c) for c in "abcdefABCDEF0123456789"] + + +def esc_c(line): + out = "\"" + last_was_hex = False + for c in line: + if 32 <= c < 127: + if c in hex_bytes and last_was_hex: + out += "\"\"" + if c != ord('"'): + out += chr(c) + else: + out += "\\\"" + last_was_hex = False + else: + out += "\\x%02x" % c + last_was_hex = True + return out + "\"" + put_banner([H,C], """WARNING: Auto-generated code. @@ -263,6 +291,10 @@ print >>H print >>C, 'grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];' print >>C +print >>D, '# hpack fuzzing dictionary' +for i, elem in enumerate(all_strs): + print >>D, 'kw%d=%s' % (i, esc_c([len(elem)] + [ord(c) for c in elem])) + print >>H, '#define GRPC_STATIC_MDELEM_COUNT %d' % len(all_elems) print >>H, 'extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];' print >>H, 'extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];' diff --git a/tools/fuzzer/runners/client_fuzzer.sh b/tools/fuzzer/runners/client_fuzzer.sh index 97d4e60d908..39bdbc8d8ac 100644 --- a/tools/fuzzer/runners/client_fuzzer.sh +++ b/tools/fuzzer/runners/client_fuzzer.sh @@ -31,6 +31,8 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" +flags="$flags -dict=test/core/end2end/fuzzers/hpack.dictionary" + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" diff --git a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh index c6f70a623dc..0cc468eeb75 100644 --- a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh +++ b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh @@ -31,6 +31,8 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=512" +flags="$flags -dict=test/core/end2end/fuzzers/hpack.dictionary" + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh index bb54a238145..a86d765509d 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -31,6 +31,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh index e11e25dc097..9d38ed8d55c 100644 --- a/tools/fuzzer/runners/json_fuzzer_test.sh +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -31,6 +31,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=512" + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" diff --git a/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh b/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh index 97359277ce2..b55d23b165e 100644 --- a/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh +++ b/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh @@ -31,6 +31,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" diff --git a/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh b/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh index 2dfaa2372fc..a75aad6f364 100644 --- a/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh +++ b/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh @@ -31,6 +31,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" diff --git a/tools/fuzzer/runners/server_fuzzer.sh b/tools/fuzzer/runners/server_fuzzer.sh index fc0567f670b..9d1d9dc17dc 100644 --- a/tools/fuzzer/runners/server_fuzzer.sh +++ b/tools/fuzzer/runners/server_fuzzer.sh @@ -31,6 +31,8 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" +flags="$flags -dict=test/core/end2end/fuzzers/hpack.dictionary" + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index 5f33e734654..8890a2b86a8 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -31,6 +31,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" + if [ "$jobs" != "1" ] then flags="-jobs=$jobs -workers=$jobs $flags" From a5780e16073b6bc1af5198321626db1a6f4f4165 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 15 Apr 2016 16:14:42 -0700 Subject: [PATCH 60/93] add RubyLanguage to benchmarking scenarios --- .../performance/remote_host_prepare.sh | 2 +- .../run_tests/performance/run_worker_ruby.sh | 35 ++++++++++++++ .../run_tests/performance/scenario_config.py | 47 +++++++++++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100755 tools/run_tests/performance/run_worker_ruby.sh diff --git a/tools/run_tests/performance/remote_host_prepare.sh b/tools/run_tests/performance/remote_host_prepare.sh index 18633d1420e..f52cccd2e24 100755 --- a/tools/run_tests/performance/remote_host_prepare.sh +++ b/tools/run_tests/performance/remote_host_prepare.sh @@ -38,7 +38,7 @@ ssh "${USER_AT_HOST}" "rm -rf ~/performance_workspace && mkdir -p ~/performance_ # TODO(jtattermusch): To be sure there are no running processes that would # mess with the results, be rough and reboot the slave here # and wait for it to come back online. -ssh "${USER_AT_HOST}" "killall qps_worker mono node || true" +ssh "${USER_AT_HOST}" "killall -9 qps_worker mono node ruby || true" # push the current sources to the slave and unpack it. scp ../grpc.tar "${USER_AT_HOST}:~/performance_workspace" diff --git a/tools/run_tests/performance/run_worker_ruby.sh b/tools/run_tests/performance/run_worker_ruby.sh new file mode 100755 index 00000000000..c9e8acb9e47 --- /dev/null +++ b/tools/run_tests/performance/run_worker_ruby.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../../.. + +ruby src/ruby/qps/worker.rb $@ diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index bd10b6f0324..c7b997f4ff2 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -429,8 +429,55 @@ class NodeLanguage: return 'node' +class RubyLanguage: + + def __init__(self): + pass + self.safename = str(self) + + def worker_cmdline(self): + return ['tools/run_tests/performance/run_worker_ruby.sh'] + + def worker_port_offset(self): + return 300 + + def scenarios(self): + # TODO(jtattermusch): add more scenarios + secargs = None + yield { + 'name': 'ruby_protobuf_unary_ping_pong', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'SYNC_CLIENT', + 'security_params': secargs, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'SYNC_SERVER', + 'security_params': secargs, + 'core_limit': 0, + 'async_server_threads': 1, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS + } + + def __str__(self): + return 'ruby' + + LANGUAGES = { 'c++' : CXXLanguage(), 'csharp' : CSharpLanguage(), 'node' : NodeLanguage(), + 'ruby' : RubyLanguage() } From edaa6ebae47349c52f0cc0d75aeafa41891d0888 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 18 Apr 2016 10:56:26 -0700 Subject: [PATCH 61/93] Go Stress test: Docker stress test images and config files to run on GKE --- templates/tools/dockerfile/go_path.include | 2 + .../Dockerfile.template | 37 +++++++ .../grpc_interop_stress_go/Dockerfile | 41 ++++++++ .../build_interop_stress.sh | 58 +++++++++++ tools/jenkins/build_interop_stress_image.sh | 16 ++++ tools/run_tests/stress_test/configs/go.json | 96 +++++++++++++++++++ 6 files changed, 250 insertions(+) create mode 100644 templates/tools/dockerfile/go_path.include create mode 100644 templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template create mode 100644 tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile create mode 100755 tools/dockerfile/stress_test/grpc_interop_stress_go/build_interop_stress.sh create mode 100644 tools/run_tests/stress_test/configs/go.json diff --git a/templates/tools/dockerfile/go_path.include b/templates/tools/dockerfile/go_path.include new file mode 100644 index 00000000000..d61b6f6984c --- /dev/null +++ b/templates/tools/dockerfile/go_path.include @@ -0,0 +1,2 @@ +# Using login shell removes Go from path, so we add it. +RUN ln -s /usr/src/go/bin/go /usr/local/bin diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template new file mode 100644 index 00000000000..20e4d825cad --- /dev/null +++ b/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template @@ -0,0 +1,37 @@ +%YAML 1.2 +--- | + # Copyright 2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM golang:1.4 + + <%include file="../../gcp_api_libraries.include"/> + <%include file="../../go_path.include"/> + # Define the default command. + CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile new file mode 100644 index 00000000000..feda3fc9bcf --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile @@ -0,0 +1,41 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM golang:1.4 + +# Google Cloud platform API libraries +RUN apt-get update && apt-get install -y python-pip && apt-get clean +RUN pip install --upgrade google-api-python-client + + +# Using login shell removes Go from path, so we add it. +RUN ln -s /usr/src/go/bin/go /usr/local/bin + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_go/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_go/build_interop_stress.sh new file mode 100755 index 00000000000..919d885c178 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_go/build_interop_stress.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds Go interop server, Stress client and metrics client in a base image. +set -e + +# Clone just the grpc-go source code without any dependencies. +# We are cloning from a local git repo that contains the right revision +# to test instead of using "go get" to download from Github directly. +git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc + +# Clone the 'grpc' repo. We just need this for the wrapper scripts under +# grpc/tools/gcp/stress_tests +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +# Get dependencies from GitHub +# NOTE: once grpc-go dependencies change, this needs to be updated manually +# but we don't expect this to happen any time soon. +go get github.com/golang/protobuf/proto +go get golang.org/x/net/context +go get golang.org/x/net/trace +go get golang.org/x/oauth2 +go get google.golang.org/cloud + +# Build the interop server, stress client and stress metrics client +(cd src/google.golang.org/grpc/interop/server && go install) +(cd src/google.golang.org/grpc/stress/client && go install) +(cd src/google.golang.org/grpc/stress/metrics_client && go install) diff --git a/tools/jenkins/build_interop_stress_image.sh b/tools/jenkins/build_interop_stress_image.sh index 29c8ed64271..31ffa752ab5 100755 --- a/tools/jenkins/build_interop_stress_image.sh +++ b/tools/jenkins/build_interop_stress_image.sh @@ -48,6 +48,22 @@ cd `dirname $0`/../.. GRPC_ROOT=`pwd` MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" +GRPC_JAVA_ROOT=`cd ../grpc-java && pwd` +if [ "$GRPC_JAVA_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_JAVA_ROOT:/var/local/jenkins/grpc-java:ro" +else + echo "WARNING: grpc-java not found, it won't be mounted to the docker container." +fi + +GRPC_GO_ROOT=`cd ../grpc-go && pwd` +if [ "$GRPC_GO_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_GO_ROOT:/var/local/jenkins/grpc-go:ro" +else + echo "WARNING: grpc-go not found, it won't be mounted to the docker container." +fi + mkdir -p /tmp/ccache # Mount service account dir if available. diff --git a/tools/run_tests/stress_test/configs/go.json b/tools/run_tests/stress_test/configs/go.json new file mode 100644 index 00000000000..36b465e763e --- /dev/null +++ b/tools/run_tests/stress_test/configs/go.json @@ -0,0 +1,96 @@ +{ + "dockerImages": { + "grpc_stress_go" : { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_go" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + } + } + }, + "templates": { + "go_client": { + "baseTemplate": "default", + "stressClientCmd": [ + "go", + "run", + "/go/src/google.golang.org/grpc/stress/client/main.go" + ], + "metricsClientCmd": [ + "go", + "run", + "/go/src/google.golang.org/grpc/stress/metrics_client/main.go" + ] + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "go_server": { + "baseTemplate": "default", + "stressServerCmd": [ + "go", + "run", + "/go/src/google.golang.org/grpc/interop/server/server.go" + ] + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "go-stress-server": { + "serverTemplate": "go_server", + "dockerImage": "grpc_stress_go", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "go-stress-client": { + "clientTemplate": "go_client", + "dockerImage": "grpc_stress_go", + "numInstances": 15, + "serverPodSpec": "go-stress-server" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8007, + "datasetIdNamePrefix": "stress_test_go", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + From 69b6d4ef621ab1fe9c7ca7f12b9e0c64d33d5fdb Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 18 Apr 2016 15:08:14 -0700 Subject: [PATCH 62/93] Better dictionary --- test/core/end2end/fuzzers/hpack.dictionary | 180 ++++++++++----------- tools/codegen/core/gen_static_metadata.py | 11 +- 2 files changed, 93 insertions(+), 98 deletions(-) diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index 185048600fc..78c4fa24032 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -1,91 +1,91 @@ # hpack fuzzing dictionary -kw0="\x01""0" -kw1="\x01""1" -kw2="\x01""2" -kw3="\x03""200" -kw4="\x03""204" -kw5="\x03""206" -kw6="\x03""304" -kw7="\x03""400" -kw8="\x03""404" -kw9="\x03""500" -kw10="\x06""accept" -kw11="\x0e""accept-charset" -kw12="\x0f""accept-encoding" -kw13="\x0f""accept-language" -kw14="\x0d""accept-ranges" -kw15="\x1b""access-control-allow-origin" -kw16="\x03""age" -kw17="\x05""allow" -kw18="\x10""application/grpc" -kw19="\x0a:authority" -kw20="\x0d""authorization" -kw21="\x0d""cache-control" -kw22="\x0a""census-bin" -kw23="\x11""census-binary-bin" -kw24="\x13""content-disposition" -kw25="\x10""content-encoding" -kw26="\x10""content-language" -kw27="\x0e""content-length" -kw28="\x10""content-location" -kw29="\x0d""content-range" -kw30="\x0c""content-type" -kw31="\x06""cookie" -kw32="\x04""date" -kw33="\x07""deflate" -kw34="\x0c""deflate,gzip" -kw35="\x00" -kw36="\x04""etag" -kw37="\x06""expect" -kw38="\x07""expires" -kw39="\x04""from" -kw40="\x03GET" -kw41="\x04grpc" -kw42="\x14grpc-accept-encoding" -kw43="\x0dgrpc-encoding" -kw44="\x1egrpc-internal-encoding-request" -kw45="\x0cgrpc-message" -kw46="\x0bgrpc-status" -kw47="\x0cgrpc-timeout" -kw48="\x04gzip" -kw49="\x0dgzip, deflate" -kw50="\x04host" -kw51="\x04http" -kw52="\x05https" -kw53="\x08identity" -kw54="\x10identity,deflate" -kw55="\x15identity,deflate,gzip" -kw56="\x0didentity,gzip" -kw57="\x08if-match" -kw58="\x11if-modified-since" -kw59="\x0dif-none-match" -kw60="\x08if-range" -kw61="\x13if-unmodified-since" -kw62="\x0dlast-modified" -kw63="\x04link" -kw64="\x08location" -kw65="\x0cmax-forwards" -kw66="\x07:method" -kw67="\x05:path" -kw68="\x04POST" -kw69="\x12proxy-authenticate" -kw70="\x13proxy-authorization" -kw71="\x03PUT" -kw72="\x05range" -kw73="\x07referer" -kw74="\x07refresh" -kw75="\x0bretry-after" -kw76="\x07:scheme" -kw77="\x06server" -kw78="\x0aset-cookie" -kw79="\x01/" -kw80="\x0b/index.html" -kw81="\x07:status" -kw82="\x19strict-transport-security" -kw83="\x02te" -kw84="\x08trailers" -kw85="\x11transfer-encoding" -kw86="\x0auser-agent" -kw87="\x04vary" -kw88="\x03via" -kw89="\x10www-authenticate" +"\x010" +"\x011" +"\x012" +"\x03200" +"\x03204" +"\x03206" +"\x03304" +"\x03400" +"\x03404" +"\x03500" +"\x06accept" +"\x0Eaccept-charset" +"\x0Faccept-encoding" +"\x0Faccept-language" +"\x0Daccept-ranges" +"\x1Baccess-control-allow-origin" +"\x03age" +"\x05allow" +"\x10application/grpc" +"\x0A:authority" +"\x0Dauthorization" +"\x0Dcache-control" +"\x0Acensus-bin" +"\x11census-binary-bin" +"\x13content-disposition" +"\x10content-encoding" +"\x10content-language" +"\x0Econtent-length" +"\x10content-location" +"\x0Dcontent-range" +"\x0Ccontent-type" +"\x06cookie" +"\x04date" +"\x07deflate" +"\x0Cdeflate,gzip" +"\x00" +"\x04etag" +"\x06expect" +"\x07expires" +"\x04from" +"\x03GET" +"\x04grpc" +"\x14grpc-accept-encoding" +"\x0Dgrpc-encoding" +"\x1Egrpc-internal-encoding-request" +"\x0Cgrpc-message" +"\x0Bgrpc-status" +"\x0Cgrpc-timeout" +"\x04gzip" +"\x0Dgzip, deflate" +"\x04host" +"\x04http" +"\x05https" +"\x08identity" +"\x10identity,deflate" +"\x15identity,deflate,gzip" +"\x0Didentity,gzip" +"\x08if-match" +"\x11if-modified-since" +"\x0Dif-none-match" +"\x08if-range" +"\x13if-unmodified-since" +"\x0Dlast-modified" +"\x04link" +"\x08location" +"\x0Cmax-forwards" +"\x07:method" +"\x05:path" +"\x04POST" +"\x12proxy-authenticate" +"\x13proxy-authorization" +"\x03PUT" +"\x05range" +"\x07referer" +"\x07refresh" +"\x0Bretry-after" +"\x07:scheme" +"\x06server" +"\x0Aset-cookie" +"\x01/" +"\x0B/index.html" +"\x07:status" +"\x19strict-transport-security" +"\x02te" +"\x08trailers" +"\x11transfer-encoding" +"\x0Auser-agent" +"\x04vary" +"\x03via" +"\x10www-authenticate" diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index ad73a5e357b..e7b9c358088 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -246,21 +246,16 @@ with open(sys.argv[0]) as my_source: hex_bytes = [ord(c) for c in "abcdefABCDEF0123456789"] -def esc_c(line): +def esc_dict(line): out = "\"" - last_was_hex = False for c in line: if 32 <= c < 127: - if c in hex_bytes and last_was_hex: - out += "\"\"" if c != ord('"'): out += chr(c) else: out += "\\\"" - last_was_hex = False else: - out += "\\x%02x" % c - last_was_hex = True + out += "\\x%02X" % c return out + "\"" put_banner([H,C], @@ -293,7 +288,7 @@ print >>C print >>D, '# hpack fuzzing dictionary' for i, elem in enumerate(all_strs): - print >>D, 'kw%d=%s' % (i, esc_c([len(elem)] + [ord(c) for c in elem])) + print >>D, '%s' % (esc_dict([len(elem)] + [ord(c) for c in elem])) print >>H, '#define GRPC_STATIC_MDELEM_COUNT %d' % len(all_elems) print >>H, 'extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];' From 5b4a9348f823b13e4070a66b61c81d9713ede786 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 18 Apr 2016 17:16:48 -0700 Subject: [PATCH 63/93] run bundle install from repo root --- tools/run_tests/pre_build_ruby.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/pre_build_ruby.sh b/tools/run_tests/pre_build_ruby.sh index 569a1d0333b..e7074c45c2d 100755 --- a/tools/run_tests/pre_build_ruby.sh +++ b/tools/run_tests/pre_build_ruby.sh @@ -33,7 +33,7 @@ set -ex export GRPC_CONFIG=${CONFIG:-opt} -# change to grpc's ruby directory -cd $(dirname $0)/../../src/ruby +# change to grpc repo root +cd $(dirname $0)/../.. bundle install From 384933582b451348a16f0d242739df3e32f37b8a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 18 Apr 2016 18:07:49 -0700 Subject: [PATCH 64/93] remove trailing whitespaces --- src/ruby/qps/worker.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ruby/qps/worker.rb b/src/ruby/qps/worker.rb index 7c29204cc2c..665fb863526 100755 --- a/src/ruby/qps/worker.rb +++ b/src/ruby/qps/worker.rb @@ -55,12 +55,12 @@ class WorkerServiceImpl < Grpc::Testing::WorkerService::Service Thread.new { bms = '' gtss = Grpc::Testing::ServerStatus - reqs.each do |req| + reqs.each do |req| case req.argtype.to_s when 'setup' bms = BenchmarkServer.new(req.setup, @server_port) q.push(gtss.new(stats: bms.mark(false), port: bms.get_port)) - when 'mark' + when 'mark' q.push(gtss.new(stats: bms.mark(req.mark.reset), cores: cpu_cores)) end end From b54f2ae5bb8ec004d602fdff9897bc71d4e6ee29 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 18 Apr 2016 18:08:23 -0700 Subject: [PATCH 65/93] actually stop benchmark server --- src/ruby/qps/server.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ruby/qps/server.rb b/src/ruby/qps/server.rb index 26f46a31409..f05fbbdaaf9 100644 --- a/src/ruby/qps/server.rb +++ b/src/ruby/qps/server.rb @@ -88,4 +88,7 @@ class BenchmarkServer def get_port @port end + def stop + @server.stop + end end From 942568bc9d7f606a24c2f5f1cb922c3c3c57be9c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 18 Apr 2016 22:19:00 -0700 Subject: [PATCH 66/93] Better dictionary --- test/core/end2end/fuzzers/hpack.dictionary | 79 ++++++++++++++++++++++ tools/codegen/core/gen_static_metadata.py | 3 + 2 files changed, 82 insertions(+) diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index 78c4fa24032..b081368ff6d 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -89,3 +89,82 @@ "\x04vary" "\x03via" "\x10www-authenticate" +"\x00\x0Eaccept-charset\x00" +"\x00\x06accept\x00" +"\x00\x0Faccept-encoding\x00" +"\x00\x0Faccept-encoding\x0Dgzip, deflate" +"\x00\x0Faccept-language\x00" +"\x00\x0Daccept-ranges\x00" +"\x00\x1Baccess-control-allow-origin\x00" +"\x00\x03age\x00" +"\x00\x05allow\x00" +"\x00\x0A:authority\x00" +"\x00\x0Dauthorization\x00" +"\x00\x0Dcache-control\x00" +"\x00\x13content-disposition\x00" +"\x00\x10content-encoding\x00" +"\x00\x10content-language\x00" +"\x00\x0Econtent-length\x00" +"\x00\x10content-location\x00" +"\x00\x0Dcontent-range\x00" +"\x00\x0Ccontent-type\x10application/grpc" +"\x00\x0Ccontent-type\x00" +"\x00\x06cookie\x00" +"\x00\x04date\x00" +"\x00\x04etag\x00" +"\x00\x06expect\x00" +"\x00\x07expires\x00" +"\x00\x04from\x00" +"\x00\x14grpc-accept-encoding\x07deflate" +"\x00\x14grpc-accept-encoding\x0Cdeflate,gzip" +"\x00\x14grpc-accept-encoding\x04gzip" +"\x00\x14grpc-accept-encoding\x08identity" +"\x00\x14grpc-accept-encoding\x10identity,deflate" +"\x00\x14grpc-accept-encoding\x15identity,deflate,gzip" +"\x00\x14grpc-accept-encoding\x0Didentity,gzip" +"\x00\x0Dgrpc-encoding\x07deflate" +"\x00\x0Dgrpc-encoding\x04gzip" +"\x00\x0Dgrpc-encoding\x08identity" +"\x00\x0Bgrpc-status\x010" +"\x00\x0Bgrpc-status\x011" +"\x00\x0Bgrpc-status\x012" +"\x00\x04host\x00" +"\x00\x08if-match\x00" +"\x00\x11if-modified-since\x00" +"\x00\x0Dif-none-match\x00" +"\x00\x08if-range\x00" +"\x00\x13if-unmodified-since\x00" +"\x00\x0Dlast-modified\x00" +"\x00\x04link\x00" +"\x00\x08location\x00" +"\x00\x0Cmax-forwards\x00" +"\x00\x07:method\x03GET" +"\x00\x07:method\x04POST" +"\x00\x07:method\x03PUT" +"\x00\x05:path\x01/" +"\x00\x05:path\x0B/index.html" +"\x00\x12proxy-authenticate\x00" +"\x00\x13proxy-authorization\x00" +"\x00\x05range\x00" +"\x00\x07referer\x00" +"\x00\x07refresh\x00" +"\x00\x0Bretry-after\x00" +"\x00\x07:scheme\x04grpc" +"\x00\x07:scheme\x04http" +"\x00\x07:scheme\x05https" +"\x00\x06server\x00" +"\x00\x0Aset-cookie\x00" +"\x00\x07:status\x03200" +"\x00\x07:status\x03204" +"\x00\x07:status\x03206" +"\x00\x07:status\x03304" +"\x00\x07:status\x03400" +"\x00\x07:status\x03404" +"\x00\x07:status\x03500" +"\x00\x19strict-transport-security\x00" +"\x00\x02te\x08trailers" +"\x00\x11transfer-encoding\x00" +"\x00\x0Auser-agent\x00" +"\x00\x04vary\x00" +"\x00\x03via\x00" +"\x00\x10www-authenticate\x00" diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index e7b9c358088..b38555e3553 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -289,6 +289,9 @@ print >>C print >>D, '# hpack fuzzing dictionary' for i, elem in enumerate(all_strs): print >>D, '%s' % (esc_dict([len(elem)] + [ord(c) for c in elem])) +for i, elem in enumerate(all_elems): + print >>D, '%s' % (esc_dict([0, len(elem[0])] + [ord(c) for c in elem[0]] + + [len(elem[1])] + [ord(c) for c in elem[1]])) print >>H, '#define GRPC_STATIC_MDELEM_COUNT %d' % len(all_elems) print >>H, 'extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];' From 7f05da6a27efe380a2b813e3cbb149b5c7fe2e6c Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Tue, 19 Apr 2016 09:31:22 -0700 Subject: [PATCH 67/93] php: ran php-cs-fixer again --- src/php/tests/bootstrap.php | 2 +- .../GeneratedCodeWithCallbackTest.php | 3 ++- src/php/tests/generated_code/math_client.php | 4 ++-- src/php/tests/unit_tests/CallCredentials3Test.php | 1 - src/php/tests/unit_tests/CallTest.php | 3 +-- .../tests/unit_tests/ChannelCredentialsTest.php | 2 +- src/php/tests/unit_tests/ChannelTest.php | 3 +-- src/php/tests/unit_tests/EndToEndTest.php | 8 ++++---- src/php/tests/unit_tests/ServerTest.php | 3 +-- src/php/tests/unit_tests/TimevalTest.php | 15 +++++++-------- 10 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/php/tests/bootstrap.php b/src/php/tests/bootstrap.php index b61f2c40a5d..8b3d4347e2e 100644 --- a/src/php/tests/bootstrap.php +++ b/src/php/tests/bootstrap.php @@ -17,5 +17,5 @@ */ error_reporting(E_ALL | E_STRICT); -require dirname(__DIR__) . '/vendor/autoload.php'; +require dirname(__DIR__).'/vendor/autoload.php'; date_default_timezone_set('UTC'); diff --git a/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php b/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php index 6bb1955ccb1..6b70b8ac10f 100644 --- a/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php +++ b/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php @@ -46,7 +46,8 @@ class GeneratedCodeWithCallbackTest extends AbstractGeneratedCodeTest $a_copy['foo'] = ['bar']; return $a_copy; - }]); + }, + ]); } public function tearDown() diff --git a/src/php/tests/generated_code/math_client.php b/src/php/tests/generated_code/math_client.php index b8652ceb088..6ee92bc465e 100644 --- a/src/php/tests/generated_code/math_client.php +++ b/src/php/tests/generated_code/math_client.php @@ -38,13 +38,13 @@ include 'tests/generated_code/math.php'; function p($line) { - print("$line
\n"); + echo "$line
\n"; } $host = 'localhost:50051'; p("Connecting to host: $host"); $client = new math\MathClient($host, [ - 'credentials' => Grpc\ChannelCredentials::createInsecure() + 'credentials' => Grpc\ChannelCredentials::createInsecure(), ]); p('Client class: '.get_class($client)); p(''); diff --git a/src/php/tests/unit_tests/CallCredentials3Test.php b/src/php/tests/unit_tests/CallCredentials3Test.php index 6d98815d16c..8f5e109bf5c 100644 --- a/src/php/tests/unit_tests/CallCredentials3Test.php +++ b/src/php/tests/unit_tests/CallCredentials3Test.php @@ -132,5 +132,4 @@ class CallCredentials3Test extends PHPUnit_Framework_TestCase unset($call); unset($server_call); } - } diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php index 1170a440fa9..fa026f09350 100755 --- a/src/php/tests/unit_tests/CallTest.php +++ b/src/php/tests/unit_tests/CallTest.php @@ -94,7 +94,7 @@ class CallTest extends PHPUnit_Framework_TestCase public function testCancel() { - $this->assertNull($this->call->cancel()); + $this->assertNull($this->call->cancel()); } /** @@ -118,5 +118,4 @@ class CallTest extends PHPUnit_Framework_TestCase ]; $result = $this->call->startBatch($batch); } - } diff --git a/src/php/tests/unit_tests/ChannelCredentialsTest.php b/src/php/tests/unit_tests/ChannelCredentialsTest.php index 1a42d69428b..56c1d8f006d 100644 --- a/src/php/tests/unit_tests/ChannelCredentialsTest.php +++ b/src/php/tests/unit_tests/ChannelCredentialsTest.php @@ -70,4 +70,4 @@ class ChanellCredentialsTest extends PHPUnit_Framework_TestCase $channel_credentials = Grpc\ChannelCredentials::createInsecure(); $this->assertNull($channel_credentials); } -} \ No newline at end of file +} diff --git a/src/php/tests/unit_tests/ChannelTest.php b/src/php/tests/unit_tests/ChannelTest.php index b6eac3109a8..a1f9053c398 100644 --- a/src/php/tests/unit_tests/ChannelTest.php +++ b/src/php/tests/unit_tests/ChannelTest.php @@ -78,5 +78,4 @@ class ChannelTest extends PHPUnit_Framework_TestCase ] ); } - -} \ No newline at end of file +} diff --git a/src/php/tests/unit_tests/EndToEndTest.php b/src/php/tests/unit_tests/EndToEndTest.php index 3fa92c950ba..2b09f9d112a 100755 --- a/src/php/tests/unit_tests/EndToEndTest.php +++ b/src/php/tests/unit_tests/EndToEndTest.php @@ -261,7 +261,8 @@ class EndToEndTest extends PHPUnit_Framework_TestCase Grpc\OP_SEND_INITIAL_METADATA => [], Grpc\OP_SEND_CLOSE_FROM_CLIENT => true, Grpc\OP_SEND_MESSAGE => ['message' => 'abc', - 'flags' => 'invalid'], + 'flags' => 'invalid', + ], ]); } @@ -574,7 +575,7 @@ class EndToEndTest extends PHPUnit_Framework_TestCase public function testGetConnectivityStateInvalidParam() { $this->assertTrue($this->channel->getConnectivityState( - new Grpc\Timeval)); + new Grpc\Timeval())); } /** @@ -591,12 +592,11 @@ class EndToEndTest extends PHPUnit_Framework_TestCase */ public function testChannelConstructorInvalidParam() { - $this->channel = new Grpc\Channel('localhost:'.$this->port, NULL); + $this->channel = new Grpc\Channel('localhost:'.$this->port, null); } public function testClose() { $this->assertNull($this->channel->close()); } - } diff --git a/src/php/tests/unit_tests/ServerTest.php b/src/php/tests/unit_tests/ServerTest.php index d18f9abe9bf..76aaa069704 100644 --- a/src/php/tests/unit_tests/ServerTest.php +++ b/src/php/tests/unit_tests/ServerTest.php @@ -67,5 +67,4 @@ class ServerTest extends PHPUnit_Framework_TestCase $this->server = new Grpc\Server([]); $this->port = $this->server->addSecureHttp2Port(['0.0.0.0:0']); } - -} \ No newline at end of file +} diff --git a/src/php/tests/unit_tests/TimevalTest.php b/src/php/tests/unit_tests/TimevalTest.php index 43abba126ab..a3dbce079f4 100755 --- a/src/php/tests/unit_tests/TimevalTest.php +++ b/src/php/tests/unit_tests/TimevalTest.php @@ -94,13 +94,13 @@ class TimevalTest extends PHPUnit_Framework_TestCase public function testSimilar() { - $a = Grpc\Timeval::now(); - $delta = new Grpc\Timeval(1000); - $b = $a->add($delta); - $thresh = new Grpc\Timeval(1100); - $this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh)); - $thresh = new Grpc\Timeval(900); - $this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh)); + $a = Grpc\Timeval::now(); + $delta = new Grpc\Timeval(1000); + $b = $a->add($delta); + $thresh = new Grpc\Timeval(1100); + $this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh)); + $thresh = new Grpc\Timeval(900); + $this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh)); } public function testSleepUntil() @@ -155,5 +155,4 @@ class TimevalTest extends PHPUnit_Framework_TestCase { $a = Grpc\Timeval::similar(1000, 1100, 1200); } - } From 9192498a083825aa31f121f1002189589e0419c4 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 18 Apr 2016 12:57:58 -0700 Subject: [PATCH 68/93] Java stress test docker images --- templates/tools/dockerfile/java_deps.include | 17 ++++ .../Dockerfile.template | 40 ++++++++ .../grpc_interop_stress_java/Dockerfile | 92 +++++++++++++++++++ .../build_interop_stress.sh | 51 ++++++++++ tools/jenkins/build_interop_stress_image.sh | 16 ++++ tools/run_tests/stress_test/configs/java.json | 90 ++++++++++++++++++ 6 files changed, 306 insertions(+) create mode 100644 templates/tools/dockerfile/java_deps.include create mode 100644 templates/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile.template create mode 100644 tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile create mode 100755 tools/dockerfile/stress_test/grpc_interop_stress_java/build_interop_stress.sh create mode 100644 tools/run_tests/stress_test/configs/java.json diff --git a/templates/tools/dockerfile/java_deps.include b/templates/tools/dockerfile/java_deps.include new file mode 100644 index 00000000000..ccd51973633 --- /dev/null +++ b/templates/tools/dockerfile/java_deps.include @@ -0,0 +1,17 @@ +# Install JDK 8 and Git +# +RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ + echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ + echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ + apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \ + apt-get update && \ + apt-get -y install \ + git \ + libapr1 \ + oracle-java8-installer \ + && \ + apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ + +ENV JAVA_HOME /usr/lib/jvm/java-8-oracle +ENV PATH $PATH:$JAVA_HOME/bin + diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile.template new file mode 100644 index 00000000000..17ed99fd2e4 --- /dev/null +++ b/templates/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile.template @@ -0,0 +1,40 @@ +%YAML 1.2 +--- | + # Copyright 2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ccache_setup.include"/> + <%include file="../../cxx_deps.include"/> + <%include file="../../gcp_api_libraries.include"/> + <%include file="../../java_deps.include"/> + # Define the default command. + CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile new file mode 100644 index 00000000000..1ee771922bc --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile @@ -0,0 +1,92 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM debian:jessie + +# Install Git and basic packages. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + golang \ + gyp \ + lcov \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + perl \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#================= +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean + +# Google Cloud platform API libraries +RUN apt-get update && apt-get install -y python-pip && apt-get clean +RUN pip install --upgrade google-api-python-client + + +# Install JDK 8 and Git +# +RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && apt-get update && apt-get -y install git libapr1 oracle-java8-installer && apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ + +ENV JAVA_HOME /usr/lib/jvm/java-8-oracle +ENV PATH $PATH:$JAVA_HOME/bin + + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_java/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_java/build_interop_stress.sh new file mode 100755 index 00000000000..d4fdfbbac96 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_java/build_interop_stress.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds C++ interop server and client in a base image. +set -e + +mkdir -p /var/local/git +# grpc-java repo +git clone --recursive --depth 1 /var/local/jenkins/grpc-java /var/local/git/grpc-java + +# grpc repo (for metrics client and for the stress test wrapper scripts) +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +# Copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +# First build the metrics client in grpc repo +cd /var/local/git/grpc +make metrics_client + +# Build all interop test targets (which includes interop server and stress test +# client) in grpc-java repo +cd /var/local/git/grpc-java +./gradlew :grpc-interop-testing:installDist -PskipCodegen=true diff --git a/tools/jenkins/build_interop_stress_image.sh b/tools/jenkins/build_interop_stress_image.sh index 29c8ed64271..31ffa752ab5 100755 --- a/tools/jenkins/build_interop_stress_image.sh +++ b/tools/jenkins/build_interop_stress_image.sh @@ -48,6 +48,22 @@ cd `dirname $0`/../.. GRPC_ROOT=`pwd` MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" +GRPC_JAVA_ROOT=`cd ../grpc-java && pwd` +if [ "$GRPC_JAVA_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_JAVA_ROOT:/var/local/jenkins/grpc-java:ro" +else + echo "WARNING: grpc-java not found, it won't be mounted to the docker container." +fi + +GRPC_GO_ROOT=`cd ../grpc-go && pwd` +if [ "$GRPC_GO_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_GO_ROOT:/var/local/jenkins/grpc-go:ro" +else + echo "WARNING: grpc-go not found, it won't be mounted to the docker container." +fi + mkdir -p /tmp/ccache # Mount service account dir if available. diff --git a/tools/run_tests/stress_test/configs/java.json b/tools/run_tests/stress_test/configs/java.json new file mode 100644 index 00000000000..d3d37f112e1 --- /dev/null +++ b/tools/run_tests/stress_test/configs/java.json @@ -0,0 +1,90 @@ +{ + "dockerImages": { + "grpc_stress_java" : { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_java" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + } + } + }, + "templates": { + "java_client": { + "baseTemplate": "default", + "stressClientCmd": [ + "/var/local/git/grpc-java/interop-testing/build/install/grpc-interop-testing/bin/stresstest-client" + ], + "metricsClientCmd": [ + "/var/local/git/grpc/bins/opt/metrics_client" + ] + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "java_server": { + "baseTemplate": "default", + "stressServerCmd": [ + "/var/local/git/grpc-java/interop-testing/build/install/grpc-interop-testing/bin/test-server" + ] + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "java-stress-server": { + "serverTemplate": "java_server", + "dockerImage": "grpc_stress_java", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "java-stress-client": { + "clientTemplate": "java_client", + "dockerImage": "grpc_stress_java", + "numInstances": 15, + "serverPodSpec": "java-stress-server" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8008, + "datasetIdNamePrefix": "stress_test_java", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + From 5bc112c0c967d4f97823162ae4f2468c033eec79 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 18 Apr 2016 15:34:04 -0700 Subject: [PATCH 69/93] Add a will_run_forever flag to handle cases where the process terminates with exit code of 0 --- tools/gcp/stress_test/run_client.py | 8 +++++++- tools/gcp/stress_test/run_server.py | 8 +++++++- tools/run_tests/stress_test/configs/java.json | 5 +++-- tools/run_tests/stress_test/run_on_gke.py | 17 +++++++++++------ 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/tools/gcp/stress_test/run_client.py b/tools/gcp/stress_test/run_client.py index 9a4bc8a3918..8f2a9c1530f 100755 --- a/tools/gcp/stress_test/run_client.py +++ b/tools/gcp/stress_test/run_client.py @@ -103,6 +103,11 @@ def run_client(): dataset_id = env['DATASET_ID'] summary_table_id = env['SUMMARY_TABLE_ID'] qps_table_id = env['QPS_TABLE_ID'] + # The following parameter is to inform us whether the stress client runs + # forever until forcefully stopped or will it naturally stop after sometime. + # This way, we know that the stress client process should not terminate (even + # if it does with a success exit code) and flag the termination as a failure + will_run_forever = env.get('WILL_RUN_FOREVER', '1') bq_helper = BigQueryHelper(run_id, image_type, pod_name, project_id, dataset_id, summary_table_id, qps_table_id) @@ -140,11 +145,12 @@ def run_client(): while True: # Check if stress_client is still running. If so, collect metrics and upload # to BigQuery status table + # If stress_p.poll() is not None, it means that the stress client terminated if stress_p.poll() is not None: end_time = datetime.datetime.now().isoformat() event_type = EventType.SUCCESS details = 'End time: %s' % end_time - if stress_p.returncode != 0: + if will_run_forever == '1' or stress_p.returncode != 0: event_type = EventType.FAILURE details = 'Return code = %d. End time: %s' % (stress_p.returncode, end_time) diff --git a/tools/gcp/stress_test/run_server.py b/tools/gcp/stress_test/run_server.py index 0d9a653d186..796f0923f86 100755 --- a/tools/gcp/stress_test/run_server.py +++ b/tools/gcp/stress_test/run_server.py @@ -69,6 +69,11 @@ def run_server(): dataset_id = env['DATASET_ID'] summary_table_id = env['SUMMARY_TABLE_ID'] qps_table_id = env['QPS_TABLE_ID'] + # The following parameter is to inform us whether the server runs forever + # until forcefully stopped or will it naturally stop after sometime. + # This way, we know that the process should not terminate (even if it does + # with a success exit code) and flag any termination as a failure. + will_run_forever = env.get('WILL_RUN_FOREVER', '1') logfile_name = env.get('LOGFILE_NAME') @@ -106,7 +111,8 @@ def run_server(): stderr=subprocess.STDOUT) returncode = stress_p.wait() - if returncode != 0: + + if will_run_forever == '1' or returncode != 0: end_time = datetime.datetime.now().isoformat() event_type = EventType.FAILURE details = 'Returncode: %d; End time: %s' % (returncode, end_time) diff --git a/tools/run_tests/stress_test/configs/java.json b/tools/run_tests/stress_test/configs/java.json index d3d37f112e1..275384c066d 100644 --- a/tools/run_tests/stress_test/configs/java.json +++ b/tools/run_tests/stress_test/configs/java.json @@ -43,7 +43,8 @@ "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", "serverPort": 8080, "serverArgs": { - "port": 8080 + "port": 8080, + "use_tls": "false" } } }, @@ -70,7 +71,7 @@ "java-stress-client": { "clientTemplate": "java_client", "dockerImage": "grpc_stress_java", - "numInstances": 15, + "numInstances": 10, "serverPodSpec": "java-stress-server" } } diff --git a/tools/run_tests/stress_test/run_on_gke.py b/tools/run_tests/stress_test/run_on_gke.py index 916c890cbd5..d4f1c4ad3dc 100755 --- a/tools/run_tests/stress_test/run_on_gke.py +++ b/tools/run_tests/stress_test/run_on_gke.py @@ -69,7 +69,7 @@ class ClientTemplate: def __init__(self, name, stress_client_cmd, metrics_client_cmd, metrics_port, wrapper_script_path, poll_interval_secs, client_args_dict, - metrics_args_dict): + metrics_args_dict, will_run_forever): self.name = name self.stress_client_cmd = stress_client_cmd self.metrics_client_cmd = metrics_client_cmd @@ -78,18 +78,20 @@ class ClientTemplate: self.poll_interval_secs = poll_interval_secs self.client_args_dict = client_args_dict self.metrics_args_dict = metrics_args_dict + self.will_run_forever = will_run_forever class ServerTemplate: """ Contains all the common settings used by a stress server """ def __init__(self, name, server_cmd, wrapper_script_path, server_port, - server_args_dict): + server_args_dict, will_run_forever): self.name = name self.server_cmd = server_cmd self.wrapper_script_path = wrapper_script_path self.server_port = server_port self.server_args_dict = server_args_dict + self.will_run_forever = will_run_forever class DockerImage: @@ -242,7 +244,8 @@ class Gke: 'STRESS_TEST_IMAGE_TYPE': 'SERVER', 'STRESS_TEST_CMD': server_pod_spec.template.server_cmd, 'STRESS_TEST_ARGS_STR': self._args_dict_to_str( - server_pod_spec.template.server_args_dict) + server_pod_spec.template.server_args_dict), + 'WILL_RUN_FOREVER': str(server_pod_spec.template.will_run_forever) }) for pod_name in server_pod_spec.pod_names(): @@ -288,7 +291,8 @@ class Gke: 'METRICS_CLIENT_CMD': client_pod_spec.template.metrics_client_cmd, 'METRICS_CLIENT_ARGS_STR': self._args_dict_to_str( client_pod_spec.template.metrics_args_dict), - 'POLL_INTERVAL_SECS': str(client_pod_spec.template.poll_interval_secs) + 'POLL_INTERVAL_SECS': str(client_pod_spec.template.poll_interval_secs), + 'WILL_RUN_FOREVER': str(client_pod_spec.template.will_run_forever) }) for pod_name in client_pod_spec.pod_names(): @@ -421,7 +425,7 @@ class Config: template_name, stress_client_cmd, metrics_client_cmd, temp_dict['metricsPort'], temp_dict['wrapperScriptPath'], temp_dict['pollIntervalSecs'], temp_dict['clientArgs'].copy(), - temp_dict['metricsArgs'].copy()) + temp_dict['metricsArgs'].copy(), temp_dict.get('willRunForever', 1)) return client_templates_dict @@ -456,7 +460,8 @@ class Config: stress_server_cmd = ' '.join(temp_dict['stressServerCmd']) server_templates_dict[template_name] = ServerTemplate( template_name, stress_server_cmd, temp_dict['wrapperScriptPath'], - temp_dict['serverPort'], temp_dict['serverArgs'].copy()) + temp_dict['serverPort'], temp_dict['serverArgs'].copy(), + temp_dict.get('willRunForever', 1)) return server_templates_dict From de874a101fefd493eb861531d8bdb299b68dd565 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 18 Apr 2016 09:21:37 -0700 Subject: [PATCH 70/93] add java performance worker --- .../performance/build_performance.sh | 13 +++-- .../performance/remote_host_prepare.sh | 2 + .../run_tests/performance/run_worker_java.sh | 39 +++++++++++++++ .../run_tests/performance/scenario_config.py | 50 ++++++++++++++++++- tools/run_tests/run_performance_tests.py | 15 ++++-- 5 files changed, 110 insertions(+), 9 deletions(-) create mode 100755 tools/run_tests/performance/run_worker_java.sh diff --git a/tools/run_tests/performance/build_performance.sh b/tools/run_tests/performance/build_performance.sh index 2c962cba37d..85769abc496 100755 --- a/tools/run_tests/performance/build_performance.sh +++ b/tools/run_tests/performance/build_performance.sh @@ -45,8 +45,15 @@ make CONFIG=${CONFIG} EMBED_OPENSSL=true EMBED_ZLIB=true qps_worker qps_driver q for language in $@ do - if [ "$language" != "c++" ] - then + case "$language" in + "c++") + ;; # C++ has already been built. + "java") + (cd ../grpc-java/ && + ./gradlew -PskipCodegen=true :grpc-benchmarks:installDist) + ;; + *) tools/run_tests/run_tests.py -l $language -c $CONFIG --build_only -j 8 - fi + ;; + esac done diff --git a/tools/run_tests/performance/remote_host_prepare.sh b/tools/run_tests/performance/remote_host_prepare.sh index f52cccd2e24..a660d294581 100755 --- a/tools/run_tests/performance/remote_host_prepare.sh +++ b/tools/run_tests/performance/remote_host_prepare.sh @@ -38,6 +38,8 @@ ssh "${USER_AT_HOST}" "rm -rf ~/performance_workspace && mkdir -p ~/performance_ # TODO(jtattermusch): To be sure there are no running processes that would # mess with the results, be rough and reboot the slave here # and wait for it to come back online. +# TODO(jtattermusch): Kill all java QpsWorkers, but killall java +# could also kill jenkins. ssh "${USER_AT_HOST}" "killall -9 qps_worker mono node ruby || true" # push the current sources to the slave and unpack it. diff --git a/tools/run_tests/performance/run_worker_java.sh b/tools/run_tests/performance/run_worker_java.sh new file mode 100755 index 00000000000..d5503a18a4e --- /dev/null +++ b/tools/run_tests/performance/run_worker_java.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +# Enter repo root +cd $(dirname $0)/../../.. + +# Enter the grpc-java repo root (expected to be next to grpc repo root) +cd ../grpc-java + +benchmarks/build/install/grpc-benchmarks/bin/benchmark_worker $@ diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index c7b997f4ff2..c63e0dbc381 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -31,6 +31,7 @@ SINGLE_MACHINE_CORES=8 WARMUP_SECONDS=5 +JAVA_WARMUP_SECONDS=15 # Java needs more warmup time for JIT to kick in. BENCHMARK_SECONDS=30 HISTOGRAM_PARAMS = { @@ -475,9 +476,56 @@ class RubyLanguage: return 'ruby' +class JavaLanguage: + + def __init__(self): + pass + self.safename = str(self) + + def worker_cmdline(self): + return ['tools/run_tests/performance/run_worker_java.sh'] + + def worker_port_offset(self): + return 400 + + def scenarios(self): + # TODO(jtattermusch): add more scenarios + secargs = None + yield { + 'name': 'java_protobuf_unary_ping_pong', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'SYNC_CLIENT', + 'security_params': secargs, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'SYNC_SERVER', + 'security_params': secargs, + 'core_limit': 0, + 'async_server_threads': 1, + }, + 'warmup_seconds': JAVA_WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS + } + + def __str__(self): + return 'java' + + LANGUAGES = { 'c++' : CXXLanguage(), 'csharp' : CSharpLanguage(), 'node' : NodeLanguage(), - 'ruby' : RubyLanguage() + 'ruby' : RubyLanguage(), + 'java' : JavaLanguage(), } diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index beedd819ad0..c820a5493bd 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -131,11 +131,16 @@ def create_quit_jobspec(workers, remote_host=None): verbose_success=True) -def archive_repo(): +def archive_repo(languages): """Archives local version of repo including submodules.""" - # TODO: also archive grpc-go and grpc-java repos + cmdline=['tar', '-cf', '../grpc.tar', '../grpc/'] + if 'java' in languages: + cmdline.append('../grpc-java') + if 'go' in languages: + cmdline.append('../grpc-go') + archive_job = jobset.JobSpec( - cmdline=['tar', '-cf', '../grpc.tar', '../grpc/'], + cmdline=cmdline, shortname='archive_repo', timeout_seconds=3*60) @@ -144,7 +149,7 @@ def archive_repo(): [archive_job], newline_on_success=True, maxjobs=1) if num_failures == 0: jobset.message('SUCCESS', - 'Archive with local repository create successfully.', + 'Archive with local repository created successfully.', do_newline=True) else: jobset.message('FAILED', 'Failed to archive local repository.', @@ -316,7 +321,7 @@ if args.remote_driver_host: remote_hosts.add(args.remote_driver_host) if remote_hosts: - archive_repo() + archive_repo(languages=[str(l) for l in languages]) prepare_remote_hosts(remote_hosts) build_local = False From 9d4e4ffbad75a19bc77761e3e640ff9c7835a239 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 19 Apr 2016 12:24:14 -0700 Subject: [PATCH 71/93] Fix back slashes in the template and break the RUN steps --- templates/tools/dockerfile/java_deps.include | 22 +++++++++---------- .../grpc_interop_stress_java/Dockerfile | 12 +++++++++- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/templates/tools/dockerfile/java_deps.include b/templates/tools/dockerfile/java_deps.include index ccd51973633..40d70e06d1a 100644 --- a/templates/tools/dockerfile/java_deps.include +++ b/templates/tools/dockerfile/java_deps.include @@ -1,16 +1,16 @@ # Install JDK 8 and Git # -RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ - echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ - echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \ - apt-get update && \ - apt-get -y install \ - git \ - libapr1 \ - oracle-java8-installer \ - && \ - apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ +RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && ${'\\'} + echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'} + echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'} + apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 + +RUN apt-get update && apt-get -y install ${'\\'} + git ${'\\'} + libapr1 ${'\\'} + oracle-java8-installer ${'\\'} + && ${'\\'} + apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENV PATH $PATH:$JAVA_HOME/bin diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile index 1ee771922bc..69bef1480c8 100644 --- a/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile +++ b/tools/dockerfile/stress_test/grpc_interop_stress_java/Dockerfile @@ -82,7 +82,17 @@ RUN pip install --upgrade google-api-python-client # Install JDK 8 and Git # -RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && apt-get update && apt-get -y install git libapr1 oracle-java8-installer && apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ +RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ + echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ + echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ + apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 + +RUN apt-get update && apt-get -y install \ + git \ + libapr1 \ + oracle-java8-installer \ + && \ + apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENV PATH $PATH:$JAVA_HOME/bin From f7d9cbe65861fb796698d1d741d0ed798ffa8a53 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 19 Apr 2016 14:10:18 -0700 Subject: [PATCH 72/93] PR comments --- tools/codegen/core/gen_nano_proto.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/codegen/core/gen_nano_proto.sh b/tools/codegen/core/gen_nano_proto.sh index db69d28ae78..e2d2f672e93 100755 --- a/tools/codegen/core/gen_nano_proto.sh +++ b/tools/codegen/core/gen_nano_proto.sh @@ -34,6 +34,13 @@ # tools/codegen/core/gen_nano_proto.sh \ # src/proto/grpc/lb/v0/load_balancer.proto # $PWD/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0 +# +# Exit statuses: +# 1: Incorrect number of arguments +# 2: Input proto file (1st argument) doesn't exist or is not a regular file. +# 3: Options file for nanopb not found in same dir as the input proto file. +# 4: Output dir not an absolute path. +# 5: Couldn't create output directory (2nd argument). read -r -d '' COPYRIGHT <<'EOF' /* @@ -76,7 +83,7 @@ COPYRIGHT_FILE=$(mktemp) echo "${COPYRIGHT//$CURRENT_YEAR}" > $COPYRIGHT_FILE set -ex -if [ $# -lt 2 ]; then +if [ $# -lt 2 ] || [ $# -gt 3 ]; then echo "Usage: $0 [grpc path]" exit 1 fi @@ -89,22 +96,22 @@ readonly EXPECTED_OPTIONS_FILE_PATH="${1%.*}.options" if [[ ! -f "$INPUT_PROTO" ]]; then echo "Input proto file '$INPUT_PROTO' doesn't exist." - exit 3 + exit 2 fi if [[ ! -f "${EXPECTED_OPTIONS_FILE_PATH}" ]]; then echo "Expected nanopb options file '${EXPECTED_OPTIONS_FILE_PATH}' missing" - exit 4 + exit 3 fi if [[ "${OUTPUT_DIR:0:1}" != '/' ]]; then echo "The output directory must be an absolute path. Got '$OUTPUT_DIR'" - exit 5 + exit 4 fi mkdir -p "$OUTPUT_DIR" if [ $? != 0 ]; then echo "Error creating output directory $OUTPUT_DIR" - exit 2 + exit 5 fi readonly VENV_DIR=$(mktemp -d) From f3b523b6c89770d1c04ee21c6c9d6800ee2e0091 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 19 Apr 2016 14:32:37 -0700 Subject: [PATCH 73/93] make RVM ruby accessible by performance tests --- tools/run_tests/performance/build_performance.sh | 1 + tools/run_tests/performance/run_worker_ruby.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/run_tests/performance/build_performance.sh b/tools/run_tests/performance/build_performance.sh index 85769abc496..0c9211b643c 100755 --- a/tools/run_tests/performance/build_performance.sh +++ b/tools/run_tests/performance/build_performance.sh @@ -28,6 +28,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +source ~/.rvm/scripts/rvm set -ex cd $(dirname $0)/../../.. diff --git a/tools/run_tests/performance/run_worker_ruby.sh b/tools/run_tests/performance/run_worker_ruby.sh index c9e8acb9e47..43187345bce 100755 --- a/tools/run_tests/performance/run_worker_ruby.sh +++ b/tools/run_tests/performance/run_worker_ruby.sh @@ -28,6 +28,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +source ~/.rvm/scripts/rvm set -ex cd $(dirname $0)/../../.. From dba4c5fd0144b68916b4dc2bbbd02d12c2e12041 Mon Sep 17 00:00:00 2001 From: Deepak Lukose Date: Fri, 25 Mar 2016 12:54:25 -0700 Subject: [PATCH 74/93] Add various options to verify ssl/tls client cert including letting the application handle the authentication. --- BUILD | 2 + Makefile | 37 + build.yaml | 2 + gRPC.podspec | 1 + grpc.def | 1 + grpc.gemspec | 1 + include/grpc++/security/server_credentials.h | 15 +- include/grpc/grpc_security.h | 38 +- include/grpc/grpc_security_constants.h | 114 +++ package.xml | 1 + src/core/lib/security/credentials.c | 27 +- src/core/lib/security/security_connector.c | 34 +- src/core/lib/security/security_connector.h | 2 +- src/core/lib/tsi/ssl_transport_security.c | 54 +- src/core/lib/tsi/ssl_transport_security.h | 17 + .../lib/tsi/transport_security_interface.h | 9 + src/cpp/server/secure_server_credentials.cc | 8 +- src/csharp/ext/grpc_csharp_ext.c | 9 +- src/node/ext/server_credentials.cc | 13 +- src/php/ext/grpc/server_credentials.c | 9 +- src/proto/grpc/binary_log/v1alpha/log.proto | 2 +- .../grpc/_cython/_cygrpc/credentials.pyx.pxi | 4 +- .../grpcio/grpc/_cython/_cygrpc/grpc.pxi | 7 + .../grpcio/grpc/_cython/imports.generated.c | 2 + .../grpcio/grpc/_cython/imports.generated.h | 3 + src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 + src/ruby/ext/grpc/rb_grpc_imports.generated.h | 3 + src/ruby/ext/grpc/rb_server_credentials.c | 24 +- test/core/end2end/data/client_certs.c | 343 +++++++ test/core/end2end/data/ssl_test_data.h | 4 + test/core/end2end/fixtures/h2_ssl_cert.c | 376 ++++++++ test/core/end2end/gen_build_yaml.py | 1 + .../core/surface/public_headers_must_be_c89.c | 1 + tools/doxygen/Doxyfile.core | 1 + tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 20 + tools/run_tests/tests.json | 836 ++++++++++++++++++ vsprojects/buildtests_c.sln | 28 + vsprojects/vcxproj/grpc/grpc.vcxproj | 1 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 + .../grpc_test_util/grpc_test_util.vcxproj | 2 + .../grpc_test_util.vcxproj.filters | 3 + .../h2_ssl_cert_test/h2_ssl_cert_test.vcxproj | 202 +++++ .../h2_ssl_cert_test.vcxproj.filters | 24 + 44 files changed, 2221 insertions(+), 66 deletions(-) create mode 100644 include/grpc/grpc_security_constants.h create mode 100644 test/core/end2end/data/client_certs.c create mode 100644 test/core/end2end/fixtures/h2_ssl_cert.c create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj.filters diff --git a/BUILD b/BUILD index b4751a70810..e42505d02f1 100644 --- a/BUILD +++ b/BUILD @@ -481,6 +481,7 @@ cc_library( "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", "include/grpc/grpc_security.h", + "include/grpc/grpc_security_constants.h", "include/grpc/census.h", ], includes = [ @@ -1492,6 +1493,7 @@ objc_library( "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", "include/grpc/grpc_security.h", + "include/grpc/grpc_security_constants.h", "include/grpc/census.h", "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.h", diff --git a/Makefile b/Makefile index 50fc16753ae..955731e6468 100644 --- a/Makefile +++ b/Makefile @@ -1106,6 +1106,7 @@ h2_sockpair_test: $(BINDIR)/$(CONFIG)/h2_sockpair_test h2_sockpair+trace_test: $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test h2_sockpair_1byte_test: $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test h2_ssl_test: $(BINDIR)/$(CONFIG)/h2_ssl_test +h2_ssl_cert_test: $(BINDIR)/$(CONFIG)/h2_ssl_cert_test h2_ssl_proxy_test: $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test h2_uds_test: $(BINDIR)/$(CONFIG)/h2_uds_test h2_census_nosec_test: $(BINDIR)/$(CONFIG)/h2_census_nosec_test @@ -1333,6 +1334,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test \ $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test \ $(BINDIR)/$(CONFIG)/h2_ssl_test \ + $(BINDIR)/$(CONFIG)/h2_ssl_cert_test \ $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test \ $(BINDIR)/$(CONFIG)/h2_uds_test \ $(BINDIR)/$(CONFIG)/h2_census_nosec_test \ @@ -2640,6 +2642,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ include/grpc/grpc_security.h \ + include/grpc/grpc_security_constants.h \ include/grpc/census.h \ LIBGRPC_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_SRC)))) @@ -2695,6 +2698,7 @@ endif LIBGRPC_TEST_UTIL_SRC = \ + test/core/end2end/data/client_certs.c \ test/core/end2end/data/server1_cert.c \ test/core/end2end/data/server1_key.c \ test/core/end2end/data/test_root_cert.c \ @@ -13542,6 +13546,38 @@ endif endif +H2_SSL_CERT_TEST_SRC = \ + test/core/end2end/fixtures/h2_ssl_cert.c \ + +H2_SSL_CERT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_SSL_CERT_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/h2_ssl_cert_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/h2_ssl_cert_test: $(H2_SSL_CERT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_SSL_CERT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_cert_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl_cert.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_ssl_cert_test: $(H2_SSL_CERT_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(H2_SSL_CERT_TEST_OBJS:.o=.dep) +endif +endif + + H2_SSL_PROXY_TEST_SRC = \ test/core/end2end/fixtures/h2_ssl_proxy.c \ @@ -14101,6 +14137,7 @@ src/cpp/server/secure_server_credentials.cc: $(OPENSSL_DEP) src/csharp/ext/grpc_csharp_ext.c: $(OPENSSL_DEP) test/core/bad_client/bad_client.c: $(OPENSSL_DEP) test/core/bad_ssl/server_common.c: $(OPENSSL_DEP) +test/core/end2end/data/client_certs.c: $(OPENSSL_DEP) test/core/end2end/data/server1_cert.c: $(OPENSSL_DEP) test/core/end2end/data/server1_key.c: $(OPENSSL_DEP) test/core/end2end/data/test_root_cert.c: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index a9a9e6ac9f3..22c9ff5c068 100644 --- a/build.yaml +++ b/build.yaml @@ -525,6 +525,7 @@ filegroups: - name: grpc_secure public_headers: - include/grpc/grpc_security.h + - include/grpc/grpc_security_constants.h headers: - src/core/lib/security/auth_filters.h - src/core/lib/security/b64.h @@ -755,6 +756,7 @@ libs: - test/core/end2end/data/ssl_test_data.h - test/core/security/oauth2_utils.h src: + - test/core/end2end/data/client_certs.c - test/core/end2end/data/server1_cert.c - test/core/end2end/data/server1_key.c - test/core/end2end/data/test_root_cert.c diff --git a/gRPC.podspec b/gRPC.podspec index 7ede97d1a9b..859c2c9672f 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -323,6 +323,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync_win32.h', 'include/grpc/impl/codegen/time.h', 'include/grpc/grpc_security.h', + 'include/grpc/grpc_security_constants.h', 'include/grpc/census.h', 'src/core/lib/channel/channel_args.c', 'src/core/lib/channel/channel_stack.c', diff --git a/grpc.def b/grpc.def index f81aa1b05a6..17d2ec47c90 100644 --- a/grpc.def +++ b/grpc.def @@ -114,6 +114,7 @@ EXPORTS grpc_secure_channel_create grpc_server_credentials_release grpc_ssl_server_credentials_create + grpc_ssl_server_credentials_create_ex grpc_server_add_secure_http2_port grpc_call_set_credentials grpc_server_credentials_set_auth_metadata_processor diff --git a/grpc.gemspec b/grpc.gemspec index 9c858b25791..bac1f186f2f 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -171,6 +171,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/sync_win32.h ) s.files += %w( include/grpc/impl/codegen/time.h ) s.files += %w( include/grpc/grpc_security.h ) + s.files += %w( include/grpc/grpc_security_constants.h ) s.files += %w( include/grpc/census.h ) s.files += %w( src/core/lib/channel/channel_args.h ) s.files += %w( src/core/lib/channel/channel_stack.h ) diff --git a/include/grpc++/security/server_credentials.h b/include/grpc++/security/server_credentials.h index 5a9f8a42e29..229bab8d849 100644 --- a/include/grpc++/security/server_credentials.h +++ b/include/grpc++/security/server_credentials.h @@ -39,6 +39,7 @@ #include #include +#include struct grpc_server; @@ -69,7 +70,13 @@ class ServerCredentials { /// Options to create ServerCredentials with SSL struct SslServerCredentialsOptions { - SslServerCredentialsOptions() : force_client_auth(false) {} + // Deprecated + SslServerCredentialsOptions() + : force_client_auth(false), + client_certificate_request(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE) {} + SslServerCredentialsOptions( + grpc_ssl_client_certificate_request_type request_type) + : force_client_auth(false), client_certificate_request(request_type) {} struct PemKeyCertPair { grpc::string private_key; @@ -77,7 +84,13 @@ struct SslServerCredentialsOptions { }; grpc::string pem_root_certs; std::vector pem_key_cert_pairs; + // Deprecated bool force_client_auth; + + // If both force_client_auth and client_certificate_request fields are set, + // force_client_auth takes effect i.e + // REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY will be enforced. + grpc_ssl_client_certificate_request_type client_certificate_request; }; /// Builds SSL ServerCredentials given SSL specific options diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index a36926b23e6..79199cc5d68 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -35,6 +35,7 @@ #define GRPC_GRPC_SECURITY_H #include +#include #include #ifdef __cplusplus @@ -43,13 +44,6 @@ extern "C" { /* --- Authentication Context. --- */ -#define GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME "transport_security_type" -#define GRPC_SSL_TRANSPORT_SECURITY_TYPE "ssl" - -#define GRPC_X509_CN_PROPERTY_NAME "x509_common_name" -#define GRPC_X509_SAN_PROPERTY_NAME "x509_subject_alternative_name" -#define GRPC_X509_PEM_CERT_PROPERTY_NAME "x509_pem_cert" - typedef struct grpc_auth_context grpc_auth_context; typedef struct grpc_auth_property_iterator { @@ -130,29 +124,11 @@ typedef struct grpc_channel_credentials grpc_channel_credentials; The creator of the credentials object is responsible for its release. */ GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials *creds); -/* Environment variable that points to the google default application - credentials json key or refresh token. Used in the - grpc_google_default_credentials_create function. */ -#define GRPC_GOOGLE_CREDENTIALS_ENV_VAR "GOOGLE_APPLICATION_CREDENTIALS" - /* Creates default credentials to connect to a google gRPC service. WARNING: Do NOT use this credentials to connect to a non-google service as this could result in an oauth2 token leak. */ GRPCAPI grpc_channel_credentials *grpc_google_default_credentials_create(void); -/* Environment variable that points to the default SSL roots file. This file - must be a PEM encoded file with all the roots such as the one that can be - downloaded from https://pki.google.com/roots.pem. */ -#define GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR \ - "GRPC_DEFAULT_SSL_ROOTS_FILE_PATH" - -/* Results for the SSL roots override callback. */ -typedef enum { - GRPC_SSL_ROOTS_OVERRIDE_OK, - GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY, /* Do not try fallback options. */ - GRPC_SSL_ROOTS_OVERRIDE_FAIL -} grpc_ssl_roots_override_result; - /* Callback for getting the SSL roots override from the application. In case of success, *pem_roots_certs must be set to a NULL terminated string containing the list of PEM encoded root certificates. The ownership is passed @@ -334,7 +310,8 @@ typedef struct grpc_server_credentials grpc_server_credentials; */ GRPCAPI void grpc_server_credentials_release(grpc_server_credentials *creds); -/* Creates an SSL server_credentials object. +/* Deprecated in favor of grpc_ssl_server_credentials_create_ex. + Creates an SSL server_credentials object. - pem_roots_cert is the NULL-terminated string containing the PEM encoding of the client root certificates. This parameter may be NULL if the server does not want the client to be authenticated with SSL. @@ -349,6 +326,15 @@ GRPCAPI grpc_server_credentials *grpc_ssl_server_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved); +/* Same as grpc_ssl_server_credentials_create method except uses + grpc_ssl_client_certificate_request_type enum to support more ways to + authenticate client cerificates.*/ +GRPCAPI grpc_server_credentials *grpc_ssl_server_credentials_create_ex( + const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, + size_t num_key_cert_pairs, + grpc_ssl_client_certificate_request_type client_certificate_request, + void *reserved); + /* --- Server-side secure ports. --- */ /* Add a HTTP2 over an encrypted link over tcp listener. diff --git a/include/grpc/grpc_security_constants.h b/include/grpc/grpc_security_constants.h new file mode 100644 index 00000000000..da05c5a97b3 --- /dev/null +++ b/include/grpc/grpc_security_constants.h @@ -0,0 +1,114 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_GRPC_SECURITY_CONSTANTS_H +#define GRPC_GRPC_SECURITY_CONSTANTS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME "transport_security_type" +#define GRPC_SSL_TRANSPORT_SECURITY_TYPE "ssl" + +#define GRPC_X509_CN_PROPERTY_NAME "x509_common_name" +#define GRPC_X509_SAN_PROPERTY_NAME "x509_subject_alternative_name" +#define GRPC_X509_PEM_CERT_PROPERTY_NAME "x509_pem_cert" + +/* Environment variable that points to the default SSL roots file. This file + must be a PEM encoded file with all the roots such as the one that can be + downloaded from https://pki.google.com/roots.pem. */ +#define GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR \ + "GRPC_DEFAULT_SSL_ROOTS_FILE_PATH" + +/* Environment variable that points to the google default application + credentials json key or refresh token. Used in the + grpc_google_default_credentials_create function. */ +#define GRPC_GOOGLE_CREDENTIALS_ENV_VAR "GOOGLE_APPLICATION_CREDENTIALS" + +/* Results for the SSL roots override callback. */ +typedef enum { + GRPC_SSL_ROOTS_OVERRIDE_OK, + GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY, /* Do not try fallback options. */ + GRPC_SSL_ROOTS_OVERRIDE_FAIL +} grpc_ssl_roots_override_result; + +typedef enum { + /* Server does not request client certificate. A client can present a self + signed or signed certificates if it wishes to do so and they would be + accepted. */ + GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, + /* Server requests client certificate but does not enforce that the client + presents a certificate. + + If the client presents a certificate, the client authentication is left to + the application based on the metadata like certificate etc. + + The key cert pair should still be valid for the SSL connection to be + established. */ + GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, + /* Server requests client certificate but does not enforce that the client + presents a certificate. + + If the client presents a certificate, the client authentication is done by + grpc framework (The client needs to either present a signed cert or skip no + certificate for a successful connection). + + The key cert pair should still be valid for the SSL connection to be + established. */ + GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY, + /* Server requests client certificate but enforces that the client presents a + certificate. + + If the client presents a certificate, the client authentication is left to + the application based on the metadata like certificate etc. + + The key cert pair should still be valid for the SSL connection to be + established. */ + GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, + /* Server requests client certificate but enforces that the client presents a + certificate. + + The cerificate presented by the client is verified by grpc framework (The + client needs to present signed certs for a successful connection). + + The key cert pair should still be valid for the SSL connection to be + established. */ + GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY +} grpc_ssl_client_certificate_request_type; + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_GRPC_SECURITY_CONSTANTS_H */ diff --git a/package.xml b/package.xml index ced62b63d66..99ef0b8c700 100644 --- a/package.xml +++ b/package.xml @@ -174,6 +174,7 @@ + diff --git a/src/core/lib/security/credentials.c b/src/core/lib/security/credentials.c index 2c7d31519c7..fd5ad3589b7 100644 --- a/src/core/lib/security/credentials.c +++ b/src/core/lib/security/credentials.c @@ -338,10 +338,11 @@ static void ssl_build_config(const char *pem_root_certs, static void ssl_build_server_config( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, - size_t num_key_cert_pairs, int force_client_auth, + size_t num_key_cert_pairs, + grpc_ssl_client_certificate_request_type client_certificate_request, grpc_ssl_server_config *config) { size_t i; - config->force_client_auth = force_client_auth; + config->client_certificate_request = client_certificate_request; if (pem_root_certs != NULL) { ssl_copy_key_material(pem_root_certs, &config->pem_root_certs, &config->pem_root_certs_size); @@ -391,21 +392,35 @@ grpc_channel_credentials *grpc_ssl_credentials_create( grpc_server_credentials *grpc_ssl_server_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved) { + return grpc_ssl_server_credentials_create_ex( + pem_root_certs, pem_key_cert_pairs, num_key_cert_pairs, + force_client_auth + ? GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + : GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, + reserved); +} + +grpc_server_credentials *grpc_ssl_server_credentials_create_ex( + const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, + size_t num_key_cert_pairs, + grpc_ssl_client_certificate_request_type client_certificate_request, + void *reserved) { grpc_ssl_server_credentials *c = gpr_malloc(sizeof(grpc_ssl_server_credentials)); GRPC_API_TRACE( - "grpc_ssl_server_credentials_create(" + "grpc_ssl_server_credentials_create_ex(" "pem_root_certs=%s, pem_key_cert_pairs=%p, num_key_cert_pairs=%lu, " - "force_client_auth=%d, reserved=%p)", + "client_certificate_request=%d, reserved=%p)", 5, (pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs, - force_client_auth, reserved)); + client_certificate_request, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_ssl_server_credentials)); c->base.type = GRPC_CHANNEL_CREDENTIALS_TYPE_SSL; gpr_ref_init(&c->base.refcount, 1); c->base.vtable = &ssl_server_vtable; ssl_build_server_config(pem_root_certs, pem_key_cert_pairs, - num_key_cert_pairs, force_client_auth, &c->config); + num_key_cert_pairs, client_certificate_request, + &c->config); return &c->base; } diff --git a/src/core/lib/security/security_connector.c b/src/core/lib/security/security_connector.c index 59863ba064b..2d2023bdf5b 100644 --- a/src/core/lib/security/security_connector.c +++ b/src/core/lib/security/security_connector.c @@ -668,6 +668,31 @@ gpr_slice grpc_get_default_ssl_roots_for_testing(void) { return compute_default_pem_root_certs_once(); } +static tsi_client_certificate_request_type +get_tsi_client_certificate_request_type( + grpc_ssl_client_certificate_request_type grpc_request_type) { + switch (grpc_request_type) { + case GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE: + return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; + + case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: + return TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; + + case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY: + return TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY; + + case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: + return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; + + case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY: + return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY; + + default: + // Is this a sane default + return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; + } +} + size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) { /* TODO(jboeuf@google.com): Maybe revisit the approach which consists in loading all the roots once for the lifetime of the process. */ @@ -782,15 +807,16 @@ grpc_security_status grpc_ssl_server_security_connector_create( gpr_ref_init(&c->base.base.refcount, 1); c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; c->base.base.vtable = &ssl_server_vtable; - result = tsi_create_ssl_server_handshaker_factory( + result = tsi_create_ssl_server_handshaker_factory_ex( (const unsigned char **)config->pem_private_keys, config->pem_private_keys_sizes, (const unsigned char **)config->pem_cert_chains, config->pem_cert_chains_sizes, config->num_key_cert_pairs, config->pem_root_certs, config->pem_root_certs_size, - config->force_client_auth, ssl_cipher_suites(), alpn_protocol_strings, - alpn_protocol_string_lengths, (uint16_t)num_alpn_protocols, - &c->handshaker_factory); + get_tsi_client_certificate_request_type( + config->client_certificate_request), + ssl_cipher_suites(), alpn_protocol_strings, alpn_protocol_string_lengths, + (uint16_t)num_alpn_protocols, &c->handshaker_factory); if (result != TSI_OK) { gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", tsi_result_to_string(result)); diff --git a/src/core/lib/security/security_connector.h b/src/core/lib/security/security_connector.h index c9e262b1adf..2c893cd5e99 100644 --- a/src/core/lib/security/security_connector.h +++ b/src/core/lib/security/security_connector.h @@ -241,7 +241,7 @@ typedef struct { size_t num_key_cert_pairs; unsigned char *pem_root_certs; size_t pem_root_certs_size; - int force_client_auth; + grpc_ssl_client_certificate_request_type client_certificate_request; } grpc_ssl_server_config; /* Creates an SSL server_security_connector. diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c index 045901cc72f..e91c6316e7f 100644 --- a/src/core/lib/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -718,6 +718,14 @@ static tsi_result build_alpn_protocol_name_list( return TSI_OK; } +// The verification callback is used for clients that don't really care about +// the server's certificate, but we need to pull it anyway, in case a higher +// layer wants to look at it. In this case the verification may fail, but +// we don't really care. +static int NullVerifyCallback(int preverify_ok, X509_STORE_CTX *ctx) { + return 1; +} + /* --- tsi_frame_protector methods implementation. ---*/ static tsi_result ssl_protector_protect(tsi_frame_protector *self, @@ -1390,6 +1398,26 @@ tsi_result tsi_create_ssl_server_handshaker_factory( const char *cipher_list, const unsigned char **alpn_protocols, const unsigned char *alpn_protocols_lengths, uint16_t num_alpn_protocols, tsi_ssl_handshaker_factory **factory) { + return tsi_create_ssl_server_handshaker_factory_ex( + pem_private_keys, pem_private_keys_sizes, pem_cert_chains, + pem_cert_chains_sizes, key_cert_pair_count, pem_client_root_certs, + pem_client_root_certs_size, + force_client_auth ? TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + : TSI_DONT_REQUEST_CLIENT_CERTIFICATE, + cipher_list, alpn_protocols, alpn_protocols_lengths, num_alpn_protocols, + factory); +} + +tsi_result tsi_create_ssl_server_handshaker_factory_ex( + const unsigned char **pem_private_keys, + const size_t *pem_private_keys_sizes, const unsigned char **pem_cert_chains, + const size_t *pem_cert_chains_sizes, size_t key_cert_pair_count, + const unsigned char *pem_client_root_certs, + size_t pem_client_root_certs_size, + tsi_client_certificate_request_type client_certificate_request, + const char *cipher_list, const unsigned char **alpn_protocols, + const unsigned char *alpn_protocols_lengths, uint16_t num_alpn_protocols, + tsi_ssl_handshaker_factory **factory) { tsi_ssl_server_handshaker_factory *impl = NULL; tsi_result result = TSI_OK; size_t i = 0; @@ -1445,7 +1473,6 @@ tsi_result tsi_create_ssl_server_handshaker_factory( if (result != TSI_OK) break; if (pem_client_root_certs != NULL) { - int flags = SSL_VERIFY_PEER; STACK_OF(X509_NAME) *root_names = NULL; result = ssl_ctx_load_verification_certs( impl->ssl_contexts[i], pem_client_root_certs, @@ -1455,8 +1482,29 @@ tsi_result tsi_create_ssl_server_handshaker_factory( break; } SSL_CTX_set_client_CA_list(impl->ssl_contexts[i], root_names); - if (force_client_auth) flags |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT; - SSL_CTX_set_verify(impl->ssl_contexts[i], flags, NULL); + switch (client_certificate_request) { + case TSI_DONT_REQUEST_CLIENT_CERTIFICATE: + SSL_CTX_set_verify(impl->ssl_contexts[i], SSL_VERIFY_NONE, NULL); + break; + case TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: + SSL_CTX_set_verify(impl->ssl_contexts[i], SSL_VERIFY_PEER, + NullVerifyCallback); + break; + case TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY: + SSL_CTX_set_verify(impl->ssl_contexts[i], SSL_VERIFY_PEER, NULL); + break; + case TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: + SSL_CTX_set_verify( + impl->ssl_contexts[i], + SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, + NullVerifyCallback); + break; + case TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY: + SSL_CTX_set_verify( + impl->ssl_contexts[i], + SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL); + break; + } /* TODO(jboeuf): Add revocation verification. */ } diff --git a/src/core/lib/tsi/ssl_transport_security.h b/src/core/lib/tsi/ssl_transport_security.h index 211c8f96562..7407246118a 100644 --- a/src/core/lib/tsi/ssl_transport_security.h +++ b/src/core/lib/tsi/ssl_transport_security.h @@ -142,6 +142,23 @@ tsi_result tsi_create_ssl_server_handshaker_factory( const unsigned char *alpn_protocols_lengths, uint16_t num_alpn_protocols, tsi_ssl_handshaker_factory **factory); +/* Same as tsi_create_ssl_server_handshaker_factory method except uses + tsi_client_certificate_request_type to support more ways to handle client + certificate authentication. + - client_certificate_request, if set to non-zero will force the client to + authenticate with an SSL cert. Note that this option is ignored if + pem_client_root_certs is NULL or pem_client_roots_certs_size is 0 */ +tsi_result tsi_create_ssl_server_handshaker_factory_ex( + const unsigned char **pem_private_keys, + const size_t *pem_private_keys_sizes, const unsigned char **pem_cert_chains, + const size_t *pem_cert_chains_sizes, size_t key_cert_pair_count, + const unsigned char *pem_client_root_certs, + size_t pem_client_root_certs_size, + tsi_client_certificate_request_type client_certificate_request, + const char *cipher_suites, const unsigned char **alpn_protocols, + const unsigned char *alpn_protocols_lengths, uint16_t num_alpn_protocols, + tsi_ssl_handshaker_factory **factory); + /* Creates a handshaker. - self is the factory from which the handshaker will be created. - server_name_indication indicates the name of the server the client is diff --git a/src/core/lib/tsi/transport_security_interface.h b/src/core/lib/tsi/transport_security_interface.h index d81ec0963ae..3e8c9d7ffef 100644 --- a/src/core/lib/tsi/transport_security_interface.h +++ b/src/core/lib/tsi/transport_security_interface.h @@ -59,6 +59,15 @@ typedef enum { TSI_OUT_OF_RESOURCES = 12 } tsi_result; +typedef enum { + // Default option + TSI_DONT_REQUEST_CLIENT_CERTIFICATE, + TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, + TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY, + TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, + TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY, +} tsi_client_certificate_request_type; + const char *tsi_result_to_string(tsi_result result); /* --- tsi tracing --- */ diff --git a/src/cpp/server/secure_server_credentials.cc b/src/cpp/server/secure_server_credentials.cc index d472667a7ee..33bdc2a1f4f 100644 --- a/src/cpp/server/secure_server_credentials.cc +++ b/src/cpp/server/secure_server_credentials.cc @@ -130,10 +130,14 @@ std::shared_ptr SslServerCredentials( key_cert_pair->cert_chain.c_str()}; pem_key_cert_pairs.push_back(p); } - grpc_server_credentials* c_creds = grpc_ssl_server_credentials_create( + grpc_server_credentials* c_creds = grpc_ssl_server_credentials_create_ex( options.pem_root_certs.empty() ? nullptr : options.pem_root_certs.c_str(), pem_key_cert_pairs.empty() ? nullptr : &pem_key_cert_pairs[0], - pem_key_cert_pairs.size(), options.force_client_auth, nullptr); + pem_key_cert_pairs.size(), + options.force_client_auth + ? GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + : options.client_certificate_request, + nullptr); return std::shared_ptr( new SecureServerCredentials(c_creds)); } diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 8d769e5f6a8..aeef8a79e99 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -911,9 +911,12 @@ grpcsharp_ssl_server_credentials_create( key_cert_pairs[i].private_key = key_cert_pair_private_key_array[i]; } } - creds = grpc_ssl_server_credentials_create(pem_root_certs, key_cert_pairs, - num_key_cert_pairs, - force_client_auth, NULL); + creds = grpc_ssl_server_credentials_create_ex( + pem_root_certs, key_cert_pairs, num_key_cert_pairs, + force_client_auth + ? GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + : GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, + NULL); gpr_free(key_cert_pairs); return creds; } diff --git a/src/node/ext/server_credentials.cc b/src/node/ext/server_credentials.cc index 5285d53df41..cff821aafcd 100644 --- a/src/node/ext/server_credentials.cc +++ b/src/node/ext/server_credentials.cc @@ -145,9 +145,13 @@ NAN_METHOD(ServerCredentials::CreateSsl) { return Nan::ThrowTypeError( "createSsl's second argument must be a list of objects"); } - int force_client_auth = 0; + + grpc_ssl_client_certificate_request_type client_certificate_request; if (info[2]->IsBoolean()) { - force_client_auth = (int)Nan::To(info[2]).FromJust(); + client_certificate_request = + Nan::To(info[2]).FromJust() + ? GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + : GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE; } else if (!(info[2]->IsUndefined() || info[2]->IsNull())) { return Nan::ThrowTypeError( "createSsl's third argument must be a boolean if provided"); @@ -180,8 +184,9 @@ NAN_METHOD(ServerCredentials::CreateSsl) { key_cert_pairs[i].private_key = ::node::Buffer::Data(maybe_key); key_cert_pairs[i].cert_chain = ::node::Buffer::Data(maybe_cert); } - grpc_server_credentials *creds = grpc_ssl_server_credentials_create( - root_certs, key_cert_pairs, key_cert_pair_count, force_client_auth, NULL); + grpc_server_credentials *creds = grpc_ssl_server_credentials_create_ex( + root_certs, key_cert_pairs, key_cert_pair_count, + client_certificate_request, NULL); delete key_cert_pairs; if (creds == NULL) { info.GetReturnValue().SetNull(); diff --git a/src/php/ext/grpc/server_credentials.c b/src/php/ext/grpc/server_credentials.c index 79188246bce..f3951b31fee 100644 --- a/src/php/ext/grpc/server_credentials.c +++ b/src/php/ext/grpc/server_credentials.c @@ -115,10 +115,11 @@ PHP_METHOD(ServerCredentials, createSsl) { "createSsl expects 3 strings", 1 TSRMLS_CC); return; } - /* TODO: add a force_client_auth field in ServerCredentials and pass it as - * the last parameter. */ - grpc_server_credentials *creds = grpc_ssl_server_credentials_create( - pem_root_certs, &pem_key_cert_pair, 1, 0, NULL); + /* TODO: add a client_certificate_request field in ServerCredentials and pass + * it as the last parameter. */ + grpc_server_credentials *creds = grpc_ssl_server_credentials_create_ex( + pem_root_certs, &pem_key_cert_pair, 1, + GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, NULL); zval *creds_object = grpc_php_wrap_server_credentials(creds); RETURN_DESTROY_ZVAL(creds_object); } diff --git a/src/proto/grpc/binary_log/v1alpha/log.proto b/src/proto/grpc/binary_log/v1alpha/log.proto index 6cc473be74e..83166cd4104 100644 --- a/src/proto/grpc/binary_log/v1alpha/log.proto +++ b/src/proto/grpc/binary_log/v1alpha/log.proto @@ -105,4 +105,4 @@ message Message { // The contents of the message. May be a prefix instead of the complete // message. bytes data = 5; -} \ No newline at end of file +} diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index 842635f56b5..94d13b59995 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -302,6 +302,8 @@ def server_credentials_ssl(pem_root_certs, pem_key_cert_pairs, (pem_key_cert_pairs[i]).c_pair) credentials.c_credentials = grpc_ssl_server_credentials_create( c_pem_root_certs, credentials.c_ssl_pem_key_cert_pairs, - credentials.c_ssl_pem_key_cert_pairs_count, force_client_auth, NULL) + credentials.c_ssl_pem_key_cert_pairs_count, + GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY if force_client_auth else GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, + NULL) return credentials diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index 7696f8c7f76..3d158a77075 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -105,6 +105,13 @@ cdef extern from "grpc/_cython/loader.h": GRPC_SSL_ROOTS_OVERRIDE_FAILED_PERMANENTLY GRPC_SSL_ROOTS_OVERRIDE_FAILED + ctypedef enum grpc_ssl_client_certificate_request_type: + GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, + GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY + GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY + GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY + GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + struct grpc_byte_buffer_reader: # We don't care about the internals pass diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 8bd6ae6372b..9567fcd5a46 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -152,6 +152,7 @@ grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_crea grpc_secure_channel_create_type grpc_secure_channel_create_import; grpc_server_credentials_release_type grpc_server_credentials_release_import; grpc_ssl_server_credentials_create_type grpc_ssl_server_credentials_create_import; +grpc_ssl_server_credentials_create_ex_type grpc_ssl_server_credentials_create_ex_import; grpc_server_add_secure_http2_port_type grpc_server_add_secure_http2_port_import; grpc_call_set_credentials_type grpc_call_set_credentials_import; grpc_server_credentials_set_auth_metadata_processor_type grpc_server_credentials_set_auth_metadata_processor_import; @@ -418,6 +419,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_secure_channel_create_import = (grpc_secure_channel_create_type) GetProcAddress(library, "grpc_secure_channel_create"); grpc_server_credentials_release_import = (grpc_server_credentials_release_type) GetProcAddress(library, "grpc_server_credentials_release"); grpc_ssl_server_credentials_create_import = (grpc_ssl_server_credentials_create_type) GetProcAddress(library, "grpc_ssl_server_credentials_create"); + grpc_ssl_server_credentials_create_ex_import = (grpc_ssl_server_credentials_create_ex_type) GetProcAddress(library, "grpc_ssl_server_credentials_create_ex"); grpc_server_add_secure_http2_port_import = (grpc_server_add_secure_http2_port_type) GetProcAddress(library, "grpc_server_add_secure_http2_port"); grpc_call_set_credentials_import = (grpc_call_set_credentials_type) GetProcAddress(library, "grpc_call_set_credentials"); grpc_server_credentials_set_auth_metadata_processor_import = (grpc_server_credentials_set_auth_metadata_processor_type) GetProcAddress(library, "grpc_server_credentials_set_auth_metadata_processor"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 272e85b4857..097c2582634 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -406,6 +406,9 @@ extern grpc_server_credentials_release_type grpc_server_credentials_release_impo typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved); extern grpc_ssl_server_credentials_create_type grpc_ssl_server_credentials_create_import; #define grpc_ssl_server_credentials_create grpc_ssl_server_credentials_create_import +typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_ex_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, grpc_ssl_client_certificate_request_type client_certificate_request, void *reserved); +extern grpc_ssl_server_credentials_create_ex_type grpc_ssl_server_credentials_create_ex_import; +#define grpc_ssl_server_credentials_create_ex grpc_ssl_server_credentials_create_ex_import typedef int(*grpc_server_add_secure_http2_port_type)(grpc_server *server, const char *addr, grpc_server_credentials *creds); extern grpc_server_add_secure_http2_port_type grpc_server_add_secure_http2_port_import; #define grpc_server_add_secure_http2_port grpc_server_add_secure_http2_port_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 56db4ec686b..d4657342d11 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -152,6 +152,7 @@ grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_crea grpc_secure_channel_create_type grpc_secure_channel_create_import; grpc_server_credentials_release_type grpc_server_credentials_release_import; grpc_ssl_server_credentials_create_type grpc_ssl_server_credentials_create_import; +grpc_ssl_server_credentials_create_ex_type grpc_ssl_server_credentials_create_ex_import; grpc_server_add_secure_http2_port_type grpc_server_add_secure_http2_port_import; grpc_call_set_credentials_type grpc_call_set_credentials_import; grpc_server_credentials_set_auth_metadata_processor_type grpc_server_credentials_set_auth_metadata_processor_import; @@ -414,6 +415,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_secure_channel_create_import = (grpc_secure_channel_create_type) GetProcAddress(library, "grpc_secure_channel_create"); grpc_server_credentials_release_import = (grpc_server_credentials_release_type) GetProcAddress(library, "grpc_server_credentials_release"); grpc_ssl_server_credentials_create_import = (grpc_ssl_server_credentials_create_type) GetProcAddress(library, "grpc_ssl_server_credentials_create"); + grpc_ssl_server_credentials_create_ex_import = (grpc_ssl_server_credentials_create_ex_type) GetProcAddress(library, "grpc_ssl_server_credentials_create_ex"); grpc_server_add_secure_http2_port_import = (grpc_server_add_secure_http2_port_type) GetProcAddress(library, "grpc_server_add_secure_http2_port"); grpc_call_set_credentials_import = (grpc_call_set_credentials_type) GetProcAddress(library, "grpc_call_set_credentials"); grpc_server_credentials_set_auth_metadata_processor_import = (grpc_server_credentials_set_auth_metadata_processor_type) GetProcAddress(library, "grpc_server_credentials_set_auth_metadata_processor"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index c526f434c61..4b02087b723 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -406,6 +406,9 @@ extern grpc_server_credentials_release_type grpc_server_credentials_release_impo typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved); extern grpc_ssl_server_credentials_create_type grpc_ssl_server_credentials_create_import; #define grpc_ssl_server_credentials_create grpc_ssl_server_credentials_create_import +typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_ex_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, grpc_ssl_client_certificate_request_type client_certificate_request, void *reserved); +extern grpc_ssl_server_credentials_create_ex_type grpc_ssl_server_credentials_create_ex_import; +#define grpc_ssl_server_credentials_create_ex grpc_ssl_server_credentials_create_ex_import typedef int(*grpc_server_add_secure_http2_port_type)(grpc_server *server, const char *addr, grpc_server_credentials *creds); extern grpc_server_add_secure_http2_port_type grpc_server_add_secure_http2_port_import; #define grpc_server_add_secure_http2_port grpc_server_add_secure_http2_port_import diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index 33b8372850b..b2d7280a30a 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -90,9 +90,12 @@ static void grpc_rb_server_credentials_mark(void *p) { static const rb_data_type_t grpc_rb_server_credentials_data_type = { "grpc_server_credentials", - {grpc_rb_server_credentials_mark, grpc_rb_server_credentials_free, - GRPC_RB_MEMSIZE_UNAVAILABLE, {NULL, NULL}}, - NULL, NULL, + {grpc_rb_server_credentials_mark, + grpc_rb_server_credentials_free, + GRPC_RB_MEMSIZE_UNAVAILABLE, + {NULL, NULL}}, + NULL, + NULL, #ifdef RUBY_TYPED_FREE_IMMEDIATELY RUBY_TYPED_FREE_IMMEDIATELY #endif @@ -219,7 +222,9 @@ static VALUE grpc_rb_server_credentials_init(VALUE self, VALUE pem_root_certs, } } - auth_client = TYPE(force_client_auth) == T_TRUE; + auth_client = TYPE(force_client_auth) == T_TRUE + ? GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + : GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE; key_cert_pairs = ALLOC_N(grpc_ssl_pem_key_cert_pair, num_key_certs); for (i = 0; i < num_key_certs; i++) { key_cert = rb_ary_entry(pem_key_certs, i); @@ -233,13 +238,12 @@ static VALUE grpc_rb_server_credentials_init(VALUE self, VALUE pem_root_certs, &grpc_rb_server_credentials_data_type, wrapper); if (pem_root_certs == Qnil) { - creds = grpc_ssl_server_credentials_create(NULL, key_cert_pairs, - num_key_certs, - auth_client, NULL); + creds = grpc_ssl_server_credentials_create_ex( + NULL, key_cert_pairs, num_key_certs, auth_client, NULL); } else { - creds = grpc_ssl_server_credentials_create(RSTRING_PTR(pem_root_certs), - key_cert_pairs, num_key_certs, - auth_client, NULL); + creds = grpc_ssl_server_credentials_create_ex(RSTRING_PTR(pem_root_certs), + key_cert_pairs, num_key_certs, + auth_client, NULL); } xfree(key_cert_pairs); if (creds == NULL) { diff --git a/test/core/end2end/data/client_certs.c b/test/core/end2end/data/client_certs.c new file mode 100644 index 00000000000..9cdb704335d --- /dev/null +++ b/test/core/end2end/data/client_certs.c @@ -0,0 +1,343 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +const char test_self_signed_client_cert[] = { + 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, + 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, + 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x43, 0x6f, 0x44, 0x43, 0x43, + 0x41, 0x67, 0x6d, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x4a, + 0x41, 0x4e, 0x49, 0x7a, 0x32, 0x2f, 0x7a, 0x6f, 0x52, 0x69, 0x61, 0x70, + 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, + 0x44, 0x51, 0x45, 0x42, 0x42, 0x51, 0x55, 0x41, 0x4d, 0x47, 0x6b, 0x78, + 0x43, 0x7a, 0x41, 0x4a, 0x42, 0x67, 0x4e, 0x56, 0x0a, 0x42, 0x41, 0x59, + 0x54, 0x41, 0x6b, 0x46, 0x56, 0x4d, 0x52, 0x4d, 0x77, 0x45, 0x51, 0x59, + 0x44, 0x56, 0x51, 0x51, 0x49, 0x44, 0x41, 0x70, 0x54, 0x62, 0x32, 0x31, + 0x6c, 0x4c, 0x56, 0x4e, 0x30, 0x59, 0x58, 0x52, 0x6c, 0x4d, 0x53, 0x45, + 0x77, 0x48, 0x77, 0x59, 0x44, 0x56, 0x51, 0x51, 0x4b, 0x44, 0x42, 0x68, + 0x4a, 0x62, 0x6e, 0x52, 0x6c, 0x63, 0x6d, 0x35, 0x6c, 0x64, 0x43, 0x42, + 0x58, 0x0a, 0x61, 0x57, 0x52, 0x6e, 0x61, 0x58, 0x52, 0x7a, 0x49, 0x46, + 0x42, 0x30, 0x65, 0x53, 0x42, 0x4d, 0x64, 0x47, 0x51, 0x78, 0x49, 0x6a, + 0x41, 0x67, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x4d, 0x4d, 0x47, 0x57, + 0x4a, 0x68, 0x5a, 0x47, 0x4e, 0x73, 0x61, 0x57, 0x56, 0x75, 0x64, 0x43, + 0x35, 0x30, 0x5a, 0x58, 0x4e, 0x30, 0x4c, 0x6d, 0x64, 0x76, 0x62, 0x32, + 0x64, 0x73, 0x5a, 0x53, 0x35, 0x6a, 0x0a, 0x62, 0x32, 0x30, 0x77, 0x48, + 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x51, 0x77, 0x4e, 0x7a, 0x49, 0x34, 0x4d, + 0x6a, 0x41, 0x77, 0x4f, 0x44, 0x49, 0x31, 0x57, 0x68, 0x63, 0x4e, 0x4d, + 0x6a, 0x51, 0x77, 0x4e, 0x7a, 0x49, 0x31, 0x4d, 0x6a, 0x41, 0x77, 0x4f, + 0x44, 0x49, 0x31, 0x57, 0x6a, 0x42, 0x70, 0x4d, 0x51, 0x73, 0x77, 0x43, + 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x47, 0x45, 0x77, 0x4a, 0x42, 0x0a, + 0x56, 0x54, 0x45, 0x54, 0x4d, 0x42, 0x45, 0x47, 0x41, 0x31, 0x55, 0x45, + 0x43, 0x41, 0x77, 0x4b, 0x55, 0x32, 0x39, 0x74, 0x5a, 0x53, 0x31, 0x54, + 0x64, 0x47, 0x46, 0x30, 0x5a, 0x54, 0x45, 0x68, 0x4d, 0x42, 0x38, 0x47, + 0x41, 0x31, 0x55, 0x45, 0x43, 0x67, 0x77, 0x59, 0x53, 0x57, 0x35, 0x30, + 0x5a, 0x58, 0x4a, 0x75, 0x5a, 0x58, 0x51, 0x67, 0x56, 0x32, 0x6c, 0x6b, + 0x5a, 0x32, 0x6c, 0x30, 0x0a, 0x63, 0x79, 0x42, 0x51, 0x64, 0x48, 0x6b, + 0x67, 0x54, 0x48, 0x52, 0x6b, 0x4d, 0x53, 0x49, 0x77, 0x49, 0x41, 0x59, + 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x42, 0x6c, 0x69, 0x59, 0x57, 0x52, + 0x6a, 0x62, 0x47, 0x6c, 0x6c, 0x62, 0x6e, 0x51, 0x75, 0x64, 0x47, 0x56, + 0x7a, 0x64, 0x43, 0x35, 0x6e, 0x62, 0x32, 0x39, 0x6e, 0x62, 0x47, 0x55, + 0x75, 0x59, 0x32, 0x39, 0x74, 0x4d, 0x49, 0x47, 0x66, 0x0a, 0x4d, 0x41, + 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, + 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x47, 0x4e, 0x41, 0x44, + 0x43, 0x42, 0x69, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x43, 0x79, 0x58, 0x32, + 0x4a, 0x78, 0x5a, 0x2b, 0x4a, 0x35, 0x49, 0x2b, 0x64, 0x6c, 0x68, 0x52, + 0x4f, 0x56, 0x74, 0x71, 0x6c, 0x4d, 0x51, 0x6e, 0x34, 0x37, 0x42, 0x42, + 0x63, 0x72, 0x0a, 0x6c, 0x32, 0x47, 0x43, 0x6b, 0x76, 0x39, 0x4f, 0x31, + 0x44, 0x31, 0x72, 0x4c, 0x39, 0x34, 0x4b, 0x57, 0x59, 0x62, 0x59, 0x31, + 0x34, 0x48, 0x58, 0x68, 0x69, 0x2f, 0x6e, 0x61, 0x63, 0x42, 0x41, 0x51, + 0x74, 0x43, 0x45, 0x51, 0x77, 0x58, 0x78, 0x70, 0x35, 0x44, 0x4b, 0x65, + 0x6d, 0x47, 0x4f, 0x55, 0x6a, 0x75, 0x36, 0x35, 0x78, 0x4d, 0x39, 0x46, + 0x39, 0x36, 0x2f, 0x33, 0x37, 0x34, 0x47, 0x0a, 0x4d, 0x76, 0x6e, 0x52, + 0x4a, 0x64, 0x6f, 0x35, 0x32, 0x67, 0x4f, 0x73, 0x34, 0x48, 0x4f, 0x30, + 0x63, 0x7a, 0x42, 0x70, 0x66, 0x56, 0x4e, 0x64, 0x58, 0x65, 0x65, 0x6f, + 0x44, 0x2f, 0x52, 0x59, 0x67, 0x77, 0x74, 0x74, 0x66, 0x64, 0x4a, 0x72, + 0x7a, 0x2f, 0x34, 0x61, 0x61, 0x74, 0x73, 0x53, 0x32, 0x51, 0x6b, 0x32, + 0x79, 0x4d, 0x59, 0x70, 0x71, 0x5a, 0x6d, 0x71, 0x45, 0x4d, 0x73, 0x62, + 0x0a, 0x72, 0x68, 0x39, 0x57, 0x32, 0x32, 0x4c, 0x70, 0x33, 0x72, 0x43, + 0x42, 0x76, 0x77, 0x49, 0x44, 0x41, 0x51, 0x41, 0x42, 0x6f, 0x31, 0x41, + 0x77, 0x54, 0x6a, 0x41, 0x64, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x34, + 0x45, 0x46, 0x67, 0x51, 0x55, 0x35, 0x32, 0x33, 0x41, 0x4a, 0x4d, 0x52, + 0x38, 0x44, 0x73, 0x39, 0x56, 0x38, 0x66, 0x68, 0x66, 0x37, 0x67, 0x75, + 0x31, 0x69, 0x30, 0x4d, 0x4d, 0x0a, 0x55, 0x71, 0x41, 0x77, 0x48, 0x77, + 0x59, 0x44, 0x56, 0x52, 0x30, 0x6a, 0x42, 0x42, 0x67, 0x77, 0x46, 0x6f, + 0x41, 0x55, 0x35, 0x32, 0x33, 0x41, 0x4a, 0x4d, 0x52, 0x38, 0x44, 0x73, + 0x39, 0x56, 0x38, 0x66, 0x68, 0x66, 0x37, 0x67, 0x75, 0x31, 0x69, 0x30, + 0x4d, 0x4d, 0x55, 0x71, 0x41, 0x77, 0x44, 0x41, 0x59, 0x44, 0x56, 0x52, + 0x30, 0x54, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x0a, 0x2f, + 0x7a, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, + 0x77, 0x30, 0x42, 0x41, 0x51, 0x55, 0x46, 0x41, 0x41, 0x4f, 0x42, 0x67, + 0x51, 0x43, 0x49, 0x2f, 0x74, 0x76, 0x53, 0x42, 0x59, 0x48, 0x31, 0x69, + 0x79, 0x66, 0x4c, 0x61, 0x43, 0x54, 0x42, 0x4b, 0x77, 0x70, 0x64, 0x6a, + 0x33, 0x36, 0x2b, 0x4d, 0x6b, 0x52, 0x39, 0x45, 0x65, 0x4a, 0x4a, 0x6d, + 0x49, 0x6d, 0x78, 0x0a, 0x58, 0x2b, 0x62, 0x6a, 0x68, 0x4b, 0x57, 0x58, + 0x77, 0x73, 0x42, 0x58, 0x34, 0x50, 0x44, 0x4d, 0x57, 0x76, 0x64, 0x75, + 0x73, 0x72, 0x2b, 0x2b, 0x51, 0x47, 0x55, 0x59, 0x74, 0x79, 0x6f, 0x79, + 0x61, 0x2b, 0x68, 0x66, 0x59, 0x4d, 0x58, 0x52, 0x68, 0x58, 0x75, 0x61, + 0x33, 0x39, 0x6d, 0x44, 0x35, 0x34, 0x78, 0x67, 0x6c, 0x6f, 0x51, 0x4e, + 0x75, 0x75, 0x39, 0x52, 0x45, 0x44, 0x77, 0x58, 0x0a, 0x46, 0x66, 0x74, + 0x6f, 0x2b, 0x61, 0x4f, 0x77, 0x33, 0x42, 0x63, 0x59, 0x64, 0x75, 0x63, + 0x7a, 0x36, 0x6f, 0x66, 0x78, 0x69, 0x63, 0x46, 0x4b, 0x2f, 0x59, 0x32, + 0x56, 0x65, 0x58, 0x44, 0x75, 0x72, 0x53, 0x4d, 0x70, 0x52, 0x76, 0x35, + 0x54, 0x66, 0x47, 0x66, 0x32, 0x51, 0x72, 0x36, 0x65, 0x4f, 0x4f, 0x64, + 0x61, 0x52, 0x68, 0x6a, 0x36, 0x65, 0x64, 0x37, 0x42, 0x69, 0x62, 0x48, + 0x6b, 0x0a, 0x58, 0x31, 0x56, 0x47, 0x5a, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, + 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, + 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, + 0x0a, 0x00}; + +const char test_self_signed_client_key[] = { + 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, + 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, + 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x43, 0x64, 0x77, 0x49, 0x42, + 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, + 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, 0x46, 0x41, 0x41, 0x53, 0x43, + 0x41, 0x6d, 0x45, 0x77, 0x67, 0x67, 0x4a, 0x64, 0x41, 0x67, 0x45, 0x41, + 0x41, 0x6f, 0x47, 0x42, 0x41, 0x4c, 0x4a, 0x66, 0x59, 0x6e, 0x46, 0x6e, + 0x34, 0x6e, 0x6b, 0x6a, 0x35, 0x32, 0x57, 0x46, 0x0a, 0x45, 0x35, 0x57, + 0x32, 0x71, 0x55, 0x78, 0x43, 0x66, 0x6a, 0x73, 0x45, 0x46, 0x79, 0x75, + 0x58, 0x59, 0x59, 0x4b, 0x53, 0x2f, 0x30, 0x37, 0x55, 0x50, 0x57, 0x73, + 0x76, 0x33, 0x67, 0x70, 0x5a, 0x68, 0x74, 0x6a, 0x58, 0x67, 0x64, 0x65, + 0x47, 0x4c, 0x2b, 0x64, 0x70, 0x77, 0x45, 0x42, 0x43, 0x30, 0x49, 0x52, + 0x44, 0x42, 0x66, 0x47, 0x6e, 0x6b, 0x4d, 0x70, 0x36, 0x59, 0x59, 0x35, + 0x53, 0x0a, 0x4f, 0x37, 0x72, 0x6e, 0x45, 0x7a, 0x30, 0x58, 0x33, 0x72, + 0x2f, 0x66, 0x76, 0x67, 0x59, 0x79, 0x2b, 0x64, 0x45, 0x6c, 0x32, 0x6a, + 0x6e, 0x61, 0x41, 0x36, 0x7a, 0x67, 0x63, 0x37, 0x52, 0x7a, 0x4d, 0x47, + 0x6c, 0x39, 0x55, 0x31, 0x31, 0x64, 0x35, 0x36, 0x67, 0x50, 0x39, 0x46, + 0x69, 0x44, 0x43, 0x32, 0x31, 0x39, 0x30, 0x6d, 0x76, 0x50, 0x2f, 0x68, + 0x70, 0x71, 0x32, 0x78, 0x4c, 0x5a, 0x0a, 0x43, 0x54, 0x62, 0x49, 0x78, + 0x69, 0x6d, 0x70, 0x6d, 0x61, 0x6f, 0x51, 0x79, 0x78, 0x75, 0x75, 0x48, + 0x31, 0x62, 0x62, 0x59, 0x75, 0x6e, 0x65, 0x73, 0x49, 0x47, 0x2f, 0x41, + 0x67, 0x4d, 0x42, 0x41, 0x41, 0x45, 0x43, 0x67, 0x59, 0x41, 0x64, 0x71, + 0x4a, 0x43, 0x45, 0x7a, 0x4d, 0x49, 0x79, 0x5a, 0x45, 0x37, 0x6f, 0x61, + 0x57, 0x30, 0x74, 0x4f, 0x70, 0x63, 0x42, 0x30, 0x42, 0x69, 0x50, 0x0a, + 0x46, 0x59, 0x6f, 0x49, 0x76, 0x48, 0x34, 0x42, 0x4b, 0x52, 0x48, 0x38, + 0x65, 0x48, 0x76, 0x52, 0x34, 0x37, 0x36, 0x6d, 0x74, 0x2b, 0x59, 0x64, + 0x44, 0x68, 0x42, 0x50, 0x31, 0x73, 0x63, 0x47, 0x55, 0x6d, 0x59, 0x65, + 0x43, 0x54, 0x34, 0x45, 0x6a, 0x2b, 0x52, 0x67, 0x48, 0x76, 0x32, 0x4c, + 0x50, 0x54, 0x67, 0x56, 0x59, 0x77, 0x54, 0x39, 0x65, 0x63, 0x69, 0x50, + 0x32, 0x2b, 0x45, 0x2f, 0x0a, 0x43, 0x42, 0x43, 0x4e, 0x52, 0x65, 0x6c, + 0x30, 0x53, 0x77, 0x39, 0x4a, 0x65, 0x70, 0x77, 0x57, 0x30, 0x72, 0x2b, + 0x6a, 0x57, 0x4a, 0x74, 0x44, 0x59, 0x31, 0x70, 0x70, 0x36, 0x59, 0x58, + 0x41, 0x67, 0x4e, 0x52, 0x47, 0x58, 0x32, 0x55, 0x66, 0x6c, 0x76, 0x55, + 0x73, 0x54, 0x2b, 0x6f, 0x39, 0x6c, 0x5a, 0x76, 0x61, 0x67, 0x66, 0x39, + 0x6d, 0x6f, 0x4c, 0x54, 0x4d, 0x79, 0x47, 0x76, 0x55, 0x0a, 0x75, 0x4c, + 0x46, 0x6e, 0x73, 0x79, 0x66, 0x4c, 0x69, 0x6d, 0x31, 0x42, 0x34, 0x76, + 0x58, 0x76, 0x57, 0x51, 0x4a, 0x42, 0x41, 0x4e, 0x6f, 0x75, 0x5a, 0x6c, + 0x6c, 0x58, 0x47, 0x5a, 0x6f, 0x53, 0x72, 0x5a, 0x4c, 0x74, 0x52, 0x33, + 0x56, 0x67, 0x56, 0x34, 0x74, 0x7a, 0x52, 0x51, 0x76, 0x4a, 0x78, 0x75, + 0x38, 0x34, 0x6b, 0x4c, 0x65, 0x49, 0x6b, 0x36, 0x34, 0x4f, 0x76, 0x34, + 0x37, 0x58, 0x0a, 0x70, 0x48, 0x56, 0x42, 0x4d, 0x54, 0x52, 0x42, 0x66, + 0x7a, 0x50, 0x45, 0x68, 0x62, 0x42, 0x6f, 0x64, 0x6a, 0x72, 0x31, 0x6d, + 0x35, 0x4f, 0x4c, 0x61, 0x56, 0x4c, 0x71, 0x6b, 0x46, 0x63, 0x58, 0x66, + 0x74, 0x7a, 0x52, 0x43, 0x72, 0x62, 0x57, 0x6f, 0x4b, 0x73, 0x43, 0x51, + 0x51, 0x44, 0x52, 0x53, 0x6f, 0x4c, 0x4c, 0x58, 0x4f, 0x69, 0x4c, 0x72, + 0x74, 0x4a, 0x33, 0x44, 0x4c, 0x4a, 0x43, 0x0a, 0x72, 0x58, 0x37, 0x59, + 0x38, 0x77, 0x72, 0x48, 0x5a, 0x72, 0x71, 0x6b, 0x35, 0x62, 0x4d, 0x64, + 0x5a, 0x4c, 0x47, 0x61, 0x2f, 0x55, 0x58, 0x38, 0x52, 0x61, 0x6e, 0x68, + 0x56, 0x77, 0x33, 0x2b, 0x58, 0x70, 0x2b, 0x75, 0x72, 0x64, 0x31, 0x37, + 0x31, 0x31, 0x75, 0x6d, 0x65, 0x4e, 0x4a, 0x66, 0x7a, 0x75, 0x2f, 0x4d, + 0x43, 0x6b, 0x34, 0x61, 0x31, 0x4b, 0x6b, 0x47, 0x2f, 0x43, 0x55, 0x30, + 0x0a, 0x72, 0x71, 0x73, 0x39, 0x41, 0x6b, 0x41, 0x34, 0x63, 0x53, 0x78, + 0x31, 0x44, 0x44, 0x31, 0x4a, 0x53, 0x47, 0x2b, 0x79, 0x78, 0x4d, 0x4e, + 0x70, 0x73, 0x41, 0x53, 0x31, 0x78, 0x4a, 0x6f, 0x6d, 0x46, 0x49, 0x72, + 0x73, 0x4d, 0x39, 0x76, 0x73, 0x50, 0x74, 0x37, 0x46, 0x64, 0x6e, 0x64, + 0x44, 0x77, 0x72, 0x46, 0x2b, 0x79, 0x2b, 0x43, 0x6f, 0x76, 0x68, 0x44, + 0x6b, 0x47, 0x59, 0x44, 0x6b, 0x0a, 0x52, 0x41, 0x48, 0x68, 0x2b, 0x73, + 0x76, 0x47, 0x66, 0x5a, 0x67, 0x2f, 0x70, 0x51, 0x4b, 0x32, 0x4a, 0x52, + 0x50, 0x69, 0x6d, 0x41, 0x6d, 0x48, 0x68, 0x7a, 0x71, 0x46, 0x41, 0x6b, + 0x45, 0x41, 0x75, 0x36, 0x59, 0x61, 0x37, 0x30, 0x73, 0x32, 0x46, 0x55, + 0x65, 0x42, 0x33, 0x4d, 0x75, 0x39, 0x61, 0x4a, 0x73, 0x32, 0x43, 0x44, + 0x36, 0x68, 0x67, 0x33, 0x64, 0x51, 0x45, 0x56, 0x6b, 0x42, 0x0a, 0x35, + 0x33, 0x44, 0x49, 0x37, 0x54, 0x58, 0x34, 0x38, 0x64, 0x39, 0x6b, 0x47, + 0x57, 0x35, 0x38, 0x56, 0x58, 0x31, 0x78, 0x6e, 0x71, 0x53, 0x30, 0x32, + 0x4c, 0x79, 0x57, 0x71, 0x41, 0x50, 0x63, 0x57, 0x35, 0x71, 0x6d, 0x31, + 0x6b, 0x4c, 0x48, 0x46, 0x4c, 0x64, 0x6e, 0x64, 0x61, 0x50, 0x4e, 0x6d, + 0x42, 0x61, 0x6a, 0x34, 0x51, 0x4a, 0x42, 0x41, 0x4a, 0x75, 0x67, 0x6c, + 0x33, 0x36, 0x37, 0x0a, 0x39, 0x64, 0x39, 0x74, 0x2f, 0x51, 0x4c, 0x54, + 0x53, 0x75, 0x55, 0x4c, 0x4c, 0x61, 0x6f, 0x59, 0x76, 0x32, 0x76, 0x4a, + 0x54, 0x33, 0x73, 0x31, 0x79, 0x39, 0x48, 0x4e, 0x38, 0x39, 0x45, 0x6f, + 0x61, 0x44, 0x44, 0x45, 0x6b, 0x50, 0x56, 0x66, 0x51, 0x75, 0x36, 0x47, + 0x56, 0x45, 0x58, 0x67, 0x49, 0x42, 0x74, 0x69, 0x6d, 0x31, 0x73, 0x49, + 0x2f, 0x56, 0x50, 0x53, 0x7a, 0x49, 0x38, 0x48, 0x0a, 0x61, 0x58, 0x76, + 0x61, 0x54, 0x55, 0x77, 0x62, 0x6c, 0x46, 0x57, 0x53, 0x4d, 0x37, 0x30, + 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x50, + 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, + 0x2d, 0x2d, 0x2d, 0x0a, 0x00}; + +const char test_signed_client_cert[] = { + 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, + 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, + 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x43, 0x48, 0x7a, 0x43, 0x43, + 0x41, 0x59, 0x67, 0x43, 0x41, 0x51, 0x45, 0x77, 0x44, 0x51, 0x59, 0x4a, + 0x4b, 0x6f, 0x5a, 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41, 0x51, 0x45, 0x46, + 0x42, 0x51, 0x41, 0x77, 0x56, 0x6a, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, + 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x51, 0x56, 0x55, 0x78, + 0x45, 0x7a, 0x41, 0x52, 0x42, 0x67, 0x4e, 0x56, 0x0a, 0x42, 0x41, 0x67, + 0x4d, 0x43, 0x6c, 0x4e, 0x76, 0x62, 0x57, 0x55, 0x74, 0x55, 0x33, 0x52, + 0x68, 0x64, 0x47, 0x55, 0x78, 0x49, 0x54, 0x41, 0x66, 0x42, 0x67, 0x4e, + 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x47, 0x45, 0x6c, 0x75, 0x64, 0x47, 0x56, + 0x79, 0x62, 0x6d, 0x56, 0x30, 0x49, 0x46, 0x64, 0x70, 0x5a, 0x47, 0x64, + 0x70, 0x64, 0x48, 0x4d, 0x67, 0x55, 0x48, 0x52, 0x35, 0x49, 0x45, 0x78, + 0x30, 0x0a, 0x5a, 0x44, 0x45, 0x50, 0x4d, 0x41, 0x30, 0x47, 0x41, 0x31, + 0x55, 0x45, 0x41, 0x77, 0x77, 0x47, 0x64, 0x47, 0x56, 0x7a, 0x64, 0x47, + 0x4e, 0x68, 0x4d, 0x42, 0x34, 0x58, 0x44, 0x54, 0x45, 0x30, 0x4d, 0x44, + 0x63, 0x78, 0x4e, 0x7a, 0x49, 0x7a, 0x4e, 0x54, 0x59, 0x77, 0x4d, 0x6c, + 0x6f, 0x58, 0x44, 0x54, 0x49, 0x30, 0x4d, 0x44, 0x63, 0x78, 0x4e, 0x44, + 0x49, 0x7a, 0x4e, 0x54, 0x59, 0x77, 0x0a, 0x4d, 0x6c, 0x6f, 0x77, 0x57, + 0x6a, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, + 0x68, 0x4d, 0x43, 0x51, 0x56, 0x55, 0x78, 0x45, 0x7a, 0x41, 0x52, 0x42, + 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x43, 0x6c, 0x4e, 0x76, 0x62, + 0x57, 0x55, 0x74, 0x55, 0x33, 0x52, 0x68, 0x64, 0x47, 0x55, 0x78, 0x49, + 0x54, 0x41, 0x66, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x0a, + 0x47, 0x45, 0x6c, 0x75, 0x64, 0x47, 0x56, 0x79, 0x62, 0x6d, 0x56, 0x30, + 0x49, 0x46, 0x64, 0x70, 0x5a, 0x47, 0x64, 0x70, 0x64, 0x48, 0x4d, 0x67, + 0x55, 0x48, 0x52, 0x35, 0x49, 0x45, 0x78, 0x30, 0x5a, 0x44, 0x45, 0x54, + 0x4d, 0x42, 0x45, 0x47, 0x41, 0x31, 0x55, 0x45, 0x41, 0x77, 0x77, 0x4b, + 0x64, 0x47, 0x56, 0x7a, 0x64, 0x47, 0x4e, 0x73, 0x61, 0x57, 0x56, 0x75, + 0x64, 0x44, 0x43, 0x42, 0x0a, 0x6e, 0x7a, 0x41, 0x4e, 0x42, 0x67, 0x6b, + 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, + 0x46, 0x41, 0x41, 0x4f, 0x42, 0x6a, 0x51, 0x41, 0x77, 0x67, 0x59, 0x6b, + 0x43, 0x67, 0x59, 0x45, 0x41, 0x37, 0x46, 0x52, 0x48, 0x32, 0x36, 0x47, + 0x2b, 0x46, 0x74, 0x35, 0x56, 0x51, 0x67, 0x79, 0x7a, 0x6c, 0x5a, 0x73, + 0x66, 0x53, 0x6e, 0x48, 0x53, 0x5a, 0x36, 0x47, 0x58, 0x0a, 0x62, 0x37, + 0x71, 0x78, 0x6d, 0x6b, 0x32, 0x50, 0x4f, 0x38, 0x54, 0x59, 0x71, 0x4b, + 0x5a, 0x6d, 0x6b, 0x66, 0x4d, 0x77, 0x6b, 0x65, 0x36, 0x52, 0x55, 0x66, + 0x51, 0x56, 0x2b, 0x53, 0x2b, 0x47, 0x7a, 0x52, 0x76, 0x7a, 0x35, 0x4c, + 0x6c, 0x53, 0x33, 0x31, 0x55, 0x31, 0x51, 0x43, 0x70, 0x33, 0x63, 0x67, + 0x77, 0x6b, 0x49, 0x49, 0x41, 0x51, 0x61, 0x31, 0x45, 0x32, 0x68, 0x43, + 0x45, 0x7a, 0x0a, 0x57, 0x33, 0x31, 0x69, 0x76, 0x62, 0x4d, 0x42, 0x79, + 0x52, 0x4b, 0x39, 0x74, 0x46, 0x70, 0x79, 0x6e, 0x34, 0x55, 0x76, 0x38, + 0x4b, 0x50, 0x31, 0x34, 0x4f, 0x62, 0x4b, 0x6a, 0x54, 0x51, 0x71, 0x78, + 0x55, 0x5a, 0x70, 0x35, 0x35, 0x38, 0x44, 0x67, 0x4f, 0x48, 0x67, 0x35, + 0x62, 0x35, 0x6d, 0x47, 0x52, 0x4d, 0x30, 0x70, 0x79, 0x56, 0x31, 0x65, + 0x71, 0x52, 0x4b, 0x36, 0x50, 0x57, 0x77, 0x0a, 0x52, 0x2f, 0x62, 0x6a, + 0x67, 0x6c, 0x6c, 0x69, 0x36, 0x70, 0x6d, 0x6e, 0x72, 0x2b, 0x30, 0x43, + 0x41, 0x77, 0x45, 0x41, 0x41, 0x54, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, + 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x55, 0x46, + 0x41, 0x41, 0x4f, 0x42, 0x67, 0x51, 0x41, 0x53, 0x74, 0x53, 0x6d, 0x35, + 0x50, 0x4d, 0x37, 0x75, 0x62, 0x52, 0x4f, 0x69, 0x4b, 0x4b, 0x36, 0x2f, + 0x0a, 0x54, 0x32, 0x46, 0x6b, 0x4b, 0x6c, 0x68, 0x69, 0x54, 0x4f, 0x78, + 0x2b, 0x52, 0x79, 0x65, 0x6e, 0x6d, 0x33, 0x45, 0x69, 0x6f, 0x35, 0x39, + 0x65, 0x6d, 0x71, 0x2b, 0x6a, 0x58, 0x6c, 0x2b, 0x31, 0x6e, 0x68, 0x50, + 0x79, 0x53, 0x58, 0x35, 0x47, 0x32, 0x50, 0x51, 0x7a, 0x53, 0x52, 0x35, + 0x76, 0x64, 0x31, 0x64, 0x49, 0x68, 0x77, 0x67, 0x5a, 0x53, 0x52, 0x34, + 0x47, 0x79, 0x74, 0x74, 0x6b, 0x0a, 0x74, 0x52, 0x5a, 0x35, 0x37, 0x6b, + 0x2f, 0x4e, 0x49, 0x31, 0x62, 0x72, 0x55, 0x57, 0x38, 0x6a, 0x6f, 0x69, + 0x45, 0x4f, 0x4d, 0x4a, 0x41, 0x2f, 0x4d, 0x72, 0x37, 0x48, 0x37, 0x61, + 0x73, 0x78, 0x37, 0x77, 0x49, 0x52, 0x59, 0x44, 0x45, 0x39, 0x31, 0x46, + 0x73, 0x38, 0x47, 0x6b, 0x4b, 0x57, 0x64, 0x35, 0x4c, 0x68, 0x6f, 0x50, + 0x41, 0x51, 0x6a, 0x2b, 0x71, 0x64, 0x47, 0x33, 0x35, 0x43, 0x0a, 0x4f, + 0x4f, 0x2b, 0x73, 0x76, 0x64, 0x6b, 0x6d, 0x71, 0x48, 0x30, 0x4b, 0x5a, + 0x6f, 0x33, 0x32, 0x30, 0x5a, 0x55, 0x71, 0x64, 0x6c, 0x32, 0x6f, 0x6f, + 0x51, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, + 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, + 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x00}; + +const char test_signed_client_key[] = { + 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, + 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, + 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x43, 0x65, 0x51, 0x49, 0x42, + 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, + 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, 0x46, 0x41, 0x41, 0x53, 0x43, + 0x41, 0x6d, 0x4d, 0x77, 0x67, 0x67, 0x4a, 0x66, 0x41, 0x67, 0x45, 0x41, + 0x41, 0x6f, 0x47, 0x42, 0x41, 0x4f, 0x78, 0x55, 0x52, 0x39, 0x75, 0x68, + 0x76, 0x68, 0x62, 0x65, 0x56, 0x55, 0x49, 0x4d, 0x0a, 0x73, 0x35, 0x57, + 0x62, 0x48, 0x30, 0x70, 0x78, 0x30, 0x6d, 0x65, 0x68, 0x6c, 0x32, 0x2b, + 0x36, 0x73, 0x5a, 0x70, 0x4e, 0x6a, 0x7a, 0x76, 0x45, 0x32, 0x4b, 0x69, + 0x6d, 0x5a, 0x70, 0x48, 0x7a, 0x4d, 0x4a, 0x48, 0x75, 0x6b, 0x56, 0x48, + 0x30, 0x46, 0x66, 0x6b, 0x76, 0x68, 0x73, 0x30, 0x62, 0x38, 0x2b, 0x53, + 0x35, 0x55, 0x74, 0x39, 0x56, 0x4e, 0x55, 0x41, 0x71, 0x64, 0x33, 0x49, + 0x4d, 0x0a, 0x4a, 0x43, 0x43, 0x41, 0x45, 0x47, 0x74, 0x52, 0x4e, 0x6f, + 0x51, 0x68, 0x4d, 0x31, 0x74, 0x39, 0x59, 0x72, 0x32, 0x7a, 0x41, 0x63, + 0x6b, 0x53, 0x76, 0x62, 0x52, 0x61, 0x63, 0x70, 0x2b, 0x46, 0x4c, 0x2f, + 0x43, 0x6a, 0x39, 0x65, 0x44, 0x6d, 0x79, 0x6f, 0x30, 0x30, 0x4b, 0x73, + 0x56, 0x47, 0x61, 0x65, 0x65, 0x66, 0x41, 0x34, 0x44, 0x68, 0x34, 0x4f, + 0x57, 0x2b, 0x5a, 0x68, 0x6b, 0x54, 0x0a, 0x4e, 0x4b, 0x63, 0x6c, 0x64, + 0x58, 0x71, 0x6b, 0x53, 0x75, 0x6a, 0x31, 0x73, 0x45, 0x66, 0x32, 0x34, + 0x34, 0x4a, 0x5a, 0x59, 0x75, 0x71, 0x5a, 0x70, 0x36, 0x2f, 0x74, 0x41, + 0x67, 0x4d, 0x42, 0x41, 0x41, 0x45, 0x43, 0x67, 0x59, 0x45, 0x41, 0x69, + 0x32, 0x4e, 0x53, 0x56, 0x71, 0x70, 0x5a, 0x4d, 0x61, 0x66, 0x45, 0x35, + 0x59, 0x59, 0x55, 0x54, 0x63, 0x4d, 0x47, 0x65, 0x36, 0x51, 0x53, 0x0a, + 0x6b, 0x32, 0x6a, 0x74, 0x70, 0x73, 0x71, 0x59, 0x67, 0x67, 0x67, 0x49, + 0x32, 0x52, 0x6e, 0x4c, 0x4a, 0x2f, 0x32, 0x74, 0x4e, 0x5a, 0x77, 0x59, + 0x49, 0x35, 0x70, 0x77, 0x50, 0x38, 0x51, 0x56, 0x53, 0x62, 0x6e, 0x4d, + 0x61, 0x69, 0x46, 0x34, 0x67, 0x6f, 0x6b, 0x44, 0x35, 0x68, 0x47, 0x64, + 0x72, 0x4e, 0x44, 0x66, 0x54, 0x6e, 0x62, 0x32, 0x76, 0x2b, 0x79, 0x49, + 0x77, 0x59, 0x45, 0x48, 0x0a, 0x30, 0x77, 0x38, 0x2b, 0x6f, 0x47, 0x37, + 0x5a, 0x38, 0x31, 0x4b, 0x6f, 0x64, 0x73, 0x69, 0x5a, 0x53, 0x49, 0x44, + 0x4a, 0x66, 0x54, 0x47, 0x73, 0x41, 0x5a, 0x68, 0x56, 0x4e, 0x77, 0x4f, + 0x7a, 0x39, 0x79, 0x30, 0x56, 0x44, 0x38, 0x42, 0x42, 0x5a, 0x5a, 0x31, + 0x2f, 0x32, 0x37, 0x34, 0x5a, 0x68, 0x35, 0x32, 0x41, 0x55, 0x4b, 0x4c, + 0x6a, 0x5a, 0x53, 0x2f, 0x5a, 0x77, 0x49, 0x62, 0x53, 0x0a, 0x57, 0x32, + 0x79, 0x77, 0x79, 0x61, 0x38, 0x35, 0x35, 0x64, 0x50, 0x6e, 0x48, 0x2f, + 0x77, 0x6a, 0x2b, 0x30, 0x45, 0x43, 0x51, 0x51, 0x44, 0x39, 0x58, 0x38, + 0x44, 0x39, 0x32, 0x30, 0x6b, 0x42, 0x79, 0x54, 0x4e, 0x48, 0x68, 0x42, + 0x47, 0x31, 0x38, 0x62, 0x69, 0x41, 0x45, 0x5a, 0x34, 0x70, 0x78, 0x73, + 0x39, 0x66, 0x30, 0x4f, 0x41, 0x47, 0x38, 0x33, 0x33, 0x33, 0x65, 0x56, + 0x63, 0x49, 0x0a, 0x77, 0x32, 0x6c, 0x4a, 0x44, 0x4c, 0x73, 0x59, 0x44, + 0x5a, 0x72, 0x43, 0x42, 0x32, 0x6f, 0x63, 0x67, 0x41, 0x33, 0x6c, 0x55, + 0x64, 0x6f, 0x7a, 0x6c, 0x7a, 0x50, 0x43, 0x37, 0x59, 0x44, 0x59, 0x77, + 0x38, 0x72, 0x65, 0x67, 0x30, 0x74, 0x6b, 0x69, 0x52, 0x59, 0x35, 0x41, + 0x6b, 0x45, 0x41, 0x37, 0x73, 0x64, 0x4e, 0x7a, 0x4f, 0x65, 0x51, 0x73, + 0x51, 0x52, 0x6e, 0x37, 0x2b, 0x2b, 0x35, 0x0a, 0x30, 0x62, 0x50, 0x39, + 0x44, 0x74, 0x54, 0x2f, 0x69, 0x4f, 0x4e, 0x31, 0x67, 0x62, 0x66, 0x78, + 0x52, 0x7a, 0x43, 0x66, 0x43, 0x66, 0x58, 0x64, 0x6f, 0x4f, 0x74, 0x66, + 0x51, 0x57, 0x49, 0x7a, 0x54, 0x65, 0x50, 0x57, 0x74, 0x55, 0x52, 0x74, + 0x39, 0x58, 0x2f, 0x35, 0x44, 0x39, 0x4e, 0x6f, 0x66, 0x49, 0x30, 0x52, + 0x67, 0x35, 0x57, 0x32, 0x6f, 0x47, 0x79, 0x2f, 0x4d, 0x4c, 0x65, 0x35, + 0x0a, 0x2f, 0x73, 0x58, 0x48, 0x56, 0x51, 0x4a, 0x42, 0x41, 0x49, 0x75, + 0x70, 0x35, 0x58, 0x72, 0x4a, 0x44, 0x6b, 0x51, 0x79, 0x77, 0x4e, 0x5a, + 0x79, 0x41, 0x55, 0x55, 0x32, 0x65, 0x63, 0x6e, 0x32, 0x62, 0x43, 0x57, + 0x42, 0x46, 0x6a, 0x77, 0x74, 0x71, 0x64, 0x2b, 0x4c, 0x42, 0x6d, 0x75, + 0x4d, 0x63, 0x69, 0x49, 0x39, 0x66, 0x4f, 0x4b, 0x73, 0x5a, 0x74, 0x45, + 0x4b, 0x5a, 0x72, 0x7a, 0x2f, 0x0a, 0x55, 0x30, 0x6c, 0x6b, 0x65, 0x4d, + 0x52, 0x6f, 0x53, 0x77, 0x76, 0x58, 0x45, 0x38, 0x77, 0x6d, 0x47, 0x4c, + 0x6a, 0x6a, 0x72, 0x41, 0x62, 0x64, 0x66, 0x6f, 0x68, 0x72, 0x58, 0x46, + 0x6b, 0x43, 0x51, 0x51, 0x44, 0x5a, 0x45, 0x78, 0x2f, 0x4c, 0x74, 0x49, + 0x6c, 0x36, 0x4a, 0x49, 0x4e, 0x4a, 0x51, 0x69, 0x73, 0x77, 0x56, 0x65, + 0x30, 0x74, 0x57, 0x72, 0x36, 0x6b, 0x2b, 0x41, 0x53, 0x50, 0x0a, 0x31, + 0x57, 0x58, 0x6f, 0x54, 0x6d, 0x2b, 0x48, 0x59, 0x70, 0x6f, 0x46, 0x2f, + 0x58, 0x55, 0x76, 0x76, 0x39, 0x4c, 0x63, 0x63, 0x4e, 0x46, 0x31, 0x49, + 0x61, 0x7a, 0x46, 0x6a, 0x33, 0x34, 0x68, 0x77, 0x52, 0x51, 0x77, 0x68, + 0x78, 0x37, 0x77, 0x2f, 0x56, 0x35, 0x32, 0x49, 0x65, 0x62, 0x2b, 0x70, + 0x30, 0x6a, 0x55, 0x4d, 0x59, 0x47, 0x78, 0x41, 0x6b, 0x45, 0x41, 0x6a, + 0x44, 0x68, 0x64, 0x0a, 0x39, 0x70, 0x42, 0x4f, 0x31, 0x66, 0x4b, 0x58, + 0x57, 0x69, 0x58, 0x7a, 0x69, 0x39, 0x5a, 0x4b, 0x66, 0x6f, 0x79, 0x54, + 0x4e, 0x63, 0x55, 0x71, 0x33, 0x65, 0x42, 0x53, 0x56, 0x4b, 0x77, 0x50, + 0x47, 0x32, 0x6e, 0x49, 0x74, 0x67, 0x35, 0x79, 0x63, 0x58, 0x65, 0x6e, + 0x67, 0x6a, 0x54, 0x35, 0x73, 0x67, 0x63, 0x57, 0x44, 0x6e, 0x63, 0x69, + 0x49, 0x7a, 0x57, 0x37, 0x42, 0x49, 0x56, 0x49, 0x0a, 0x4a, 0x69, 0x71, + 0x4f, 0x73, 0x7a, 0x71, 0x39, 0x47, 0x57, 0x45, 0x53, 0x45, 0x72, 0x41, + 0x61, 0x74, 0x67, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, + 0x4e, 0x44, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, + 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x00}; diff --git a/test/core/end2end/data/ssl_test_data.h b/test/core/end2end/data/ssl_test_data.h index 675249dbd51..4a64af1e27b 100644 --- a/test/core/end2end/data/ssl_test_data.h +++ b/test/core/end2end/data/ssl_test_data.h @@ -37,5 +37,9 @@ extern const char test_root_cert[]; extern const char test_server1_cert[]; extern const char test_server1_key[]; +extern const char test_self_signed_client_cert[]; +extern const char test_self_signed_client_key[]; +extern const char test_signed_client_cert[]; +extern const char test_signed_client_key[]; #endif /* GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H */ diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c new file mode 100644 index 00000000000..cd031ca4826 --- /dev/null +++ b/test/core/end2end/fixtures/h2_ssl_cert.c @@ -0,0 +1,376 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/tmpfile.h" +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/data/ssl_test_data.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +extern void simple_request(grpc_end2end_test_config config); + +typedef struct fullstack_secure_fixture_data { + char *localaddr; +} fullstack_secure_fixture_data; + +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( + grpc_channel_args *client_args, grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + int port = grpc_pick_unused_port_or_die(); + fullstack_secure_fixture_data *ffd = + gpr_malloc(sizeof(fullstack_secure_fixture_data)); + memset(&f, 0, sizeof(f)); + + gpr_join_host_port(&ffd->localaddr, "localhost", port); + + f.fixture_data = ffd; + f.cq = grpc_completion_queue_create(NULL); + + return f; +} + +static void process_auth_failure(void *state, grpc_auth_context *ctx, + const grpc_metadata *md, size_t md_count, + grpc_process_auth_metadata_done_cb cb, + void *user_data) { + GPR_ASSERT(state == NULL); + cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL); +} + +static void chttp2_init_client_secure_fullstack( + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + grpc_channel_credentials *creds) { + fullstack_secure_fixture_data *ffd = f->fixture_data; + f->client = + grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL); + GPR_ASSERT(f->client != NULL); + grpc_channel_credentials_release(creds); +} + +static void chttp2_init_server_secure_fullstack( + grpc_end2end_test_fixture *f, grpc_channel_args *server_args, + grpc_server_credentials *server_creds) { + fullstack_secure_fixture_data *ffd = f->fixture_data; + if (f->server) { + grpc_server_destroy(f->server); + } + f->server = grpc_server_create(server_args, NULL); + grpc_server_register_completion_queue(f->server, f->cq, NULL); + GPR_ASSERT(grpc_server_add_secure_http2_port(f->server, ffd->localaddr, + server_creds)); + grpc_server_credentials_release(server_creds); + grpc_server_start(f->server); +} + +void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { + fullstack_secure_fixture_data *ffd = f->fixture_data; + gpr_free(ffd->localaddr); + gpr_free(ffd); +} + +static int fail_server_auth_check(grpc_channel_args *server_args) { + size_t i; + if (server_args == NULL) return 0; + for (i = 0; i < server_args->num_args; i++) { + if (strcmp(server_args->args[i].key, FAIL_AUTH_CHECK_SERVER_ARG_NAME) == + 0) { + return 1; + } + } + return 0; +} + +#define SERVER_INIT_NAME(REQUEST_TYPE) \ + chttp2_init_server_simple_ssl_secure_fullstack_##REQUEST_TYPE + +#define SERVER_INIT(REQUEST_TYPE) \ + static void SERVER_INIT_NAME(REQUEST_TYPE)( \ + grpc_end2end_test_fixture * f, grpc_channel_args * server_args) { \ + grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key, \ + test_server1_cert}; \ + grpc_server_credentials *ssl_creds = \ + grpc_ssl_server_credentials_create_ex( \ + test_root_cert, &pem_cert_key_pair, 1, REQUEST_TYPE, NULL); \ + if (fail_server_auth_check(server_args)) { \ + grpc_auth_metadata_processor processor = {process_auth_failure, NULL, \ + NULL}; \ + grpc_server_credentials_set_auth_metadata_processor(ssl_creds, \ + processor); \ + } \ + chttp2_init_server_secure_fullstack(f, server_args, ssl_creds); \ + } + +SERVER_INIT(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE); +SERVER_INIT(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY); +SERVER_INIT(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY); +SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY); +SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY); + +#define CLIENT_INIT_NAME(cert_type) \ + chttp2_init_client_simple_ssl_secure_fullstack_##cert_type + +typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype; + +#define CLIENT_INIT(cert_type) \ + static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \ + grpc_channel_args * client_args) { \ + grpc_channel_credentials *ssl_creds = NULL; \ + grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \ + test_self_signed_client_key, test_self_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = { \ + test_signed_client_key, test_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair bad_client_key_cert_pair = { \ + test_self_signed_client_key, test_signed_client_cert}; \ + grpc_ssl_pem_key_cert_pair *key_cert_pair = NULL; \ + switch (cert_type) { \ + case SELF_SIGNED: \ + key_cert_pair = &self_signed_client_key_cert_pair; \ + break; \ + case SIGNED: \ + key_cert_pair = &signed_client_key_cert_pair; \ + break; \ + case BAD_CERT_PAIR: \ + key_cert_pair = &bad_client_key_cert_pair; \ + break; \ + default: \ + break; \ + } \ + ssl_creds = \ + grpc_ssl_credentials_create(test_root_cert, key_cert_pair, NULL); \ + grpc_arg ssl_name_override = {GRPC_ARG_STRING, \ + GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, \ + {"foo.test.google.fr"}}; \ + grpc_channel_args *new_client_args = \ + grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \ + chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \ + grpc_channel_args_destroy(new_client_args); \ + } + +CLIENT_INIT(NONE); +CLIENT_INIT(SELF_SIGNED); +CLIENT_INIT(SIGNED); +CLIENT_INIT(BAD_CERT_PAIR); + +#define TEST_NAME(enum_name, cert_type, result) \ + "chttp2/ssl_" #enum_name "_" #cert_type "_" #result "_" + +typedef enum { SUCCESS, FAIL } test_result; + +#define SSL_TEST(request_type, cert_type, result) \ + { \ + {TEST_NAME(request_type, cert_type, result), \ + FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | \ + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS, \ + chttp2_create_fixture_secure_fullstack, CLIENT_INIT_NAME(cert_type), \ + SERVER_INIT_NAME(request_type), chttp2_tear_down_secure_fullstack}, \ + result \ + } + +/* All test configurations */ +typedef struct grpc_end2end_test_config_wrapper { + grpc_end2end_test_config config; + test_result result; +} grpc_end2end_test_config_wrapper; + +static grpc_end2end_test_config_wrapper configs[] = { + SSL_TEST(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, NONE, SUCCESS), + SSL_TEST(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, SELF_SIGNED, SUCCESS), + SSL_TEST(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, SIGNED, SUCCESS), + SSL_TEST(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, BAD_CERT_PAIR, FAIL), + + SSL_TEST(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, NONE, + SUCCESS), + SSL_TEST(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, SELF_SIGNED, + SUCCESS), + SSL_TEST(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, SIGNED, + SUCCESS), + SSL_TEST(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, BAD_CERT_PAIR, + FAIL), + + SSL_TEST(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY, NONE, SUCCESS), + SSL_TEST(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY, SELF_SIGNED, FAIL), + SSL_TEST(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY, SIGNED, SUCCESS), + SSL_TEST(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY, BAD_CERT_PAIR, + FAIL), + + SSL_TEST(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, + NONE, FAIL), + SSL_TEST(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, + SELF_SIGNED, SUCCESS), + SSL_TEST(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, + SIGNED, SUCCESS), + SSL_TEST(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY, + BAD_CERT_PAIR, FAIL), + + SSL_TEST(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY, NONE, + FAIL), + SSL_TEST(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY, + SELF_SIGNED, FAIL), + SSL_TEST(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY, SIGNED, + SUCCESS), + SSL_TEST(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY, + BAD_CERT_PAIR, FAIL), +}; + +static void *tag(intptr_t t) { return (void *)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char *test_name, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); +} + +static void simple_request_body(grpc_end2end_test_fixture f, + test_result expected_result) { + grpc_call *c; + gpr_timespec deadline = five_seconds_time(); + cq_verifier *cqv = cq_verifier_create(f.cq); + grpc_op ops[6]; + grpc_op *op; + grpc_call_error error; + + c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, + "/foo", "foo.test.google.fr:1234", deadline, + NULL); + GPR_ASSERT(c); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(1), expected_result == SUCCESS); + cq_verify(cqv); + + grpc_call_destroy(c); + cq_verifier_destroy(cqv); +} + +int main(int argc, char **argv) { + size_t i; + FILE *roots_file; + size_t roots_size = strlen(test_root_cert); + char *roots_filename; + + grpc_test_init(argc, argv); + grpc_end2end_tests_pre_init(); + + /* Set the SSL roots env var. */ + roots_file = + gpr_tmpfile("chttp2_simple_ssl_cert_fullstack_test", &roots_filename); + GPR_ASSERT(roots_filename != NULL); + GPR_ASSERT(roots_file != NULL); + GPR_ASSERT(fwrite(test_root_cert, 1, roots_size, roots_file) == roots_size); + fclose(roots_file); + gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, roots_filename); + + grpc_init(); + + for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { + grpc_end2end_test_fixture f = + begin_test(configs[i].config, "SSL_CERT_tests", NULL, NULL); + + simple_request_body(f, configs[i].result); + end_test(&f); + configs[i].config.tear_down_data(&f); + } + + grpc_shutdown(); + + /* Cleanup. */ + remove(roots_filename); + gpr_free(roots_filename); + + return 0; +} diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 9a940a4ab51..cffe5995bcd 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -65,6 +65,7 @@ END2END_FIXTURES = { 'h2_sockpair+trace': socketpair_unsecure_fixture_options._replace( ci_mac=False, tracing=True), 'h2_ssl': default_secure_fixture_options, + 'h2_ssl_cert': default_secure_fixture_options, 'h2_ssl_proxy': default_secure_fixture_options._replace(includes_proxy=True, ci_mac=False), 'h2_uds': uds_fixture_options, diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index 579faa44411..0eede6c23bd 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index de6fd0de499..034d9c6e6f4 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -786,6 +786,7 @@ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ include/grpc/grpc_security.h \ +include/grpc/grpc_security_constants.h \ include/grpc/census.h \ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 4b3c8ab4bf6..4414758985e 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -786,6 +786,7 @@ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ include/grpc/grpc_security.h \ +include/grpc/grpc_security_constants.h \ include/grpc/census.h \ src/core/lib/channel/channel_args.h \ src/core/lib/channel/channel_stack.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 7978f12d53f..ef4df1bd187 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3681,6 +3681,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "end2end_tests", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_ssl_cert_test", + "src": [ + "test/core/end2end/fixtures/h2_ssl_cert.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "end2end_tests", @@ -4097,6 +4114,7 @@ "language": "c", "name": "grpc_test_util", "src": [ + "test/core/end2end/data/client_certs.c", "test/core/end2end/data/server1_cert.c", "test/core/end2end/data/server1_key.c", "test/core/end2end/data/ssl_test_data.h", @@ -6163,6 +6181,7 @@ ], "headers": [ "include/grpc/grpc_security.h", + "include/grpc/grpc_security_constants.h", "src/core/lib/security/auth_filters.h", "src/core/lib/security/b64.h", "src/core/lib/security/credentials.h", @@ -6182,6 +6201,7 @@ "name": "grpc_secure", "src": [ "include/grpc/grpc_security.h", + "include/grpc/grpc_security_constants.h", "src/core/lib/http/httpcli_security_connector.c", "src/core/lib/security/auth_filters.h", "src/core/lib/security/b64.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index f4a76dedb1a..54fde598558 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -13428,6 +13428,842 @@ "posix" ] }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "bad_hostname" diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index d26c1f8dfc1..2ffa1865656 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1283,6 +1283,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_test", "vcxproj\test {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_cert_test", "vcxproj\test/end2end/fixtures\h2_ssl_cert_test\h2_ssl_cert_test.vcxproj", "{B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_test", "vcxproj\test/end2end/fixtures\h2_ssl_proxy_test\h2_ssl_proxy_test.vcxproj", "{A9092608-E45E-AC96-6533-A6E7DD98211D}" ProjectSection(myProperties) = preProject lib = "False" @@ -3339,6 +3351,22 @@ Global {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|Win32.Build.0 = Release|Win32 {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|x64.ActiveCfg = Release|x64 {EA78D290-4098-FF04-C647-013F6B81E4E7}.Release-DLL|x64.Build.0 = Release|x64 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug|Win32.ActiveCfg = Debug|Win32 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug|x64.ActiveCfg = Debug|x64 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release|Win32.ActiveCfg = Release|Win32 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release|x64.ActiveCfg = Release|x64 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug|Win32.Build.0 = Debug|Win32 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug|x64.Build.0 = Debug|x64 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release|Win32.Build.0 = Release|Win32 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release|x64.Build.0 = Release|x64 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Debug-DLL|x64.Build.0 = Debug|x64 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release-DLL|Win32.Build.0 = Release|Win32 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release-DLL|x64.ActiveCfg = Release|x64 + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58}.Release-DLL|x64.Build.0 = Release|x64 {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug|Win32.ActiveCfg = Debug|Win32 {A9092608-E45E-AC96-6533-A6E7DD98211D}.Debug|x64.ActiveCfg = Debug|x64 {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 32540da4991..2e4d151f95d 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -293,6 +293,7 @@ + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 09b94cffe9b..63569df0abf 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -576,6 +576,9 @@ include\grpc + + include\grpc + include\grpc diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index d1f67ee44e3..79e00e78ffc 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -161,6 +161,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 2fee6aab62b..e7c64c44f4b 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -1,6 +1,9 @@ + + test\core\end2end\data + test\core\end2end\data diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj new file mode 100644 index 00000000000..d64c3178102 --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj @@ -0,0 +1,202 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B3B7D225-3C04-72F9-4C2C-1C3F3136FE58} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_ssl_cert_test + static + Debug + static + Debug + + + h2_ssl_cert_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {1F1F9084-2A93-B80E-364F-5754894AFAB4} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj.filters new file mode 100644 index 00000000000..532b0ae2b31 --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_cert_test/h2_ssl_cert_test.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + test\core\end2end\fixtures + + + + + + {2ad9c3be-3600-2475-3705-8927bd57651b} + + + {5d5ee434-b892-585d-97ca-ae595eecbd0b} + + + {903c738d-3c85-534d-d26e-01138f2e96c6} + + + {f5bca83d-8278-22b4-7999-c50cea11b90b} + + + + From 8149b891bb333fac76aaa4072d2120cbc278a2e4 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 19 Apr 2016 15:33:24 -0700 Subject: [PATCH 75/93] Set the core file size to unlimited when launching stress client and servers --- tools/gcp/stress_test/run_client.py | 6 ++++++ tools/gcp/stress_test/run_server.py | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tools/gcp/stress_test/run_client.py b/tools/gcp/stress_test/run_client.py index 9a4bc8a3918..f1084f6caa9 100755 --- a/tools/gcp/stress_test/run_client.py +++ b/tools/gcp/stress_test/run_client.py @@ -31,6 +31,7 @@ import datetime import os import re +import resource import select import subprocess import sys @@ -89,6 +90,11 @@ def run_client(): examining logs). This is the reason why the script waits forever in case of failures """ + # Set the 'core file' size to 'unlimited' so that 'core' files are generated + # if the client crashes (Note: This is not relevant for Java and Go clients) + resource.setrlimit(resource.RLIMIT_CORE, + (resource.RLIM_INFINITY, resource.RLIM_INFINITY)) + env = dict(os.environ) image_type = env['STRESS_TEST_IMAGE_TYPE'] stress_client_cmd = env['STRESS_TEST_CMD'].split() diff --git a/tools/gcp/stress_test/run_server.py b/tools/gcp/stress_test/run_server.py index 0d9a653d186..cff6fc8c721 100755 --- a/tools/gcp/stress_test/run_server.py +++ b/tools/gcp/stress_test/run_server.py @@ -30,6 +30,7 @@ import datetime import os +import resource import select import subprocess import sys @@ -56,6 +57,10 @@ def run_server(): might want to connect to the pod for examining logs). This is the reason why the script waits forever in case of failures. """ + # Set the 'core file' size to 'unlimited' so that 'core' files are generated + # if the server crashes (Note: This is not relevant for Java and Go servers) + resource.setrlimit(resource.RLIMIT_CORE, + (resource.RLIM_INFINITY, resource.RLIM_INFINITY)) # Read the parameters from environment variables env = dict(os.environ) @@ -73,9 +78,10 @@ def run_server(): logfile_name = env.get('LOGFILE_NAME') print('pod_name: %s, project_id: %s, run_id: %s, dataset_id: %s, ' - 'summary_table_id: %s, qps_table_id: %s') % ( - pod_name, project_id, run_id, dataset_id, summary_table_id, - qps_table_id) + 'summary_table_id: %s, qps_table_id: %s') % (pod_name, project_id, + run_id, dataset_id, + summary_table_id, + qps_table_id) bq_helper = BigQueryHelper(run_id, image_type, pod_name, project_id, dataset_id, summary_table_id, qps_table_id) From cd4e0b8a676dd739c2d57c9010c0e12573d8695a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 19 Apr 2016 17:15:09 -0700 Subject: [PATCH 76/93] Expand server/client corpora --- .../0f98d7d56e9a99b97e5dc7eb122ef22e9684077b | Bin 0 -> 362 bytes .../118ffddb43ccf9dae8bdb4702232d1dc39b021f7 | Bin 0 -> 384 bytes .../1306c4c6ea714d4db0e4d814c944d8d40335e0fa | Bin 0 -> 344 bytes .../143e0d4f546bbb984a7c3ac1c60a37dcf85ea58d | Bin 0 -> 305 bytes .../1875a4acdcffe505ca92ea8af8d9d6b174736e80 | Bin 0 -> 300 bytes .../26110f21dcb0fde99942e631366ebbd9d895860d | Bin 0 -> 591 bytes .../2dce4a1fc4bb00bfcd43d549a3785913c9280369 | Bin 0 -> 84 bytes .../42c395ab373346fb283ace021bdc1f6428f92f80 | Bin 0 -> 303 bytes .../4f5b9d5c707a35084918c272efd1295d301ca0b5 | Bin 0 -> 392 bytes .../50ece7ea16659b4e1a2284cea963fab662c19e6b | Bin 0 -> 362 bytes .../59d78f6397f0483d139f5bd0a9f264156f34acc4 | Bin 0 -> 334 bytes .../636a19b8f50c4efccccea83ab78a933d999e41fa | Bin 0 -> 300 bytes .../64c0e0b4d9c2d25fdcb1e2bdcb999487fc096dad | Bin 0 -> 384 bytes .../6749752b02f7d14fff9ac35f6b68dd62f5b49fcd | Bin 0 -> 388 bytes .../6e71553967212dfea2c9995f3641e582d8c2105b | Bin 0 -> 16 bytes .../7885df741c88ca4b539798d9985c445f41cc2929 | Bin 0 -> 401 bytes .../7af41e5391204f4596cb1461792e2e23f9390b7b | Bin 0 -> 300 bytes .../813d2c34c0df8d4a918e68e58cf0ae3703d0d46f | Bin 0 -> 342 bytes .../8bacacba71bfa5c74fd74cb6577a49a7aec9cf1f | Bin 0 -> 571 bytes .../90a9c3390752b94ca19a58cb2fe6267bc818f718 | Bin 0 -> 389 bytes .../9b1355c6e2c43ce83001bbead09a79852e04feef | Bin 0 -> 720 bytes .../9d362d2aaeee243a5b54621d8187c4b16f87c9f5 | Bin 0 -> 158 bytes .../9f0ab521c728be21e93112b2730c52bc1d6c0021 | Bin 0 -> 1153 bytes .../a30fc2605f4e74f7003f902ea4a4c994e3ce9bfd | Bin 0 -> 371 bytes .../a8e67676784506d2e6eab3a0dfa25e53a80b40a0 | Bin 0 -> 368 bytes .../b09f98e13e5b67a4dd7f74eff00bb247b9967844 | Bin 0 -> 300 bytes .../ba942f8fb244b60561a067129c242c4bc4fdd5e1 | 1 + .../bc9e17fed43c5d0668a87e8d6354c344c5b4d00b | Bin 0 -> 384 bytes .../c5d0c169d326d79fc4ee8521b282dbcbf33c1d5c | 1 + .../dccd1fd6d3394f5f68c87950ed7356a2e9ef0f6f | Bin 0 -> 368 bytes .../e0d1ee5e2e169dcae87f790f5c27e84a3453cedb | Bin 0 -> 362 bytes .../e309e21c69e4b96ab37f675f4e87a52453512ef8 | Bin 0 -> 350 bytes .../e3422e8f5d63a9ef180aab552353955c7aba90b0 | Bin 0 -> 302 bytes .../e442f9fd63bc5345de1c14803d4ca4bb6f1152cf | Bin 0 -> 384 bytes .../e4c0e27cfd3690b8255a8214d6dd055385d1d24e | Bin 0 -> 548 bytes .../e7c26599fb2e2b031346ff1ba09294fd758f7abe | Bin 0 -> 362 bytes .../f4499e3d4bf60ae3ae929c485a13ea4dc2713369 | Bin 0 -> 362 bytes .../f8467d9574de94b9bb904f75a6a7e2405c36f105 | Bin 0 -> 1157 bytes .../05efe6d81ce606557691432634e81f61e68b0b81 | Bin 0 -> 289 bytes .../07ad7e0ea2aaecba37f2429a64e946fc6e2556f1 | Bin 0 -> 855 bytes .../0c413d2b361b2221585026d42f3046ff4135d2ff | Bin 0 -> 248 bytes .../3292129aa7f6eba86b70fff64408f18fff895c12 | Bin 0 -> 289 bytes .../38df7e63181cbd045e5af9dbee463360c8254618 | Bin 0 -> 289 bytes .../3d7ef8c7b05f26e914c479dedb1bef5e378d2d94 | Bin 0 -> 289 bytes .../4271fbb36e03cee79b21a4a5a65f37ceef58a8cd | Bin 0 -> 1091 bytes .../44516839d35af9ccaf8a2c62f3ce6a723482445e | Bin 0 -> 248 bytes .../59d0b24d1acd01c749fb4bd6802a5f4dd003ce75 | Bin 0 -> 322 bytes .../61e798bdd49b339983fea4ccfe18efe44afbd69b | Bin 0 -> 290 bytes .../8164d3c4af043c47cfd6966873bccd2353d072bf | Bin 0 -> 357 bytes .../8846918f967dd6513040c6d382fcd68ff7099873 | Bin 0 -> 342 bytes .../885fe25a0b441ef46ab176b88771c133e530cb73 | Bin 0 -> 248 bytes .../bc9545cebdcb3af82406a5f0c1b286d28f9d4f5a | Bin 0 -> 356 bytes .../cc97ece92b72cc2a4d045e16c0e2f2021bc014f8 | Bin 0 -> 258 bytes .../d96da249094db51ea92b1413907abfd27a4f2426 | Bin 0 -> 290 bytes .../df5d3cf5f05eab65ef9d385e263780ae73c42b19 | Bin 0 -> 289 bytes .../e9bbe2fe47b7b9c2683e7f17f4a33625c6ffbd8c | Bin 0 -> 289 bytes ...t-3991c873ba814d0cd03a67d25fff0c8fe8713aca | Bin 0 -> 2046 bytes ...t-58f116dfba8d428a01ca596174fca63f4ac523f0 | Bin 0 -> 2048 bytes ...t-59f6edc7cf4aeed49b4dc024052db4846d5d7fc8 | Bin 0 -> 2047 bytes ...t-63ebf780ee6c2003eba622686a4bf94c503ad96e | Bin 0 -> 1813 bytes ...t-7233d53f94386b0339b2c2b01ef2d348f5862f1f | Bin 0 -> 43 bytes ...t-9de2e92150e54982d4e502b18f374f8cd8fd453b | Bin 0 -> 2047 bytes ...t-bda43d420a3e5d5228a5f5130207a1f11fc1c81f | Bin 0 -> 2045 bytes ...t-d3c3cba3897fafec97665411ea1f94a89bb4de7b | Bin 0 -> 2046 bytes tools/run_tests/tests.json | 5398 +++++++++++------ 65 files changed, 3405 insertions(+), 1995 deletions(-) create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/0f98d7d56e9a99b97e5dc7eb122ef22e9684077b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/118ffddb43ccf9dae8bdb4702232d1dc39b021f7 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/1306c4c6ea714d4db0e4d814c944d8d40335e0fa create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/143e0d4f546bbb984a7c3ac1c60a37dcf85ea58d create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/1875a4acdcffe505ca92ea8af8d9d6b174736e80 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/26110f21dcb0fde99942e631366ebbd9d895860d create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/2dce4a1fc4bb00bfcd43d549a3785913c9280369 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/42c395ab373346fb283ace021bdc1f6428f92f80 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/4f5b9d5c707a35084918c272efd1295d301ca0b5 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/50ece7ea16659b4e1a2284cea963fab662c19e6b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/59d78f6397f0483d139f5bd0a9f264156f34acc4 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/636a19b8f50c4efccccea83ab78a933d999e41fa create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/64c0e0b4d9c2d25fdcb1e2bdcb999487fc096dad create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/6749752b02f7d14fff9ac35f6b68dd62f5b49fcd create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/6e71553967212dfea2c9995f3641e582d8c2105b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/7885df741c88ca4b539798d9985c445f41cc2929 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/7af41e5391204f4596cb1461792e2e23f9390b7b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/813d2c34c0df8d4a918e68e58cf0ae3703d0d46f create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/8bacacba71bfa5c74fd74cb6577a49a7aec9cf1f create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/90a9c3390752b94ca19a58cb2fe6267bc818f718 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/9b1355c6e2c43ce83001bbead09a79852e04feef create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/9d362d2aaeee243a5b54621d8187c4b16f87c9f5 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/9f0ab521c728be21e93112b2730c52bc1d6c0021 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/a30fc2605f4e74f7003f902ea4a4c994e3ce9bfd create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/a8e67676784506d2e6eab3a0dfa25e53a80b40a0 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/b09f98e13e5b67a4dd7f74eff00bb247b9967844 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/ba942f8fb244b60561a067129c242c4bc4fdd5e1 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/bc9e17fed43c5d0668a87e8d6354c344c5b4d00b create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/c5d0c169d326d79fc4ee8521b282dbcbf33c1d5c create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/dccd1fd6d3394f5f68c87950ed7356a2e9ef0f6f create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/e0d1ee5e2e169dcae87f790f5c27e84a3453cedb create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/e309e21c69e4b96ab37f675f4e87a52453512ef8 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/e3422e8f5d63a9ef180aab552353955c7aba90b0 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/e442f9fd63bc5345de1c14803d4ca4bb6f1152cf create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/e4c0e27cfd3690b8255a8214d6dd055385d1d24e create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/e7c26599fb2e2b031346ff1ba09294fd758f7abe create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/f4499e3d4bf60ae3ae929c485a13ea4dc2713369 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/f8467d9574de94b9bb904f75a6a7e2405c36f105 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/05efe6d81ce606557691432634e81f61e68b0b81 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/07ad7e0ea2aaecba37f2429a64e946fc6e2556f1 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/0c413d2b361b2221585026d42f3046ff4135d2ff create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/3292129aa7f6eba86b70fff64408f18fff895c12 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/38df7e63181cbd045e5af9dbee463360c8254618 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/3d7ef8c7b05f26e914c479dedb1bef5e378d2d94 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/4271fbb36e03cee79b21a4a5a65f37ceef58a8cd create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/44516839d35af9ccaf8a2c62f3ce6a723482445e create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/59d0b24d1acd01c749fb4bd6802a5f4dd003ce75 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/61e798bdd49b339983fea4ccfe18efe44afbd69b create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/8164d3c4af043c47cfd6966873bccd2353d072bf create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/8846918f967dd6513040c6d382fcd68ff7099873 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/885fe25a0b441ef46ab176b88771c133e530cb73 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/bc9545cebdcb3af82406a5f0c1b286d28f9d4f5a create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/cc97ece92b72cc2a4d045e16c0e2f2021bc014f8 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/d96da249094db51ea92b1413907abfd27a4f2426 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/df5d3cf5f05eab65ef9d385e263780ae73c42b19 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/e9bbe2fe47b7b9c2683e7f17f4a33625c6ffbd8c create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-3991c873ba814d0cd03a67d25fff0c8fe8713aca create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-58f116dfba8d428a01ca596174fca63f4ac523f0 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-59f6edc7cf4aeed49b4dc024052db4846d5d7fc8 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-63ebf780ee6c2003eba622686a4bf94c503ad96e create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-7233d53f94386b0339b2c2b01ef2d348f5862f1f create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-9de2e92150e54982d4e502b18f374f8cd8fd453b create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-bda43d420a3e5d5228a5f5130207a1f11fc1c81f create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-d3c3cba3897fafec97665411ea1f94a89bb4de7b diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/0f98d7d56e9a99b97e5dc7eb122ef22e9684077b b/test/core/end2end/fuzzers/client_fuzzer_corpus/0f98d7d56e9a99b97e5dc7eb122ef22e9684077b new file mode 100644 index 0000000000000000000000000000000000000000..3a55723b94a6ff9d70b631cd6619f308fe32471d GIT binary patch literal 362 zcmZ{gO$x$5425T;3lR@tHcACApm)d}M2Zv)O09dZ@D{~xyL9Qn1drg$XcYtl3Hf=G zFU%x_7--SV#3X712uz?M^S+ONCptquzXBb4ad7eZk9JO3hil$1RvmDy*f1c9SxiA3 zoVaN_b4cT7C{!%Zcp8hIr!E2~^anLLln*GS^~W)F&UjlLHjBEnVt=ad!@63RyP`T$ t>cYf%VZWT)hXY*HzeC$8d2i?lYiH4u305Sr2rPrg_H~>t*>I<^^8|MfcozTw literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/118ffddb43ccf9dae8bdb4702232d1dc39b021f7 b/test/core/end2end/fuzzers/client_fuzzer_corpus/118ffddb43ccf9dae8bdb4702232d1dc39b021f7 new file mode 100644 index 0000000000000000000000000000000000000000..508f927e9c48c57129c738d9faafffc63bea18b8 GIT binary patch literal 384 zcmb7V4u3`IR*3lwpPb+s9!Tp(L;gMSBvq9}z0Ld!k!3j&ms+>RsgXR_O*N-TLa zw*UCQY0Z);Qbc%o!jW`_6V{Y|8ULQ3V_x3KD<`py;=gDCJZY`R+?YHf)x(Q%^{v}= zA2C39n*2~i)I@nFkO@7IR58JgK8uh2Zu2^P#{2d#L>qnL5k_Bqx)3O9ID7q5g~6;q$2>ilFvAIZmAgTC(A3#9?x`M(fa)O#4peat2C?%iB&tS1HAgtY$ zz2g~=(Tf1>qC<)^#4UUl8$up6Jpn}?^}`8e!fhTHvjsbUkUbfsBg zzy6GB>%wWpV!(la@EOdk0gez?oy5&gM8zF+V}>`Ngp@L6VzT-YN>TS;BXg?hD3m3H z=dnZ1t!r+XmfP8K^hC@H&r{c-L7qVJtJaz=L0_Ul6Rt8s XA?8NX{&N}JP0u*7yyZPWj@kVK11eHM literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/143e0d4f546bbb984a7c3ac1c60a37dcf85ea58d b/test/core/end2end/fuzzers/client_fuzzer_corpus/143e0d4f546bbb984a7c3ac1c60a37dcf85ea58d new file mode 100644 index 0000000000000000000000000000000000000000..81504702c1862a4a920b261e68d3cecf95e8b0fa GIT binary patch literal 305 zcmZWkxeWqA3>?EDo-TX@$DKq2(1QygAOH~%m;_M=n&4t|Ax+R3TD*KhVzq189(!gM zwFpr3OXMRM0@IxIHDVD^Zn~@Mq%60)!|`;SZ}x{utRJUE@kEkLG=+R>i(90rkZ^Ovjp*1HZ@!_`z)S5W8|mE ls+Z_!Py=)y&m@s+ZH*~R$Knr2-cw5dBa51Gb;@5S#@gAQfL&r!Yq11Mr7^07WD~mO`;^F!D3d6s{2^pUBUm%N|LAl+)d5 zcV~8HP>TS?xI{jJDe#_)vBqBnl!xx>`c{_5rafQI>%*yC^nJhHU%Jnx?M}yi*O0n( z;jm<7z@0-3=*kJqYy^BkTy+pP|3wr#=*A3JpbD;%_39CJ>N8N({m=YaYEBWt61rK| ytYV#3+%l&uo+*R!(%=@YhAu$&`BD=3p@T8SYHYoLuy|N8l zFcT*jJL9%dUv$GBn|*U%Z1bl~LF9 zYG*zUPPf}}zdt-YUp$U?w}+=K!Ulsin)qhN=nJ8dBvs0x=ERN>WqF< fCr(tHn5#I^&rf}#rq;@d6BTl;6|Hj_Co%#6ppXy^ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/42c395ab373346fb283ace021bdc1f6428f92f80 b/test/core/end2end/fuzzers/client_fuzzer_corpus/42c395ab373346fb283ace021bdc1f6428f92f80 new file mode 100644 index 0000000000000000000000000000000000000000..35e249837cba84f17279b7215e721723f085be1e GIT binary patch literal 303 zcmZWkISv9b3>?EEj$e2wmR*Stz#seo3JMSfg=rA)KvQguDES0GgWzxpi71IY8GB}e zS_CM%CGryVfpIRn8g~&?esovYQCY4xyZvE5U2S)FO=2ynbfsCvy14|JyRe2&r)-c5SGyWx~7J6=AgwhXtewQ koC0d-0(2ivB#}#PjVS`h)DKDCQcC|VvzoEvhnCM74}@Dy5dZ)H literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/4f5b9d5c707a35084918c272efd1295d301ca0b5 b/test/core/end2end/fuzzers/client_fuzzer_corpus/4f5b9d5c707a35084918c272efd1295d301ca0b5 new file mode 100644 index 0000000000000000000000000000000000000000..bf8cfc2e5685e716b8e321043309186551f5d350 GIT binary patch literal 392 zcmbtQyA8rX4D~^Zq<|fq2111db9j-+Vg(uoc*P9>1roC{12Xm{;nz}}_0IP5^D_~p ziaf*%&`h9Y{6pzs)bs(aq{_-k@)``Cx9x7bXNauOZEnCB8By@mLT1ijtqF-$Qwc0y zFXh5;OjM=5P*?=Q+EqUP7}*f~)*F>r@9DxzGyBn$e>8pgxcnQ1Gq(m`ES?@}N@kyS eh$chB6^7P02ard`tDiE(AU}XbcTh_oV5cW{>2h`e literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/50ece7ea16659b4e1a2284cea963fab662c19e6b b/test/core/end2end/fuzzers/client_fuzzer_corpus/50ece7ea16659b4e1a2284cea963fab662c19e6b new file mode 100644 index 0000000000000000000000000000000000000000..a70c07efe0935e2e78a28ad23c8753497d4a8a0f GIT binary patch literal 362 zcmZ{eJqiLr423hYg@}hRmCS+{&^zP~A}SU^k+t^P$F)<8mjUh-uj zl7yDrU0sv4fWj3fRrF*0JFz8l-2)v4v4r^kM_W_Yq0hr%vkA|tPX$TcQwbX2!Y$XC zL)&=6VCuQzYb*wyg$SI`U({q67bv9-&oK?o{CK_WR?W%x=Ud~4G0q1&%E6<2ZO`C+ ap)+iQMK7kZ41L}#B5(^Y#bzUMf#eQ800jkzg2HJc&VgRBHA=}Pax)m7!$-lIvFx$m zXE2!o{bE3c;S#v1V&TfYM)jEK>DR;X__W)<>~9~Qcb{Xkm`P_kBSuc^cXit|&MS@q z9QZrFKty!F5ti<=W#l)|aR=W-;1w7}19O3Cf+~Qw&s>)v_Bcu z%2|UqwJu(OnO7@opr8OzMBp?CzJaDljVSp9KSPTb5JF{Kr(G@)wAYH}lGZh`HXr2<#B z4kWq@RqX(G1QTh4sl6G&5;9Z887N&VOl#autPch;`l!DVGo{R5 pDP8h2;NqkBUVvtUafswfT4nUW{_2M$A2G&%$*iJZ|DmS3;t7$hOPBxv literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/64c0e0b4d9c2d25fdcb1e2bdcb999487fc096dad b/test/core/end2end/fuzzers/client_fuzzer_corpus/64c0e0b4d9c2d25fdcb1e2bdcb999487fc096dad new file mode 100644 index 0000000000000000000000000000000000000000..741e68831d5abff1be393f92b28d00e34d1eb99b GIT binary patch literal 384 zcmZ`#L2AQ54Ah!XLg}H<4^+7X8v;4Ef6xbVDrqP_$PUT&o-fS7B-h-Uekw00^a&jq z8%m)9E!x#+X0(qYNf^o9)iqfMC|qGOiT7y#?bsY;bpg&8!4lxZKiG<}GcM&wY*vs~ zeJc1=_mtw$5bkw*cGl1?Y#2@dHHDPbHSlrfrP89H}wyX|_BYu~i* z`Ky3)y^ezcL`9Ne-9blWdK14vIsQwM4^rGOufL>m>__Z0M1q55JdL}V@z-n@CCeXj0A2{CU@8iq%w{ZRIFs|?><+ULd31RIG4%^3^_t( zg#;mxg%w}g_h&{s7fHfO?yj!MT0r3nlTmz+@!yFpQIr?pi~*K_-~M4sVrN{6LD=ku zvg#ATr@E&U4-Mnaw^QdC+C~h6sTU(gAAk-Tl`uYrJ=Y6D9JpPFJ-aK#<7~0m cGV4u3>=3mPC?=iCdJ($@d5aQA3%pFQbbmw+@;SKrZ|a~l27mq-jNpsybFgE zP?EEj$e2wmPO(N>>vC93JMSfg=rA)KvQguDES0GL%~@NArU2!Cu7e{ zP>TRXzeHYwAu!EFU*j%<%8%~qIw{NT?r=OE7n}V-tR`*;q$67mZl#pNRLf#eT4LPcPfsq2ImryU(_Wjil0*W-Ytr zdvt3TjtjO1ocIIZz|1P(3~|*_-26&ZY@jPM9Dp{YlqnO7)n`zOx_|q)l$wS@Swi@C zZCP^7G+bW{$H<=s$7oge3ef#-A%%R@(OAN9uoC1IBtJ?iITHLCDpX-ABNSq76!m}Z Ps$-n^yX8GW&N=-BNAppY literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/8bacacba71bfa5c74fd74cb6577a49a7aec9cf1f b/test/core/end2end/fuzzers/client_fuzzer_corpus/8bacacba71bfa5c74fd74cb6577a49a7aec9cf1f new file mode 100644 index 0000000000000000000000000000000000000000..852d4d6e7a9781f6a3b17ad07dad4a5222142c25 GIT binary patch literal 571 zcmZvZO-{o=423-;sHI#2mqk03dVzMq4J;PGf&~&(2(fU5NP7v? z=Cr5^l%PdW)`dlxD>7i42)aNw|i$&smKXF z28g34%BIeSL+YeBJU(jw!?sYoCGsM{Rcm(jHluPXIx&+wkpZjH0n2b6^{yafpY3!_ zNCT{sXEjbtQ{S!A2vcMhWy69Jk#!0gSPpl)4KD^)w>PtKwK!iaD{V&mZU43PZ$Fjf zkp+~_MBu(N42cjB$>vOJL*n3UydeSJQ%bFHQ!$ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/90a9c3390752b94ca19a58cb2fe6267bc818f718 b/test/core/end2end/fuzzers/client_fuzzer_corpus/90a9c3390752b94ca19a58cb2fe6267bc818f718 new file mode 100644 index 0000000000000000000000000000000000000000..19d7c4a587b60a81da659c5250a4d548e82b4d64 GIT binary patch literal 389 zcmcIgu?@mN47^7vLctJD6N1Dl-XV%2ipYR~0a)RR3_!_{2<(rdh=z{B*1iAE_8CAb z;3*=&dIq`T52V){>mfi1GcidzZYeaOYRzW%Bp)0(mvrS^u@X#TmU0sH|3%>#DAJH6 zqDmEO3h#XPDv*c$eU@-jRc+Vx=iC0$9uNIBmJDBRY_U_jMf!pfb}I2@3Ycw8x0r}= N6mtB@uS1z>l&ynu6u9KfB3ii@DgxOeMHA~eo+cJ|T>cq3shAni}m zEsi)^P)$`=D*1W8_J|5$6jf#AB8?fFvI$N6zaRfRk;>|6Yqqo@m^}D?L+lh`OKa;P zvB(H%S+~gwtCsk%7mm7-9c$ypWrzuDJ%KcAhI-;bh7-&cVrmmyKq$r_4ok1IdwF|v zb~L}z^Xt3$JJBlJimvD}yDxOn*G~{dpO}THvDakrmDIYBkX1tDKubor@X>YMqT;}T zRAtNgJzzWD_Z21`*JA9Kd8z84P$?^G0m!xqi2%{bo!LfqN)C(_)PrS_QFy zmK1mF)Zt-bxTylLv%ayQ_=fkv+!Pf}7nx3oj~xSh+`m?)vwv9WZm!vh7lsb=l|Tbd U3F^qdAW}1ghzcacbUIQt;;cKl@cH5S zvK0W!ZtC@SYtGk8zaPeKybUx@5*3tttL^SC%{+!F`9`e+ll}+303NU)lZD5pxCDt4 Zcqo15DNizpQA5TEE5U-P@S`Ye!W*57EoT4# literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/9f0ab521c728be21e93112b2730c52bc1d6c0021 b/test/core/end2end/fuzzers/client_fuzzer_corpus/9f0ab521c728be21e93112b2730c52bc1d6c0021 new file mode 100644 index 0000000000000000000000000000000000000000..bd1364c14599ff94f75840ae3ea4e64d68fb3baf GIT binary patch literal 1153 zcmbtUK~5V{4E1kP1;Qn8SR{WWEniU#Z<7Wvg8o-7(GWX z0K>CqhRn3UhA(1%zWwcIzxP8qC8FVALcS7>i1vIlVAvsCeyGaIhjdgyKspbz-B=Nn2%naiZ2W^BqPGPPXXnXRpSJ`zeiQbh^!LT!yCn~;}oc^TF% zvc#$>4EvR~j-oD?xxh(V+=Mj`l@pNkk{dku`~|>lf(wG3$PMb6LpIxu)?hRS&;bY7 zv6|6zJpVWAJ^Fepc30=gN+IJ2dZhwpx)Oe~aPOIt)!FzH6Y?VKp%gD4(O#Bp|CJs$3N|H-8OI zBsA_af2`7^{uV6N(sBr%#5Lpuj6D<1HmiLPw6hh@jA-Zk<;Cg#VtKq=E%*f?{i&&v zO?mo-oD33BOm%yfD)8-km2X^%RgfUic0$Y^s;a63yCDbJ@E5@@74?K638LOxEzsA$ llEAxdMe!_%X0$#9ErRgzxBoOjKU*O;aGUmvlm7E$umu?*-&@yR}1|S8|vJ#9P zv`HKw&lkoe!4>Z6Dpqe)y3%aoeBa59m3?HF;HnRxsJpbL7WbzjFi>P^5;dc#&m~@d qy zu#oo$*EzxDuC8MBMx`swdJf}@e6n(*>=IJ-4it5l*3{yCp9l;TncIk((bR_$n;*%h r6aHsZ1ZShT{d@6_GEU@ST$APZ4u=H5mSGLP3iAiZ`cvP>U{jF`r1fVt literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/b09f98e13e5b67a4dd7f74eff00bb247b9967844 b/test/core/end2end/fuzzers/client_fuzzer_corpus/b09f98e13e5b67a4dd7f74eff00bb247b9967844 new file mode 100644 index 0000000000000000000000000000000000000000..5f2c006c094fa26559b6f9aacac753cb1cf2f3ee GIT binary patch literal 300 zcmZWkOAbLn5Ulo|_}rqO#q%UCz#aMk781n5qHTn0NG;x4EM3CQWb_~+F`1ckchywY zpb-JeqC#GR9x%#9p>dZ1<)OQ}4y$Uj-5-vJ>3X*>PP-MAt~9IJOm3vkUD%FU8*pVC zgA8|JW*y)Tan)Ab{Ea9U(3u&|Kpk9VmI*ucJ}Bz`F@KesQ-rXD?$o_)_z>r8Tv9KPCbLMdmi5W;FGw#O8al oc?kc$6z1QS50rT#5W`NEF9W_J0DFj@ybJRS$of-1#$Z#CFB`OHn*aa+ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/e0d1ee5e2e169dcae87f790f5c27e84a3453cedb b/test/core/end2end/fuzzers/client_fuzzer_corpus/e0d1ee5e2e169dcae87f790f5c27e84a3453cedb new file mode 100644 index 0000000000000000000000000000000000000000..0be99ff0b04fc3af38acc02d56131ec2349c65f7 GIT binary patch literal 362 zcmb7L_{otB6^T1L|aR5=MkJN`x`3_WZ6w7d9yRK zVu}(G9$s)Go#BLaShI6eS>0vOd Nl`2+YrB|jx;~#`ycFX_( literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/e309e21c69e4b96ab37f675f4e87a52453512ef8 b/test/core/end2end/fuzzers/client_fuzzer_corpus/e309e21c69e4b96ab37f675f4e87a52453512ef8 new file mode 100644 index 0000000000000000000000000000000000000000..3e856ee002965607f976653381a9f4d494e6bec2 GIT binary patch literal 350 zcma)1F-`+P3>=d~Kz=bxak)r*ApF4(poj!0LKIGuQ1S*e#nmV!pWtWF;!OggpkNDY z?eUCfFqi?|q@X>+1#sOy6K3raYQqQyr=>iu)|;2j&BOD$Vch`(-gApo5)^SYvnnk) zx~lgQuoxtFHy8o#`=_J#M)-G-Un!-1t@Y2Wr?@Th4qwO%SZe?P literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/e3422e8f5d63a9ef180aab552353955c7aba90b0 b/test/core/end2end/fuzzers/client_fuzzer_corpus/e3422e8f5d63a9ef180aab552353955c7aba90b0 new file mode 100644 index 0000000000000000000000000000000000000000..56efea52ce02e5e2b2e184aa0aae493200808b01 GIT binary patch literal 302 zcmZWkISv9b3>?EEj$e2wmR*Stz#seo3JMSfg=rA)KvQguDES0GgWzxpi71IY8GB}e zS_CM%CGryVfpIRn8g~&?esovYQCY4xyZvE5U2S*wB-WBjSDICrS#u2s~J0fX!)G+09_4C@Bjb+ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/e442f9fd63bc5345de1c14803d4ca4bb6f1152cf b/test/core/end2end/fuzzers/client_fuzzer_corpus/e442f9fd63bc5345de1c14803d4ca4bb6f1152cf new file mode 100644 index 0000000000000000000000000000000000000000..4a6060c23e87f10e55bcf5ff57544e01339031ad GIT binary patch literal 384 zcmZ`#F=_)r4AdGEj7ee02O>A-4h*U7Kj;Igg5!iMbZ6pC?=MVo*sZ%bpUMjYc|u0V z9fW`dTC}Ut%xLdLk}#6Ht820rP`JWm9PiQo-?0UX@&cSOfF;0(E7+2-GcLtIY&IgT z`b6-l?kUBgA>8S9?5v?}*f5xSF{U+M20aT9*kS$kyj@^iz!b0z3il>lgcA;3`&F7n@ Z&f7XKpR4_@*;l!0YFn`%$>6v=$}bmd7zURM#i?i2T8G34XyZ%%R}bqrdY5qLVFaDT*K#cA2J=OlB$~ zsS#dr-T|wU?hje@0XFXHnrzrY;R>@3d3Oaa7yuP%meG)7T&1%9fjX9KLAH7;Na~)- zrN&WH2XP$$Q_l_cDI9VmX@?Ac;kj|23}b^4*_pc`7UcUHhp6(H{US|AsV_>(#;Sjc zYUJ@US@W31@xRbybV3pOXevCbA6uD)CqkR$-vqOU6N>@ES3a{TPsaiKKw}H=1hpul A)c^nh literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/e7c26599fb2e2b031346ff1ba09294fd758f7abe b/test/core/end2end/fuzzers/client_fuzzer_corpus/e7c26599fb2e2b031346ff1ba09294fd758f7abe new file mode 100644 index 0000000000000000000000000000000000000000..fc1dec3fb73eb81d986360c58d01e065b0e49fbb GIT binary patch literal 362 zcmZ{eJqiLr423hYg@}hRmF$8S&^zP~A}SU^k+t^6rwe@ii8OXCVS7^cOWXj0=>~%5zMEGu@w0n?-x@?eWq+cijNzgB|4Hp1-z7 c@V?Lq*1@7@Q>;j0AuJ_g7PGNrBb>(dH^yjqwEzGB literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/f4499e3d4bf60ae3ae929c485a13ea4dc2713369 b/test/core/end2end/fuzzers/client_fuzzer_corpus/f4499e3d4bf60ae3ae929c485a13ea4dc2713369 new file mode 100644 index 0000000000000000000000000000000000000000..0a9bf7ca1eb4485c61e8395e5e4e996bcc7f595f GIT binary patch literal 362 zcmZ{eJqiLr423hYg@}hRmF$8S&^zP~A}SU^k+t^6rwe@ii8OXCVS7^cOWXj0=>~%5zMEGu@w0n?-x@?eWq+cSD>Hc94U6{@NbF b`$8vJ2aBFfu_B3uu#|{d%*K+9a2nU&iD-B= literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/f8467d9574de94b9bb904f75a6a7e2405c36f105 b/test/core/end2end/fuzzers/client_fuzzer_corpus/f8467d9574de94b9bb904f75a6a7e2405c36f105 new file mode 100644 index 0000000000000000000000000000000000000000..a8a829233650bf489eb21fc6e163078ee625b2de GIT binary patch literal 1157 zcmbVM!A=`N4D~dr62ed5a7bn)et;afbFg}7IrLB|psM2F2od-W@L>@>RXOqz^fUS$ z{eZ&ud1ja0MIa$YiL*QQ*w21%LNNrQ;b2O>0*#1v{b9hcL%4iXm6a#c>B;xi`f|N@ ze7bt%is*XiZUh_>eZcQ7Lh%-qxeO|5#-?l{GmFKY*~ZGJEup|8Rn#D_)D#KQhP-sj z%dn2g0;`5(*pD=I6m_|b1$LU^CaiI&9Dt;k+~C3YF91dpvwtvxb&JC0n9X(^n4{A) zf(|<1PM)_R_cl|WJjzaL7=0Ckd26$N2QR?hIx6(sCv88tl;3;k0 zBKnyLOo=hvD4fnipAKFq3eFKngHK;R*8}@V2*#Lyqv;-xOkaujMd*rXhOC%fEZTwk znM92wKq&2y?inU6oCKc4STa4@-bYx?SECc;Z!o-Chat~`YZp}jlzFo2MjZ3i#vI5#ph}lC`RXMO5vL6kf6zoz_PnaY@ s)Vr<)`g$%2T-`<#PlBjN>r=EK=IZsyCbkEZ{|w;VSR}usc(e`u2MEbfRR910 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/05efe6d81ce606557691432634e81f61e68b0b81 b/test/core/end2end/fuzzers/server_fuzzer_corpus/05efe6d81ce606557691432634e81f61e68b0b81 new file mode 100644 index 0000000000000000000000000000000000000000..fd002715cb3b4deb9fbf9abf9d15dc27ef811c06 GIT binary patch literal 289 zcmXYs&q~BF5XRfJ;#zhgf@di``DfF17rg8ftOv2!zCfC0n?Ra`WGdG8_G(SUVP^Q| zcbJc_et*dxvs2sF<)Nsy={9X%!;YdT@e}Gh4k|{MM?-+G%d^%cvFPgPC}$%}IDqlj z$bjoUso$EPWm#I3aP8n)YD#2KXhXFErU1ii*c~xO3Q9m|RSwqBC*Z=6@GP13^Fr7H}Gh~@`e$4xA`wv}8Y%IEP-j2&QfJ&%rt@AjaEuUOH$yo zSxIxYW=;;EO}35?V+|UtdHs|@u2Ls{StQt-k;-HRht0WAl!#oFfG??%z$65)(F_x< z1*ZhKl2KM@im&Pz5K5VbfJv%SF0<>Dtpou!=BcSPc;oDyYupFsLP5A-MTxztWJN$S z^Ptu8bU%Ic*`&BmTRXX)jsF#nLcg%BmO!8? zk8kL2$y*vawPuZahkh9Ot-0^B-5x&!) literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/0c413d2b361b2221585026d42f3046ff4135d2ff b/test/core/end2end/fuzzers/server_fuzzer_corpus/0c413d2b361b2221585026d42f3046ff4135d2ff new file mode 100644 index 0000000000000000000000000000000000000000..34bee243dc5d5358677f74cb7e78bd68a2f501cc GIT binary patch literal 248 zcmZ{fF$=;l5QST*Xhk7{vxuWwD~^J@4r0;%fipc#ASR(Xh5El;tueksc*jT(+2*<<2~$Mb z@%*XlI%knEj$&mvDDPOG8%?Mwp~~VItW}Z&Nu$$SY5AOlbV<`sP_kenpC!PD(%TB{E5KKxCC2A!jaYj*2JnE#a#HC+Q4v2{42V7?xTXJkG-XOw%b0ye_)jnqD zFr%s7U$V#S*fdqSFShG+oz|~mM^Tjc3H2QZ6qCz?Whj>A*_e_I5vdhuNPRFQ1E@ i4_R!pdnNVw`9M}(?4zOV!HjsZ+xE4mg7ZJM*w??hT3IXr literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/38df7e63181cbd045e5af9dbee463360c8254618 b/test/core/end2end/fuzzers/server_fuzzer_corpus/38df7e63181cbd045e5af9dbee463360c8254618 new file mode 100644 index 0000000000000000000000000000000000000000..c46dc8398e216c3b7c4e55ee9ec5decc128c5c33 GIT binary patch literal 289 zcmXX>%TB{E5KP)2O4Le5;*6r4c+^Q+iA%o#4v2{42V7?xTXJkG-XO|%WA_g5VRAQrX~RudM?JNJ|a5_^pY<~52dE|4=D1+63CLU)}iTt_gYsfUG_0M zhZ&~&c+H-&L(^2{uGp;7Ra(D=9Ys;%C)9TwP)x4&mZ4abCu2%Bkn6qU0(wXUqV-=7 zC`_AF@Ac0#O$|wead@K)XDT4Fl{h9SuGrJnP7%B{L)1OJ{PjP~- zhAD~ZoZ2yf(x*9vScZ1+KAs?Fh%{63k5mv#G*UM#g%_PmHkZLN6p3G}d7v@Z~+u`@8v44v#keeb<)Z7$w6BwxOK zr(cT8X}Mk=%d*J#+ueLRpI*OMqbN%H;rfl)#bS8yKx&-doy(ySqeGAiADAd2-(L?T z<*KAOU;nzUD@CGQpowu33_CHC&JtS6sP*^>-Wx4}w6l5Lc)1~^L)P~X7+r}E&N7gT n)k>lb-yyqc3r)+bO)I<`DE=pZv&YQOGT|2p)B35s7!bxU**HNs literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/59d0b24d1acd01c749fb4bd6802a5f4dd003ce75 b/test/core/end2end/fuzzers/server_fuzzer_corpus/59d0b24d1acd01c749fb4bd6802a5f4dd003ce75 new file mode 100644 index 0000000000000000000000000000000000000000..bdf76d50d2ba058e2048b1127b88a9807d7ba2b2 GIT binary patch literal 322 zcmZ{gKTpFj5XBu5L>sk|k(g2BsTA^uN-UiiVL(JQU%++T#FA@U_5}f-8^lJi!_4XK z>AmIdr>kEcvvu~+Go%#McR%AeHaO|EgSpgeDucrdrqw4`ki)y-m(&<37zNg8B}{3rp%*Uq{Ys^1 z@kM71%PBi2gmL8tm+yu8wlRqb*;Lh`l@$0*{V)6~n$Z6w@OK}=;1l38uvAEH9Zmd;#zhgg4a@d< zGT^#T>bK@+S(X+hTsydwni3fl+EA^4DZnrrc0-Jjf)Wr~m4h|(0l0A3_Xm-pN7sR2 zLa*|iGUXqFp#( z#n$t)G(QzEl`ea}3gj{mI(-fO|a!@Lv9l6{Y)<6qh zgQ#uR0ye7h^0(r99LJJ)jWT#86r*B7WWkg~kQm`n!yVOHa7K|Unbe(TkJxY%**8$Z zD{?b&5oOn5$SP@i6YaUYFwhOq{U>(d)HWU06&wUbSl6FilNrJsJIV!ghWNdm5YgJI z2=}y#nBW!$zkjjhDbDN(;xxDyT=pL;vZ!6VIPw-$k7rrh7M7ZHov4|uZVJb_Jss#z N(GRk%0j5^6GCw!VXHx(G literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/8846918f967dd6513040c6d382fcd68ff7099873 b/test/core/end2end/fuzzers/server_fuzzer_corpus/8846918f967dd6513040c6d382fcd68ff7099873 new file mode 100644 index 0000000000000000000000000000000000000000..b0cb61d39f4501890549eac3801dd6b17227e921 GIT binary patch literal 342 zcmZ`#O;5ux4DF!6m^LX$oKdwCAIrKSaoI0`1EOO6177O2kYqSKK%IB}jxVI{abGDQT-0CEvJ=8FIgqOO?igGDAKYAwH EUq>covj6}9 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/885fe25a0b441ef46ab176b88771c133e530cb73 b/test/core/end2end/fuzzers/server_fuzzer_corpus/885fe25a0b441ef46ab176b88771c133e530cb73 new file mode 100644 index 0000000000000000000000000000000000000000..97896d17e939a8bf6f235b59e96e76d4f66f6507 GIT binary patch literal 248 zcmZ{f!HU8_42D~&tQLh?@GRm*P-|t6KEZkri}nTLG<62XnW2+iaNm2c*5=~Pko@`c zpS~2Q{cJh=F3TeS+HA+^I6WU&qbN$c;rfr+#iGCSKx&ZJ&gIaEk6n-oZ4t23{BdMb)f|hcG+cwoc2-Yqc8^j1>0dPEcpYjqb3H&HnCFH{qJ3uIir_d zCM5CnB+!$J_m}8CdakM>-6Yv6T!rQ9ls(T2Tuk=mPsk@{Tf?wjqioc@ zsL9pDQN}Ohn1ix|r8}YK#lK-@Wu5{F->qO05cT;-a_31%>nqibb JT5vbl_6O~JW##|? literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/cc97ece92b72cc2a4d045e16c0e2f2021bc014f8 b/test/core/end2end/fuzzers/server_fuzzer_corpus/cc97ece92b72cc2a4d045e16c0e2f2021bc014f8 new file mode 100644 index 0000000000000000000000000000000000000000..76e26ec96be5ffd31a183caa6986bbb336dc940c GIT binary patch literal 258 zcmZ{fL2JT55QUQxsRo5DcrGEQqQ;2Fl-~6qhMGSxZYJ)+nq9KfLi)dZHSS)#Im|rX z8+eDW{N5*vWLH&XzFlu-@hmAxnwlqHvjqqVlEs8OO0Ek6DYGKEQL-Q2Z^^O^eKwRG=mF=OqN}_#S^rD3ZS@QO5m_Su literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/df5d3cf5f05eab65ef9d385e263780ae73c42b19 b/test/core/end2end/fuzzers/server_fuzzer_corpus/df5d3cf5f05eab65ef9d385e263780ae73c42b19 new file mode 100644 index 0000000000000000000000000000000000000000..33120909e58f9d19ad3369526f947f3b84b44be7 GIT binary patch literal 289 zcmXYsO-{ow5QURAh!VAukyxWBD=6fr6>NF}SRf*j3%JfSw&d8BJwcRngSsO)h|$dG zo41&!SG_$a>*T3vs$!d$t9TXHFVhZ!Ao4TScQ{c<&US_(Ula$e3u?*v&M^)>L>$rh zs|Vz|jjGrBXB@|dL|i+(ka|t!L}bad`T~U+9t~VmW29gdS*MjSg}p;AT;}_oO3{+5 z&Kj0ccA2IOlp9>O7wTl^X}T>Rj&NutMY!)ig&{M91zIX3SV!W)fz4>=ebPN`GbV+{ p!i=!U2rG zMh0B>N&VXVEX&fOglh+vQd1&>LK~_TFa;Q9!)}N%Qcwayt8%c0J^&XE`+g@<^yoS; zOz2gfQ>NVHa3|Eaojbe}YG$Wi5@5UGQy8=YwgyXtWY(c{a?D~fc%Qr@J*HB4nf-mE m1-3oCLx`I>$iI_?H}xQ?Z7 z;W{8m+a>j9)3UUJF%#uxFQcqqaRp04(M~}gWzEYT`sf=G@I=NFN>EDtthic lt<3oS6utev_v|wf$Bv4BL8O%`~eAiN{;{l literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-58f116dfba8d428a01ca596174fca63f4ac523f0 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-58f116dfba8d428a01ca596174fca63f4ac523f0 new file mode 100644 index 0000000000000000000000000000000000000000..b0c854c6b247738d506dce619923838f0dbae82a GIT binary patch literal 2048 zcmeHDO;5ux3{9bkQ86h8xL2GQT0h{}3s*QyRJ4DE0sAh7gYcC@#5t**$*;{sE0oO1J<3 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-59f6edc7cf4aeed49b4dc024052db4846d5d7fc8 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-59f6edc7cf4aeed49b4dc024052db4846d5d7fc8 new file mode 100644 index 0000000000000000000000000000000000000000..e01687ecfbcb302929d99db15ee2b48bfc41f586 GIT binary patch literal 2047 zcmeHDyH3O~5KJJ5BjO|%(1)u4T^>-Tp@jkwUGf8a&R%TEXIsuj;`nw7oD}@Pbx~H@ z(X6yH(oD7cNS>4Trm6DRtXRkExc(e52!hD3pUWT|S;($R3nW(g!I*pxj$M~M7kI=- z5Ltg6k%VcZ>Z@*8T*BZlC+T#f3e>}x<^canp|Ma!b%53MDhdf#Z6AS-kmOvMEQ0GE)gR`B_^s^ z^0O^H*?zBl-y{#oOI`ldy5vt;zKoY~^*Uk@1d&f4=Rr7jA-gCnP`BVaWB3*vyDWOq z;U1%o$ogrI)R`tK->RC$1q^<2k`7nO2vD8riCqh$2{om3u*kq#B?XW)n*VaXbyl#O z5mOKXEv2Z1X{2sf4ek^Wu4Utw`4j8*Q(AULxF82oq3c;Z^ypG(J>hl>O)8Z1Z8EJB vJkK7z+AL4*l+?q=eenD>X$>cwVRqmjIS{dI}L@CXSB&^OXE;N{}w3ibt&3=9lxN=m5}1*yp;>?}YY<9`6N1PCtx literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-9de2e92150e54982d4e502b18f374f8cd8fd453b b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-9de2e92150e54982d4e502b18f374f8cd8fd453b new file mode 100644 index 0000000000000000000000000000000000000000..e7aa0076e6b8c0178d087220c74f7a20f2368a45 GIT binary patch literal 2047 zcmeHD!AiqG5KS~<8!YTW@4=ImCL2BG;#Ch~F!_P$W|}N)cbClstl#P9cyNYINx8T@y(TfiE z7mdXfFo#~0)2%`x#rF5{!z*;2*kTjaN&I)!rVhTc_ zr4+R=jnwU3gF6L;8`*fL|F>zsrDYd{3vwV8x}L>Dk1mDQ3+}hjq(Vu5Ceu5?^X$n- t%ktzwNj-e6gO}eaSUBMfa|37CKy`+h=19jjP#kMGUH@~sb$0$+1Ao4jOJe{4 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-bda43d420a3e5d5228a5f5130207a1f11fc1c81f b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-bda43d420a3e5d5228a5f5130207a1f11fc1c81f new file mode 100644 index 0000000000000000000000000000000000000000..37b928790282eefa700fe28b804182c6a675afc3 GIT binary patch literal 2045 zcmeHD!Ait15N);MT3pCM@5PhKwy7R_@v4W#V*3NL>1-3oCLx`I>$iI_?H}xQ?Z7-{ z;JpX$)n6akbN1f0HGeJ2b-GTQ?SxSjC1Jx{M)7pT?5c7=a>e)7@*Q|~T@6Cw0TW5& z!goNDwoB^Ire$dbWB9zH%#uxFQcqqaRp04(M~}1L0u@T`sf=XExgjUKTGQT2W?? lTAA_tDSG>zgT*s0urzRn4K!z%X^C`d1J$X5h5w%#_yfM8N{;{l literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-d3c3cba3897fafec97665411ea1f94a89bb4de7b b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-d3c3cba3897fafec97665411ea1f94a89bb4de7b new file mode 100644 index 0000000000000000000000000000000000000000..30ff86fec33b34b28b9095cf91e853048b39cb32 GIT binary patch literal 2046 zcmeH@!AiqG5QYt>F_^r-bTdsBw!6z_0@i2u;3lt7iWD+1 zKQl1%GxL>SAIWp_Ue_gm&GKcujH~UaK@dbfeOw3OScUASut42{?~UO*aO}3|MTZBB zIwI@415#(2sQj#I78fx1&Ph7nDI-92rYCkUj3(5S($OLVYn2p0(rDf~E7-%RDF}g< zQq;mUQn!x{?iCPjWaBrz-=_VMmR%7p$bnSodKM2ox)fSJ@U(*_6-xRtnd}75vlstb smM1GE_3*t8-hQXY!bxX2fxwLL1bAm%t Date: Wed, 20 Apr 2016 09:21:50 -0700 Subject: [PATCH 77/93] kill java processes properly --- tools/run_tests/performance/remote_host_prepare.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/performance/remote_host_prepare.sh b/tools/run_tests/performance/remote_host_prepare.sh index a660d294581..17cfa1a5998 100755 --- a/tools/run_tests/performance/remote_host_prepare.sh +++ b/tools/run_tests/performance/remote_host_prepare.sh @@ -38,10 +38,13 @@ ssh "${USER_AT_HOST}" "rm -rf ~/performance_workspace && mkdir -p ~/performance_ # TODO(jtattermusch): To be sure there are no running processes that would # mess with the results, be rough and reboot the slave here # and wait for it to come back online. -# TODO(jtattermusch): Kill all java QpsWorkers, but killall java # could also kill jenkins. ssh "${USER_AT_HOST}" "killall -9 qps_worker mono node ruby || true" +# Kill all java LoadWorker processes. We can't just killall java +# as one of the processes might be jenkins. +ssh "${USER_AT_HOST}" 'kill -9 $(jps | grep LoadWorker | cut -f1 -d" ") || true' + # push the current sources to the slave and unpack it. scp ../grpc.tar "${USER_AT_HOST}:~/performance_workspace" ssh "${USER_AT_HOST}" "tar -xf ~/performance_workspace/grpc.tar -C ~/performance_workspace" From 9209111c7574b62ba09acff4c2aa2665ef021957 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 20 Apr 2016 09:27:00 -0700 Subject: [PATCH 78/93] increase qpsworker lifetime --- tools/run_tests/run_performance_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index c820a5493bd..9ff075e3a23 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -89,7 +89,7 @@ def create_qpsworker_job(language, shortname=None, jobspec = jobset.JobSpec( cmdline=cmdline, shortname=shortname, - timeout_seconds=15*60) + timeout_seconds=30*60) return QpsWorkerJob(jobspec, language, host_and_port) From 87bac959ee487e8a2a0eefdaeb10b46aebe9b616 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 20 Apr 2016 09:35:35 -0700 Subject: [PATCH 79/93] Eradicate Uniform, Deterministic, and Pareto interarrival distributions since we don't use them and it's not sensible to add them --- src/csharp/Grpc.IntegrationTesting/Control.cs | 3236 ++++++++++------- .../Grpc.IntegrationTesting/Messages.cs | 121 +- src/csharp/Grpc.IntegrationTesting/Test.cs | 8 +- .../Grpc.IntegrationTesting/TestGrpc.cs | 25 +- src/proto/grpc/testing/control.proto | 15 - .../qps/src/proto/grpc/testing/control.rb | 55 +- .../qps/src/proto/grpc/testing/messages.rb | 4 + test/cpp/qps/client.h | 14 - test/cpp/qps/interarrival.h | 56 - test/cpp/qps/qps_driver.cc | 16 - test/cpp/qps/qps_interarrival_test.cc | 6 - 11 files changed, 2105 insertions(+), 1451 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/Control.cs b/src/csharp/Grpc.IntegrationTesting/Control.cs index 291bc753978..003d2428fab 100644 --- a/src/csharp/Grpc.IntegrationTesting/Control.cs +++ b/src/csharp/Grpc.IntegrationTesting/Control.cs @@ -26,58 +26,67 @@ namespace Grpc.Testing { "CiRzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL2NvbnRyb2wucHJvdG8SDGdycGMu", "dGVzdGluZxolc3JjL3Byb3RvL2dycGMvdGVzdGluZy9wYXlsb2Fkcy5wcm90", "bxoic3JjL3Byb3RvL2dycGMvdGVzdGluZy9zdGF0cy5wcm90byIlCg1Qb2lz", - "c29uUGFyYW1zEhQKDG9mZmVyZWRfbG9hZBgBIAEoASJBCg1Vbmlmb3JtUGFy", - "YW1zEhcKD2ludGVyYXJyaXZhbF9sbxgBIAEoARIXCg9pbnRlcmFycml2YWxf", - "aGkYAiABKAEiKwoTRGV0ZXJtaW5pc3RpY1BhcmFtcxIUCgxvZmZlcmVkX2xv", - "YWQYASABKAEiOAoMUGFyZXRvUGFyYW1zEhkKEWludGVyYXJyaXZhbF9iYXNl", - "GAEgASgBEg0KBWFscGhhGAIgASgBIhIKEENsb3NlZExvb3BQYXJhbXMijgIK", - "CkxvYWRQYXJhbXMSNQoLY2xvc2VkX2xvb3AYASABKAsyHi5ncnBjLnRlc3Rp", - "bmcuQ2xvc2VkTG9vcFBhcmFtc0gAEi4KB3BvaXNzb24YAiABKAsyGy5ncnBj", - "LnRlc3RpbmcuUG9pc3NvblBhcmFtc0gAEi4KB3VuaWZvcm0YAyABKAsyGy5n", - "cnBjLnRlc3RpbmcuVW5pZm9ybVBhcmFtc0gAEjMKBmRldGVybRgEIAEoCzIh", - "LmdycGMudGVzdGluZy5EZXRlcm1pbmlzdGljUGFyYW1zSAASLAoGcGFyZXRv", - "GAUgASgLMhouZ3JwYy50ZXN0aW5nLlBhcmV0b1BhcmFtc0gAQgYKBGxvYWQi", - "QwoOU2VjdXJpdHlQYXJhbXMSEwoLdXNlX3Rlc3RfY2EYASABKAgSHAoUc2Vy", - "dmVyX2hvc3Rfb3ZlcnJpZGUYAiABKAki1gMKDENsaWVudENvbmZpZxIWCg5z", - "ZXJ2ZXJfdGFyZ2V0cxgBIAMoCRItCgtjbGllbnRfdHlwZRgCIAEoDjIYLmdy", - "cGMudGVzdGluZy5DbGllbnRUeXBlEjUKD3NlY3VyaXR5X3BhcmFtcxgDIAEo", - "CzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIkChxvdXRzdGFuZGlu", - "Z19ycGNzX3Blcl9jaGFubmVsGAQgASgFEhcKD2NsaWVudF9jaGFubmVscxgF", - "IAEoBRIcChRhc3luY19jbGllbnRfdGhyZWFkcxgHIAEoBRInCghycGNfdHlw", - "ZRgIIAEoDjIVLmdycGMudGVzdGluZy5ScGNUeXBlEi0KC2xvYWRfcGFyYW1z", - "GAogASgLMhguZ3JwYy50ZXN0aW5nLkxvYWRQYXJhbXMSMwoOcGF5bG9hZF9j", - "b25maWcYCyABKAsyGy5ncnBjLnRlc3RpbmcuUGF5bG9hZENvbmZpZxI3ChBo", - "aXN0b2dyYW1fcGFyYW1zGAwgASgLMh0uZ3JwYy50ZXN0aW5nLkhpc3RvZ3Jh", - "bVBhcmFtcxIRCgljb3JlX2xpc3QYDSADKAUSEgoKY29yZV9saW1pdBgOIAEo", - "BSI4CgxDbGllbnRTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5ncnBjLnRlc3Rp", - "bmcuQ2xpZW50U3RhdHMiFQoETWFyaxINCgVyZXNldBgBIAEoCCJoCgpDbGll", - "bnRBcmdzEisKBXNldHVwGAEgASgLMhouZ3JwYy50ZXN0aW5nLkNsaWVudENv", - "bmZpZ0gAEiIKBG1hcmsYAiABKAsyEi5ncnBjLnRlc3RpbmcuTWFya0gAQgkK", - "B2FyZ3R5cGUi/AEKDFNlcnZlckNvbmZpZxItCgtzZXJ2ZXJfdHlwZRgBIAEo", - "DjIYLmdycGMudGVzdGluZy5TZXJ2ZXJUeXBlEjUKD3NlY3VyaXR5X3BhcmFt", - "cxgCIAEoCzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIMCgRwb3J0", - "GAQgASgFEhwKFGFzeW5jX3NlcnZlcl90aHJlYWRzGAcgASgFEhIKCmNvcmVf", - "bGltaXQYCCABKAUSMwoOcGF5bG9hZF9jb25maWcYCSABKAsyGy5ncnBjLnRl", - "c3RpbmcuUGF5bG9hZENvbmZpZxIRCgljb3JlX2xpc3QYCiADKAUiaAoKU2Vy", - "dmVyQXJncxIrCgVzZXR1cBgBIAEoCzIaLmdycGMudGVzdGluZy5TZXJ2ZXJD", - "b25maWdIABIiCgRtYXJrGAIgASgLMhIuZ3JwYy50ZXN0aW5nLk1hcmtIAEIJ", - "Cgdhcmd0eXBlIlUKDFNlcnZlclN0YXR1cxIoCgVzdGF0cxgBIAEoCzIZLmdy", - "cGMudGVzdGluZy5TZXJ2ZXJTdGF0cxIMCgRwb3J0GAIgASgFEg0KBWNvcmVz", - "GAMgASgFIg0KC0NvcmVSZXF1ZXN0Ih0KDENvcmVSZXNwb25zZRINCgVjb3Jl", - "cxgBIAEoBSIGCgRWb2lkKi8KCkNsaWVudFR5cGUSDwoLU1lOQ19DTElFTlQQ", - "ABIQCgxBU1lOQ19DTElFTlQQASpJCgpTZXJ2ZXJUeXBlEg8KC1NZTkNfU0VS", - "VkVSEAASEAoMQVNZTkNfU0VSVkVSEAESGAoUQVNZTkNfR0VORVJJQ19TRVJW", - "RVIQAiojCgdScGNUeXBlEgkKBVVOQVJZEAASDQoJU1RSRUFNSU5HEAFiBnBy", - "b3RvMw==")); + "c29uUGFyYW1zEhQKDG9mZmVyZWRfbG9hZBgBIAEoASISChBDbG9zZWRMb29w", + "UGFyYW1zInsKCkxvYWRQYXJhbXMSNQoLY2xvc2VkX2xvb3AYASABKAsyHi5n", + "cnBjLnRlc3RpbmcuQ2xvc2VkTG9vcFBhcmFtc0gAEi4KB3BvaXNzb24YAiAB", + "KAsyGy5ncnBjLnRlc3RpbmcuUG9pc3NvblBhcmFtc0gAQgYKBGxvYWQiQwoO", + "U2VjdXJpdHlQYXJhbXMSEwoLdXNlX3Rlc3RfY2EYASABKAgSHAoUc2VydmVy", + "X2hvc3Rfb3ZlcnJpZGUYAiABKAki1gMKDENsaWVudENvbmZpZxIWCg5zZXJ2", + "ZXJfdGFyZ2V0cxgBIAMoCRItCgtjbGllbnRfdHlwZRgCIAEoDjIYLmdycGMu", + "dGVzdGluZy5DbGllbnRUeXBlEjUKD3NlY3VyaXR5X3BhcmFtcxgDIAEoCzIc", + "LmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIkChxvdXRzdGFuZGluZ19y", + "cGNzX3Blcl9jaGFubmVsGAQgASgFEhcKD2NsaWVudF9jaGFubmVscxgFIAEo", + "BRIcChRhc3luY19jbGllbnRfdGhyZWFkcxgHIAEoBRInCghycGNfdHlwZRgI", + "IAEoDjIVLmdycGMudGVzdGluZy5ScGNUeXBlEi0KC2xvYWRfcGFyYW1zGAog", + "ASgLMhguZ3JwYy50ZXN0aW5nLkxvYWRQYXJhbXMSMwoOcGF5bG9hZF9jb25m", + "aWcYCyABKAsyGy5ncnBjLnRlc3RpbmcuUGF5bG9hZENvbmZpZxI3ChBoaXN0", + "b2dyYW1fcGFyYW1zGAwgASgLMh0uZ3JwYy50ZXN0aW5nLkhpc3RvZ3JhbVBh", + "cmFtcxIRCgljb3JlX2xpc3QYDSADKAUSEgoKY29yZV9saW1pdBgOIAEoBSI4", + "CgxDbGllbnRTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5ncnBjLnRlc3Rpbmcu", + "Q2xpZW50U3RhdHMiFQoETWFyaxINCgVyZXNldBgBIAEoCCJoCgpDbGllbnRB", + "cmdzEisKBXNldHVwGAEgASgLMhouZ3JwYy50ZXN0aW5nLkNsaWVudENvbmZp", + "Z0gAEiIKBG1hcmsYAiABKAsyEi5ncnBjLnRlc3RpbmcuTWFya0gAQgkKB2Fy", + "Z3R5cGUi/AEKDFNlcnZlckNvbmZpZxItCgtzZXJ2ZXJfdHlwZRgBIAEoDjIY", + "LmdycGMudGVzdGluZy5TZXJ2ZXJUeXBlEjUKD3NlY3VyaXR5X3BhcmFtcxgC", + "IAEoCzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIMCgRwb3J0GAQg", + "ASgFEhwKFGFzeW5jX3NlcnZlcl90aHJlYWRzGAcgASgFEhIKCmNvcmVfbGlt", + "aXQYCCABKAUSMwoOcGF5bG9hZF9jb25maWcYCSABKAsyGy5ncnBjLnRlc3Rp", + "bmcuUGF5bG9hZENvbmZpZxIRCgljb3JlX2xpc3QYCiADKAUiaAoKU2VydmVy", + "QXJncxIrCgVzZXR1cBgBIAEoCzIaLmdycGMudGVzdGluZy5TZXJ2ZXJDb25m", + "aWdIABIiCgRtYXJrGAIgASgLMhIuZ3JwYy50ZXN0aW5nLk1hcmtIAEIJCgdh", + "cmd0eXBlIlUKDFNlcnZlclN0YXR1cxIoCgVzdGF0cxgBIAEoCzIZLmdycGMu", + "dGVzdGluZy5TZXJ2ZXJTdGF0cxIMCgRwb3J0GAIgASgFEg0KBWNvcmVzGAMg", + "ASgFIg0KC0NvcmVSZXF1ZXN0Ih0KDENvcmVSZXNwb25zZRINCgVjb3JlcxgB", + "IAEoBSIGCgRWb2lkIv0BCghTY2VuYXJpbxIMCgRuYW1lGAEgASgJEjEKDWNs", + "aWVudF9jb25maWcYAiABKAsyGi5ncnBjLnRlc3RpbmcuQ2xpZW50Q29uZmln", + "EhMKC251bV9jbGllbnRzGAMgASgFEjEKDXNlcnZlcl9jb25maWcYBCABKAsy", + "Gi5ncnBjLnRlc3RpbmcuU2VydmVyQ29uZmlnEhMKC251bV9zZXJ2ZXJzGAUg", + "ASgFEhYKDndhcm11cF9zZWNvbmRzGAYgASgFEhkKEWJlbmNobWFya19zZWNv", + "bmRzGAcgASgFEiAKGHNwYXduX2xvY2FsX3dvcmtlcl9jb3VudBgIIAEoBSI2", + "CglTY2VuYXJpb3MSKQoJc2NlbmFyaW9zGAEgAygLMhYuZ3JwYy50ZXN0aW5n", + "LlNjZW5hcmlvIpICChVTY2VuYXJpb1Jlc3VsdFN1bW1hcnkSCwoDcXBzGAEg", + "ASgBEhsKE3Fwc19wZXJfc2VydmVyX2NvcmUYAiABKAESGgoSc2VydmVyX3N5", + "c3RlbV90aW1lGAMgASgBEhgKEHNlcnZlcl91c2VyX3RpbWUYBCABKAESGgoS", + "Y2xpZW50X3N5c3RlbV90aW1lGAUgASgBEhgKEGNsaWVudF91c2VyX3RpbWUY", + "BiABKAESEgoKbGF0ZW5jeV81MBgHIAEoARISCgpsYXRlbmN5XzkwGAggASgB", + "EhIKCmxhdGVuY3lfOTUYCSABKAESEgoKbGF0ZW5jeV85ORgKIAEoARITCgts", + "YXRlbmN5Xzk5ORgLIAEoASKYAgoOU2NlbmFyaW9SZXN1bHQSKAoIc2NlbmFy", + "aW8YASABKAsyFi5ncnBjLnRlc3RpbmcuU2NlbmFyaW8SLgoJbGF0ZW5jaWVz", + "GAIgASgLMhsuZ3JwYy50ZXN0aW5nLkhpc3RvZ3JhbURhdGESLwoMY2xpZW50", + "X3N0YXRzGAMgAygLMhkuZ3JwYy50ZXN0aW5nLkNsaWVudFN0YXRzEi8KDHNl", + "cnZlcl9zdGF0cxgEIAMoCzIZLmdycGMudGVzdGluZy5TZXJ2ZXJTdGF0cxIU", + "CgxzZXJ2ZXJfY29yZXMYBSADKAUSNAoHc3VtbWFyeRgGIAEoCzIjLmdycGMu", + "dGVzdGluZy5TY2VuYXJpb1Jlc3VsdFN1bW1hcnkqLwoKQ2xpZW50VHlwZRIP", + "CgtTWU5DX0NMSUVOVBAAEhAKDEFTWU5DX0NMSUVOVBABKkkKClNlcnZlclR5", + "cGUSDwoLU1lOQ19TRVJWRVIQABIQCgxBU1lOQ19TRVJWRVIQARIYChRBU1lO", + "Q19HRU5FUklDX1NFUlZFUhACKiMKB1JwY1R5cGUSCQoFVU5BUlkQABINCglT", + "VFJFQU1JTkcQAWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Grpc.Testing.PayloadsReflection.Descriptor, global::Grpc.Testing.StatsReflection.Descriptor, }, new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.ClientType), typeof(global::Grpc.Testing.ServerType), typeof(global::Grpc.Testing.RpcType), }, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.PoissonParams), global::Grpc.Testing.PoissonParams.Parser, new[]{ "OfferedLoad" }, null, null, null), - new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.UniformParams), global::Grpc.Testing.UniformParams.Parser, new[]{ "InterarrivalLo", "InterarrivalHi" }, null, null, null), - new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.DeterministicParams), global::Grpc.Testing.DeterministicParams.Parser, new[]{ "OfferedLoad" }, null, null, null), - new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ParetoParams), global::Grpc.Testing.ParetoParams.Parser, new[]{ "InterarrivalBase", "Alpha" }, null, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClosedLoopParams), global::Grpc.Testing.ClosedLoopParams.Parser, null, null, null, null), - new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson", "Uniform", "Determ", "Pareto" }, new[]{ "Load" }, null, null), + new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson" }, new[]{ "Load" }, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SecurityParams), global::Grpc.Testing.SecurityParams.Parser, new[]{ "UseTestCa", "ServerHostOverride" }, null, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientConfig), global::Grpc.Testing.ClientConfig.Parser, new[]{ "ServerTargets", "ClientType", "SecurityParams", "OutstandingRpcsPerChannel", "ClientChannels", "AsyncClientThreads", "RpcType", "LoadParams", "PayloadConfig", "HistogramParams", "CoreList", "CoreLimit" }, null, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientStatus), global::Grpc.Testing.ClientStatus.Parser, new[]{ "Stats" }, null, null, null), @@ -88,7 +97,11 @@ namespace Grpc.Testing { new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerStatus), global::Grpc.Testing.ServerStatus.Parser, new[]{ "Stats", "Port", "Cores" }, null, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.CoreRequest), global::Grpc.Testing.CoreRequest.Parser, null, null, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.CoreResponse), global::Grpc.Testing.CoreResponse.Parser, new[]{ "Cores" }, null, null, null), - new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Void), global::Grpc.Testing.Void.Parser, null, null, null, null) + new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Void), global::Grpc.Testing.Void.Parser, null, null, null, null), + new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Scenario), global::Grpc.Testing.Scenario.Parser, new[]{ "Name", "ClientConfig", "NumClients", "ServerConfig", "NumServers", "WarmupSeconds", "BenchmarkSeconds", "SpawnLocalWorkerCount" }, null, null, null), + new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Scenarios), global::Grpc.Testing.Scenarios.Parser, new[]{ "Scenarios_" }, null, null, null), + new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ScenarioResultSummary), global::Grpc.Testing.ScenarioResultSummary.Parser, new[]{ "Qps", "QpsPerServerCore", "ServerSystemTime", "ServerUserTime", "ClientSystemTime", "ClientUserTime", "Latency50", "Latency90", "Latency95", "Latency99", "Latency999" }, null, null, null), + new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ScenarioResult), global::Grpc.Testing.ScenarioResult.Parser, new[]{ "Scenario", "Latencies", "ClientStats", "ServerStats", "ServerCores", "Summary" }, null, null, null) })); } #endregion @@ -224,10 +237,14 @@ namespace Grpc.Testing { } + /// + /// Once an RPC finishes, immediately start a new one. + /// No configuration parameters needed. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class UniformParams : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UniformParams()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class ClosedLoopParams : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClosedLoopParams()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[1]; } @@ -237,61 +254,35 @@ namespace Grpc.Testing { get { return Descriptor; } } - public UniformParams() { + public ClosedLoopParams() { OnConstruction(); } partial void OnConstruction(); - public UniformParams(UniformParams other) : this() { - interarrivalLo_ = other.interarrivalLo_; - interarrivalHi_ = other.interarrivalHi_; - } - - public UniformParams Clone() { - return new UniformParams(this); - } - - /// Field number for the "interarrival_lo" field. - public const int InterarrivalLoFieldNumber = 1; - private double interarrivalLo_; - public double InterarrivalLo { - get { return interarrivalLo_; } - set { - interarrivalLo_ = value; - } + public ClosedLoopParams(ClosedLoopParams other) : this() { } - /// Field number for the "interarrival_hi" field. - public const int InterarrivalHiFieldNumber = 2; - private double interarrivalHi_; - public double InterarrivalHi { - get { return interarrivalHi_; } - set { - interarrivalHi_ = value; - } + public ClosedLoopParams Clone() { + return new ClosedLoopParams(this); } public override bool Equals(object other) { - return Equals(other as UniformParams); + return Equals(other as ClosedLoopParams); } - public bool Equals(UniformParams other) { + public bool Equals(ClosedLoopParams other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (InterarrivalLo != other.InterarrivalLo) return false; - if (InterarrivalHi != other.InterarrivalHi) return false; return true; } public override int GetHashCode() { int hash = 1; - if (InterarrivalLo != 0D) hash ^= InterarrivalLo.GetHashCode(); - if (InterarrivalHi != 0D) hash ^= InterarrivalHi.GetHashCode(); return hash; } @@ -300,37 +291,17 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (InterarrivalLo != 0D) { - output.WriteRawTag(9); - output.WriteDouble(InterarrivalLo); - } - if (InterarrivalHi != 0D) { - output.WriteRawTag(17); - output.WriteDouble(InterarrivalHi); - } } public int CalculateSize() { int size = 0; - if (InterarrivalLo != 0D) { - size += 1 + 8; - } - if (InterarrivalHi != 0D) { - size += 1 + 8; - } return size; } - public void MergeFrom(UniformParams other) { + public void MergeFrom(ClosedLoopParams other) { if (other == null) { return; } - if (other.InterarrivalLo != 0D) { - InterarrivalLo = other.InterarrivalLo; - } - if (other.InterarrivalHi != 0D) { - InterarrivalHi = other.InterarrivalHi; - } } public void MergeFrom(pb::CodedInputStream input) { @@ -340,14 +311,6 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 9: { - InterarrivalLo = input.ReadDouble(); - break; - } - case 17: { - InterarrivalHi = input.ReadDouble(); - break; - } } } } @@ -355,9 +318,9 @@ namespace Grpc.Testing { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class DeterministicParams : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeterministicParams()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class LoadParams : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoadParams()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[2]; } @@ -367,48 +330,87 @@ namespace Grpc.Testing { get { return Descriptor; } } - public DeterministicParams() { + public LoadParams() { OnConstruction(); } partial void OnConstruction(); - public DeterministicParams(DeterministicParams other) : this() { - offeredLoad_ = other.offeredLoad_; + public LoadParams(LoadParams other) : this() { + switch (other.LoadCase) { + case LoadOneofCase.ClosedLoop: + ClosedLoop = other.ClosedLoop.Clone(); + break; + case LoadOneofCase.Poisson: + Poisson = other.Poisson.Clone(); + break; + } + } - public DeterministicParams Clone() { - return new DeterministicParams(this); + public LoadParams Clone() { + return new LoadParams(this); } - /// Field number for the "offered_load" field. - public const int OfferedLoadFieldNumber = 1; - private double offeredLoad_; - public double OfferedLoad { - get { return offeredLoad_; } + /// Field number for the "closed_loop" field. + public const int ClosedLoopFieldNumber = 1; + public global::Grpc.Testing.ClosedLoopParams ClosedLoop { + get { return loadCase_ == LoadOneofCase.ClosedLoop ? (global::Grpc.Testing.ClosedLoopParams) load_ : null; } set { - offeredLoad_ = value; + load_ = value; + loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.ClosedLoop; + } + } + + /// Field number for the "poisson" field. + public const int PoissonFieldNumber = 2; + public global::Grpc.Testing.PoissonParams Poisson { + get { return loadCase_ == LoadOneofCase.Poisson ? (global::Grpc.Testing.PoissonParams) load_ : null; } + set { + load_ = value; + loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Poisson; } } + private object load_; + /// Enum of possible cases for the "load" oneof. + public enum LoadOneofCase { + None = 0, + ClosedLoop = 1, + Poisson = 2, + } + private LoadOneofCase loadCase_ = LoadOneofCase.None; + public LoadOneofCase LoadCase { + get { return loadCase_; } + } + + public void ClearLoad() { + loadCase_ = LoadOneofCase.None; + load_ = null; + } + public override bool Equals(object other) { - return Equals(other as DeterministicParams); + return Equals(other as LoadParams); } - public bool Equals(DeterministicParams other) { + public bool Equals(LoadParams other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (OfferedLoad != other.OfferedLoad) return false; + if (!object.Equals(ClosedLoop, other.ClosedLoop)) return false; + if (!object.Equals(Poisson, other.Poisson)) return false; + if (LoadCase != other.LoadCase) return false; return true; } public override int GetHashCode() { int hash = 1; - if (OfferedLoad != 0D) hash ^= OfferedLoad.GetHashCode(); + if (loadCase_ == LoadOneofCase.ClosedLoop) hash ^= ClosedLoop.GetHashCode(); + if (loadCase_ == LoadOneofCase.Poisson) hash ^= Poisson.GetHashCode(); + hash ^= (int) loadCase_; return hash; } @@ -417,27 +419,40 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (OfferedLoad != 0D) { - output.WriteRawTag(9); - output.WriteDouble(OfferedLoad); + if (loadCase_ == LoadOneofCase.ClosedLoop) { + output.WriteRawTag(10); + output.WriteMessage(ClosedLoop); + } + if (loadCase_ == LoadOneofCase.Poisson) { + output.WriteRawTag(18); + output.WriteMessage(Poisson); } } public int CalculateSize() { int size = 0; - if (OfferedLoad != 0D) { - size += 1 + 8; + if (loadCase_ == LoadOneofCase.ClosedLoop) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClosedLoop); + } + if (loadCase_ == LoadOneofCase.Poisson) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Poisson); } return size; } - public void MergeFrom(DeterministicParams other) { + public void MergeFrom(LoadParams other) { if (other == null) { return; } - if (other.OfferedLoad != 0D) { - OfferedLoad = other.OfferedLoad; + switch (other.LoadCase) { + case LoadOneofCase.ClosedLoop: + ClosedLoop = other.ClosedLoop; + break; + case LoadOneofCase.Poisson: + Poisson = other.Poisson; + break; } + } public void MergeFrom(pb::CodedInputStream input) { @@ -447,8 +462,22 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 9: { - OfferedLoad = input.ReadDouble(); + case 10: { + global::Grpc.Testing.ClosedLoopParams subBuilder = new global::Grpc.Testing.ClosedLoopParams(); + if (loadCase_ == LoadOneofCase.ClosedLoop) { + subBuilder.MergeFrom(ClosedLoop); + } + input.ReadMessage(subBuilder); + ClosedLoop = subBuilder; + break; + } + case 18: { + global::Grpc.Testing.PoissonParams subBuilder = new global::Grpc.Testing.PoissonParams(); + if (loadCase_ == LoadOneofCase.Poisson) { + subBuilder.MergeFrom(Poisson); + } + input.ReadMessage(subBuilder); + Poisson = subBuilder; break; } } @@ -457,10 +486,13 @@ namespace Grpc.Testing { } + /// + /// presence of SecurityParams implies use of TLS + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class ParetoParams : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ParetoParams()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class SecurityParams : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityParams()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[3]; } @@ -470,61 +502,61 @@ namespace Grpc.Testing { get { return Descriptor; } } - public ParetoParams() { + public SecurityParams() { OnConstruction(); } partial void OnConstruction(); - public ParetoParams(ParetoParams other) : this() { - interarrivalBase_ = other.interarrivalBase_; - alpha_ = other.alpha_; + public SecurityParams(SecurityParams other) : this() { + useTestCa_ = other.useTestCa_; + serverHostOverride_ = other.serverHostOverride_; } - public ParetoParams Clone() { - return new ParetoParams(this); + public SecurityParams Clone() { + return new SecurityParams(this); } - /// Field number for the "interarrival_base" field. - public const int InterarrivalBaseFieldNumber = 1; - private double interarrivalBase_; - public double InterarrivalBase { - get { return interarrivalBase_; } + /// Field number for the "use_test_ca" field. + public const int UseTestCaFieldNumber = 1; + private bool useTestCa_; + public bool UseTestCa { + get { return useTestCa_; } set { - interarrivalBase_ = value; + useTestCa_ = value; } } - /// Field number for the "alpha" field. - public const int AlphaFieldNumber = 2; - private double alpha_; - public double Alpha { - get { return alpha_; } + /// Field number for the "server_host_override" field. + public const int ServerHostOverrideFieldNumber = 2; + private string serverHostOverride_ = ""; + public string ServerHostOverride { + get { return serverHostOverride_; } set { - alpha_ = value; + serverHostOverride_ = pb::Preconditions.CheckNotNull(value, "value"); } } public override bool Equals(object other) { - return Equals(other as ParetoParams); + return Equals(other as SecurityParams); } - public bool Equals(ParetoParams other) { + public bool Equals(SecurityParams other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (InterarrivalBase != other.InterarrivalBase) return false; - if (Alpha != other.Alpha) return false; + if (UseTestCa != other.UseTestCa) return false; + if (ServerHostOverride != other.ServerHostOverride) return false; return true; } public override int GetHashCode() { int hash = 1; - if (InterarrivalBase != 0D) hash ^= InterarrivalBase.GetHashCode(); - if (Alpha != 0D) hash ^= Alpha.GetHashCode(); + if (UseTestCa != false) hash ^= UseTestCa.GetHashCode(); + if (ServerHostOverride.Length != 0) hash ^= ServerHostOverride.GetHashCode(); return hash; } @@ -533,36 +565,36 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (InterarrivalBase != 0D) { - output.WriteRawTag(9); - output.WriteDouble(InterarrivalBase); + if (UseTestCa != false) { + output.WriteRawTag(8); + output.WriteBool(UseTestCa); } - if (Alpha != 0D) { - output.WriteRawTag(17); - output.WriteDouble(Alpha); + if (ServerHostOverride.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ServerHostOverride); } } public int CalculateSize() { int size = 0; - if (InterarrivalBase != 0D) { - size += 1 + 8; + if (UseTestCa != false) { + size += 1 + 1; } - if (Alpha != 0D) { - size += 1 + 8; + if (ServerHostOverride.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ServerHostOverride); } return size; } - public void MergeFrom(ParetoParams other) { + public void MergeFrom(SecurityParams other) { if (other == null) { return; } - if (other.InterarrivalBase != 0D) { - InterarrivalBase = other.InterarrivalBase; + if (other.UseTestCa != false) { + UseTestCa = other.UseTestCa; } - if (other.Alpha != 0D) { - Alpha = other.Alpha; + if (other.ServerHostOverride.Length != 0) { + ServerHostOverride = other.ServerHostOverride; } } @@ -573,12 +605,12 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 9: { - InterarrivalBase = input.ReadDouble(); + case 8: { + UseTestCa = input.ReadBool(); break; } - case 17: { - Alpha = input.ReadDouble(); + case 18: { + ServerHostOverride = input.ReadString(); break; } } @@ -587,14 +619,10 @@ namespace Grpc.Testing { } - /// - /// Once an RPC finishes, immediately start a new one. - /// No configuration parameters needed. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class ClosedLoopParams : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClosedLoopParams()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class ClientConfig : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClientConfig()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[4]; } @@ -604,35 +632,477 @@ namespace Grpc.Testing { get { return Descriptor; } } - public ClosedLoopParams() { + public ClientConfig() { OnConstruction(); } partial void OnConstruction(); - public ClosedLoopParams(ClosedLoopParams other) : this() { + public ClientConfig(ClientConfig other) : this() { + serverTargets_ = other.serverTargets_.Clone(); + clientType_ = other.clientType_; + SecurityParams = other.securityParams_ != null ? other.SecurityParams.Clone() : null; + outstandingRpcsPerChannel_ = other.outstandingRpcsPerChannel_; + clientChannels_ = other.clientChannels_; + asyncClientThreads_ = other.asyncClientThreads_; + rpcType_ = other.rpcType_; + LoadParams = other.loadParams_ != null ? other.LoadParams.Clone() : null; + PayloadConfig = other.payloadConfig_ != null ? other.PayloadConfig.Clone() : null; + HistogramParams = other.histogramParams_ != null ? other.HistogramParams.Clone() : null; + coreList_ = other.coreList_.Clone(); + coreLimit_ = other.coreLimit_; } - public ClosedLoopParams Clone() { - return new ClosedLoopParams(this); + public ClientConfig Clone() { + return new ClientConfig(this); } - public override bool Equals(object other) { - return Equals(other as ClosedLoopParams); + /// Field number for the "server_targets" field. + public const int ServerTargetsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_serverTargets_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField serverTargets_ = new pbc::RepeatedField(); + /// + /// List of targets to connect to. At least one target needs to be specified. + /// + public pbc::RepeatedField ServerTargets { + get { return serverTargets_; } } - public bool Equals(ClosedLoopParams other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - return true; - } + /// Field number for the "client_type" field. + public const int ClientTypeFieldNumber = 2; + private global::Grpc.Testing.ClientType clientType_ = global::Grpc.Testing.ClientType.SYNC_CLIENT; + public global::Grpc.Testing.ClientType ClientType { + get { return clientType_; } + set { + clientType_ = value; + } + } + + /// Field number for the "security_params" field. + public const int SecurityParamsFieldNumber = 3; + private global::Grpc.Testing.SecurityParams securityParams_; + public global::Grpc.Testing.SecurityParams SecurityParams { + get { return securityParams_; } + set { + securityParams_ = value; + } + } + + /// Field number for the "outstanding_rpcs_per_channel" field. + public const int OutstandingRpcsPerChannelFieldNumber = 4; + private int outstandingRpcsPerChannel_; + /// + /// How many concurrent RPCs to start for each channel. + /// For synchronous client, use a separate thread for each outstanding RPC. + /// + public int OutstandingRpcsPerChannel { + get { return outstandingRpcsPerChannel_; } + set { + outstandingRpcsPerChannel_ = value; + } + } + + /// Field number for the "client_channels" field. + public const int ClientChannelsFieldNumber = 5; + private int clientChannels_; + /// + /// Number of independent client channels to create. + /// i-th channel will connect to server_target[i % server_targets.size()] + /// + public int ClientChannels { + get { return clientChannels_; } + set { + clientChannels_ = value; + } + } + + /// Field number for the "async_client_threads" field. + public const int AsyncClientThreadsFieldNumber = 7; + private int asyncClientThreads_; + /// + /// Only for async client. Number of threads to use to start/manage RPCs. + /// + public int AsyncClientThreads { + get { return asyncClientThreads_; } + set { + asyncClientThreads_ = value; + } + } + + /// Field number for the "rpc_type" field. + public const int RpcTypeFieldNumber = 8; + private global::Grpc.Testing.RpcType rpcType_ = global::Grpc.Testing.RpcType.UNARY; + public global::Grpc.Testing.RpcType RpcType { + get { return rpcType_; } + set { + rpcType_ = value; + } + } + + /// Field number for the "load_params" field. + public const int LoadParamsFieldNumber = 10; + private global::Grpc.Testing.LoadParams loadParams_; + /// + /// The requested load for the entire client (aggregated over all the threads). + /// + public global::Grpc.Testing.LoadParams LoadParams { + get { return loadParams_; } + set { + loadParams_ = value; + } + } + + /// Field number for the "payload_config" field. + public const int PayloadConfigFieldNumber = 11; + private global::Grpc.Testing.PayloadConfig payloadConfig_; + public global::Grpc.Testing.PayloadConfig PayloadConfig { + get { return payloadConfig_; } + set { + payloadConfig_ = value; + } + } + + /// Field number for the "histogram_params" field. + public const int HistogramParamsFieldNumber = 12; + private global::Grpc.Testing.HistogramParams histogramParams_; + public global::Grpc.Testing.HistogramParams HistogramParams { + get { return histogramParams_; } + set { + histogramParams_ = value; + } + } + + /// Field number for the "core_list" field. + public const int CoreListFieldNumber = 13; + private static readonly pb::FieldCodec _repeated_coreList_codec + = pb::FieldCodec.ForInt32(106); + private readonly pbc::RepeatedField coreList_ = new pbc::RepeatedField(); + /// + /// Specify the cores we should run the client on, if desired + /// + public pbc::RepeatedField CoreList { + get { return coreList_; } + } + + /// Field number for the "core_limit" field. + public const int CoreLimitFieldNumber = 14; + private int coreLimit_; + public int CoreLimit { + get { return coreLimit_; } + set { + coreLimit_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as ClientConfig); + } + + public bool Equals(ClientConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!serverTargets_.Equals(other.serverTargets_)) return false; + if (ClientType != other.ClientType) return false; + if (!object.Equals(SecurityParams, other.SecurityParams)) return false; + if (OutstandingRpcsPerChannel != other.OutstandingRpcsPerChannel) return false; + if (ClientChannels != other.ClientChannels) return false; + if (AsyncClientThreads != other.AsyncClientThreads) return false; + if (RpcType != other.RpcType) return false; + if (!object.Equals(LoadParams, other.LoadParams)) return false; + if (!object.Equals(PayloadConfig, other.PayloadConfig)) return false; + if (!object.Equals(HistogramParams, other.HistogramParams)) return false; + if(!coreList_.Equals(other.coreList_)) return false; + if (CoreLimit != other.CoreLimit) return false; + return true; + } + + public override int GetHashCode() { + int hash = 1; + hash ^= serverTargets_.GetHashCode(); + if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) hash ^= ClientType.GetHashCode(); + if (securityParams_ != null) hash ^= SecurityParams.GetHashCode(); + if (OutstandingRpcsPerChannel != 0) hash ^= OutstandingRpcsPerChannel.GetHashCode(); + if (ClientChannels != 0) hash ^= ClientChannels.GetHashCode(); + if (AsyncClientThreads != 0) hash ^= AsyncClientThreads.GetHashCode(); + if (RpcType != global::Grpc.Testing.RpcType.UNARY) hash ^= RpcType.GetHashCode(); + if (loadParams_ != null) hash ^= LoadParams.GetHashCode(); + if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode(); + if (histogramParams_ != null) hash ^= HistogramParams.GetHashCode(); + hash ^= coreList_.GetHashCode(); + if (CoreLimit != 0) hash ^= CoreLimit.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + serverTargets_.WriteTo(output, _repeated_serverTargets_codec); + if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { + output.WriteRawTag(16); + output.WriteEnum((int) ClientType); + } + if (securityParams_ != null) { + output.WriteRawTag(26); + output.WriteMessage(SecurityParams); + } + if (OutstandingRpcsPerChannel != 0) { + output.WriteRawTag(32); + output.WriteInt32(OutstandingRpcsPerChannel); + } + if (ClientChannels != 0) { + output.WriteRawTag(40); + output.WriteInt32(ClientChannels); + } + if (AsyncClientThreads != 0) { + output.WriteRawTag(56); + output.WriteInt32(AsyncClientThreads); + } + if (RpcType != global::Grpc.Testing.RpcType.UNARY) { + output.WriteRawTag(64); + output.WriteEnum((int) RpcType); + } + if (loadParams_ != null) { + output.WriteRawTag(82); + output.WriteMessage(LoadParams); + } + if (payloadConfig_ != null) { + output.WriteRawTag(90); + output.WriteMessage(PayloadConfig); + } + if (histogramParams_ != null) { + output.WriteRawTag(98); + output.WriteMessage(HistogramParams); + } + coreList_.WriteTo(output, _repeated_coreList_codec); + if (CoreLimit != 0) { + output.WriteRawTag(112); + output.WriteInt32(CoreLimit); + } + } + + public int CalculateSize() { + int size = 0; + size += serverTargets_.CalculateSize(_repeated_serverTargets_codec); + if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ClientType); + } + if (securityParams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SecurityParams); + } + if (OutstandingRpcsPerChannel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutstandingRpcsPerChannel); + } + if (ClientChannels != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ClientChannels); + } + if (AsyncClientThreads != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AsyncClientThreads); + } + if (RpcType != global::Grpc.Testing.RpcType.UNARY) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RpcType); + } + if (loadParams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LoadParams); + } + if (payloadConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PayloadConfig); + } + if (histogramParams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(HistogramParams); + } + size += coreList_.CalculateSize(_repeated_coreList_codec); + if (CoreLimit != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CoreLimit); + } + return size; + } + + public void MergeFrom(ClientConfig other) { + if (other == null) { + return; + } + serverTargets_.Add(other.serverTargets_); + if (other.ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { + ClientType = other.ClientType; + } + if (other.securityParams_ != null) { + if (securityParams_ == null) { + securityParams_ = new global::Grpc.Testing.SecurityParams(); + } + SecurityParams.MergeFrom(other.SecurityParams); + } + if (other.OutstandingRpcsPerChannel != 0) { + OutstandingRpcsPerChannel = other.OutstandingRpcsPerChannel; + } + if (other.ClientChannels != 0) { + ClientChannels = other.ClientChannels; + } + if (other.AsyncClientThreads != 0) { + AsyncClientThreads = other.AsyncClientThreads; + } + if (other.RpcType != global::Grpc.Testing.RpcType.UNARY) { + RpcType = other.RpcType; + } + if (other.loadParams_ != null) { + if (loadParams_ == null) { + loadParams_ = new global::Grpc.Testing.LoadParams(); + } + LoadParams.MergeFrom(other.LoadParams); + } + if (other.payloadConfig_ != null) { + if (payloadConfig_ == null) { + payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); + } + PayloadConfig.MergeFrom(other.PayloadConfig); + } + if (other.histogramParams_ != null) { + if (histogramParams_ == null) { + histogramParams_ = new global::Grpc.Testing.HistogramParams(); + } + HistogramParams.MergeFrom(other.HistogramParams); + } + coreList_.Add(other.coreList_); + if (other.CoreLimit != 0) { + CoreLimit = other.CoreLimit; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + serverTargets_.AddEntriesFrom(input, _repeated_serverTargets_codec); + break; + } + case 16: { + clientType_ = (global::Grpc.Testing.ClientType) input.ReadEnum(); + break; + } + case 26: { + if (securityParams_ == null) { + securityParams_ = new global::Grpc.Testing.SecurityParams(); + } + input.ReadMessage(securityParams_); + break; + } + case 32: { + OutstandingRpcsPerChannel = input.ReadInt32(); + break; + } + case 40: { + ClientChannels = input.ReadInt32(); + break; + } + case 56: { + AsyncClientThreads = input.ReadInt32(); + break; + } + case 64: { + rpcType_ = (global::Grpc.Testing.RpcType) input.ReadEnum(); + break; + } + case 82: { + if (loadParams_ == null) { + loadParams_ = new global::Grpc.Testing.LoadParams(); + } + input.ReadMessage(loadParams_); + break; + } + case 90: { + if (payloadConfig_ == null) { + payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); + } + input.ReadMessage(payloadConfig_); + break; + } + case 98: { + if (histogramParams_ == null) { + histogramParams_ = new global::Grpc.Testing.HistogramParams(); + } + input.ReadMessage(histogramParams_); + break; + } + case 106: + case 104: { + coreList_.AddEntriesFrom(input, _repeated_coreList_codec); + break; + } + case 112: { + CoreLimit = input.ReadInt32(); + break; + } + } + } + } + + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class ClientStatus : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClientStatus()); + public static pb::MessageParser Parser { get { return _parser; } } + + public static pbr::MessageDescriptor Descriptor { + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[5]; } + } + + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + public ClientStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + public ClientStatus(ClientStatus other) : this() { + Stats = other.stats_ != null ? other.Stats.Clone() : null; + } + + public ClientStatus Clone() { + return new ClientStatus(this); + } + + /// Field number for the "stats" field. + public const int StatsFieldNumber = 1; + private global::Grpc.Testing.ClientStats stats_; + public global::Grpc.Testing.ClientStats Stats { + get { return stats_; } + set { + stats_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as ClientStatus); + } + + public bool Equals(ClientStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Stats, other.Stats)) return false; + return true; + } public override int GetHashCode() { int hash = 1; + if (stats_ != null) hash ^= Stats.GetHashCode(); return hash; } @@ -641,17 +1111,30 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { + if (stats_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Stats); + } } public int CalculateSize() { int size = 0; + if (stats_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stats); + } return size; } - public void MergeFrom(ClosedLoopParams other) { + public void MergeFrom(ClientStatus other) { if (other == null) { return; } + if (other.stats_ != null) { + if (stats_ == null) { + stats_ = new global::Grpc.Testing.ClientStats(); + } + Stats.MergeFrom(other.Stats); + } } public void MergeFrom(pb::CodedInputStream input) { @@ -661,154 +1144,80 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; + case 10: { + if (stats_ == null) { + stats_ = new global::Grpc.Testing.ClientStats(); + } + input.ReadMessage(stats_); + break; + } } } } } + /// + /// Request current stats + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class LoadParams : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoadParams()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class Mark : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Mark()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[5]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[6]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public LoadParams() { + public Mark() { OnConstruction(); } partial void OnConstruction(); - public LoadParams(LoadParams other) : this() { - switch (other.LoadCase) { - case LoadOneofCase.ClosedLoop: - ClosedLoop = other.ClosedLoop.Clone(); - break; - case LoadOneofCase.Poisson: - Poisson = other.Poisson.Clone(); - break; - case LoadOneofCase.Uniform: - Uniform = other.Uniform.Clone(); - break; - case LoadOneofCase.Determ: - Determ = other.Determ.Clone(); - break; - case LoadOneofCase.Pareto: - Pareto = other.Pareto.Clone(); - break; - } - - } - - public LoadParams Clone() { - return new LoadParams(this); - } - - /// Field number for the "closed_loop" field. - public const int ClosedLoopFieldNumber = 1; - public global::Grpc.Testing.ClosedLoopParams ClosedLoop { - get { return loadCase_ == LoadOneofCase.ClosedLoop ? (global::Grpc.Testing.ClosedLoopParams) load_ : null; } - set { - load_ = value; - loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.ClosedLoop; - } - } - - /// Field number for the "poisson" field. - public const int PoissonFieldNumber = 2; - public global::Grpc.Testing.PoissonParams Poisson { - get { return loadCase_ == LoadOneofCase.Poisson ? (global::Grpc.Testing.PoissonParams) load_ : null; } - set { - load_ = value; - loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Poisson; - } - } - - /// Field number for the "uniform" field. - public const int UniformFieldNumber = 3; - public global::Grpc.Testing.UniformParams Uniform { - get { return loadCase_ == LoadOneofCase.Uniform ? (global::Grpc.Testing.UniformParams) load_ : null; } - set { - load_ = value; - loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Uniform; - } + public Mark(Mark other) : this() { + reset_ = other.reset_; } - /// Field number for the "determ" field. - public const int DetermFieldNumber = 4; - public global::Grpc.Testing.DeterministicParams Determ { - get { return loadCase_ == LoadOneofCase.Determ ? (global::Grpc.Testing.DeterministicParams) load_ : null; } - set { - load_ = value; - loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Determ; - } + public Mark Clone() { + return new Mark(this); } - /// Field number for the "pareto" field. - public const int ParetoFieldNumber = 5; - public global::Grpc.Testing.ParetoParams Pareto { - get { return loadCase_ == LoadOneofCase.Pareto ? (global::Grpc.Testing.ParetoParams) load_ : null; } + /// Field number for the "reset" field. + public const int ResetFieldNumber = 1; + private bool reset_; + /// + /// if true, the stats will be reset after taking their snapshot. + /// + public bool Reset { + get { return reset_; } set { - load_ = value; - loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Pareto; + reset_ = value; } } - private object load_; - /// Enum of possible cases for the "load" oneof. - public enum LoadOneofCase { - None = 0, - ClosedLoop = 1, - Poisson = 2, - Uniform = 3, - Determ = 4, - Pareto = 5, - } - private LoadOneofCase loadCase_ = LoadOneofCase.None; - public LoadOneofCase LoadCase { - get { return loadCase_; } - } - - public void ClearLoad() { - loadCase_ = LoadOneofCase.None; - load_ = null; - } - public override bool Equals(object other) { - return Equals(other as LoadParams); + return Equals(other as Mark); } - public bool Equals(LoadParams other) { + public bool Equals(Mark other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(ClosedLoop, other.ClosedLoop)) return false; - if (!object.Equals(Poisson, other.Poisson)) return false; - if (!object.Equals(Uniform, other.Uniform)) return false; - if (!object.Equals(Determ, other.Determ)) return false; - if (!object.Equals(Pareto, other.Pareto)) return false; - if (LoadCase != other.LoadCase) return false; + if (Reset != other.Reset) return false; return true; } public override int GetHashCode() { int hash = 1; - if (loadCase_ == LoadOneofCase.ClosedLoop) hash ^= ClosedLoop.GetHashCode(); - if (loadCase_ == LoadOneofCase.Poisson) hash ^= Poisson.GetHashCode(); - if (loadCase_ == LoadOneofCase.Uniform) hash ^= Uniform.GetHashCode(); - if (loadCase_ == LoadOneofCase.Determ) hash ^= Determ.GetHashCode(); - if (loadCase_ == LoadOneofCase.Pareto) hash ^= Pareto.GetHashCode(); - hash ^= (int) loadCase_; + if (Reset != false) hash ^= Reset.GetHashCode(); return hash; } @@ -817,70 +1226,27 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (loadCase_ == LoadOneofCase.ClosedLoop) { - output.WriteRawTag(10); - output.WriteMessage(ClosedLoop); - } - if (loadCase_ == LoadOneofCase.Poisson) { - output.WriteRawTag(18); - output.WriteMessage(Poisson); - } - if (loadCase_ == LoadOneofCase.Uniform) { - output.WriteRawTag(26); - output.WriteMessage(Uniform); - } - if (loadCase_ == LoadOneofCase.Determ) { - output.WriteRawTag(34); - output.WriteMessage(Determ); - } - if (loadCase_ == LoadOneofCase.Pareto) { - output.WriteRawTag(42); - output.WriteMessage(Pareto); + if (Reset != false) { + output.WriteRawTag(8); + output.WriteBool(Reset); } } public int CalculateSize() { int size = 0; - if (loadCase_ == LoadOneofCase.ClosedLoop) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClosedLoop); - } - if (loadCase_ == LoadOneofCase.Poisson) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Poisson); - } - if (loadCase_ == LoadOneofCase.Uniform) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Uniform); - } - if (loadCase_ == LoadOneofCase.Determ) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Determ); - } - if (loadCase_ == LoadOneofCase.Pareto) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Pareto); + if (Reset != false) { + size += 1 + 1; } return size; } - public void MergeFrom(LoadParams other) { + public void MergeFrom(Mark other) { if (other == null) { return; } - switch (other.LoadCase) { - case LoadOneofCase.ClosedLoop: - ClosedLoop = other.ClosedLoop; - break; - case LoadOneofCase.Poisson: - Poisson = other.Poisson; - break; - case LoadOneofCase.Uniform: - Uniform = other.Uniform; - break; - case LoadOneofCase.Determ: - Determ = other.Determ; - break; - case LoadOneofCase.Pareto: - Pareto = other.Pareto; - break; + if (other.Reset != false) { + Reset = other.Reset; } - } public void MergeFrom(pb::CodedInputStream input) { @@ -890,49 +1256,8 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 10: { - global::Grpc.Testing.ClosedLoopParams subBuilder = new global::Grpc.Testing.ClosedLoopParams(); - if (loadCase_ == LoadOneofCase.ClosedLoop) { - subBuilder.MergeFrom(ClosedLoop); - } - input.ReadMessage(subBuilder); - ClosedLoop = subBuilder; - break; - } - case 18: { - global::Grpc.Testing.PoissonParams subBuilder = new global::Grpc.Testing.PoissonParams(); - if (loadCase_ == LoadOneofCase.Poisson) { - subBuilder.MergeFrom(Poisson); - } - input.ReadMessage(subBuilder); - Poisson = subBuilder; - break; - } - case 26: { - global::Grpc.Testing.UniformParams subBuilder = new global::Grpc.Testing.UniformParams(); - if (loadCase_ == LoadOneofCase.Uniform) { - subBuilder.MergeFrom(Uniform); - } - input.ReadMessage(subBuilder); - Uniform = subBuilder; - break; - } - case 34: { - global::Grpc.Testing.DeterministicParams subBuilder = new global::Grpc.Testing.DeterministicParams(); - if (loadCase_ == LoadOneofCase.Determ) { - subBuilder.MergeFrom(Determ); - } - input.ReadMessage(subBuilder); - Determ = subBuilder; - break; - } - case 42: { - global::Grpc.Testing.ParetoParams subBuilder = new global::Grpc.Testing.ParetoParams(); - if (loadCase_ == LoadOneofCase.Pareto) { - subBuilder.MergeFrom(Pareto); - } - input.ReadMessage(subBuilder); - Pareto = subBuilder; + case 8: { + Reset = input.ReadBool(); break; } } @@ -941,77 +1266,100 @@ namespace Grpc.Testing { } - /// - /// presence of SecurityParams implies use of TLS - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class SecurityParams : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityParams()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class ClientArgs : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClientArgs()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[6]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[7]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public SecurityParams() { + public ClientArgs() { OnConstruction(); } partial void OnConstruction(); - public SecurityParams(SecurityParams other) : this() { - useTestCa_ = other.useTestCa_; - serverHostOverride_ = other.serverHostOverride_; + public ClientArgs(ClientArgs other) : this() { + switch (other.ArgtypeCase) { + case ArgtypeOneofCase.Setup: + Setup = other.Setup.Clone(); + break; + case ArgtypeOneofCase.Mark: + Mark = other.Mark.Clone(); + break; + } + } - public SecurityParams Clone() { - return new SecurityParams(this); + public ClientArgs Clone() { + return new ClientArgs(this); } - /// Field number for the "use_test_ca" field. - public const int UseTestCaFieldNumber = 1; - private bool useTestCa_; - public bool UseTestCa { - get { return useTestCa_; } + /// Field number for the "setup" field. + public const int SetupFieldNumber = 1; + public global::Grpc.Testing.ClientConfig Setup { + get { return argtypeCase_ == ArgtypeOneofCase.Setup ? (global::Grpc.Testing.ClientConfig) argtype_ : null; } + set { + argtype_ = value; + argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Setup; + } + } + + /// Field number for the "mark" field. + public const int MarkFieldNumber = 2; + public global::Grpc.Testing.Mark Mark { + get { return argtypeCase_ == ArgtypeOneofCase.Mark ? (global::Grpc.Testing.Mark) argtype_ : null; } set { - useTestCa_ = value; + argtype_ = value; + argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Mark; } } - /// Field number for the "server_host_override" field. - public const int ServerHostOverrideFieldNumber = 2; - private string serverHostOverride_ = ""; - public string ServerHostOverride { - get { return serverHostOverride_; } - set { - serverHostOverride_ = pb::Preconditions.CheckNotNull(value, "value"); - } + private object argtype_; + /// Enum of possible cases for the "argtype" oneof. + public enum ArgtypeOneofCase { + None = 0, + Setup = 1, + Mark = 2, + } + private ArgtypeOneofCase argtypeCase_ = ArgtypeOneofCase.None; + public ArgtypeOneofCase ArgtypeCase { + get { return argtypeCase_; } + } + + public void ClearArgtype() { + argtypeCase_ = ArgtypeOneofCase.None; + argtype_ = null; } public override bool Equals(object other) { - return Equals(other as SecurityParams); + return Equals(other as ClientArgs); } - public bool Equals(SecurityParams other) { + public bool Equals(ClientArgs other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (UseTestCa != other.UseTestCa) return false; - if (ServerHostOverride != other.ServerHostOverride) return false; + if (!object.Equals(Setup, other.Setup)) return false; + if (!object.Equals(Mark, other.Mark)) return false; + if (ArgtypeCase != other.ArgtypeCase) return false; return true; } public override int GetHashCode() { int hash = 1; - if (UseTestCa != false) hash ^= UseTestCa.GetHashCode(); - if (ServerHostOverride.Length != 0) hash ^= ServerHostOverride.GetHashCode(); + if (argtypeCase_ == ArgtypeOneofCase.Setup) hash ^= Setup.GetHashCode(); + if (argtypeCase_ == ArgtypeOneofCase.Mark) hash ^= Mark.GetHashCode(); + hash ^= (int) argtypeCase_; return hash; } @@ -1020,37 +1368,40 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (UseTestCa != false) { - output.WriteRawTag(8); - output.WriteBool(UseTestCa); + if (argtypeCase_ == ArgtypeOneofCase.Setup) { + output.WriteRawTag(10); + output.WriteMessage(Setup); } - if (ServerHostOverride.Length != 0) { + if (argtypeCase_ == ArgtypeOneofCase.Mark) { output.WriteRawTag(18); - output.WriteString(ServerHostOverride); + output.WriteMessage(Mark); } } public int CalculateSize() { int size = 0; - if (UseTestCa != false) { - size += 1 + 1; + if (argtypeCase_ == ArgtypeOneofCase.Setup) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Setup); } - if (ServerHostOverride.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ServerHostOverride); + if (argtypeCase_ == ArgtypeOneofCase.Mark) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Mark); } return size; } - public void MergeFrom(SecurityParams other) { + public void MergeFrom(ClientArgs other) { if (other == null) { return; } - if (other.UseTestCa != false) { - UseTestCa = other.UseTestCa; - } - if (other.ServerHostOverride.Length != 0) { - ServerHostOverride = other.ServerHostOverride; + switch (other.ArgtypeCase) { + case ArgtypeOneofCase.Setup: + Setup = other.Setup; + break; + case ArgtypeOneofCase.Mark: + Mark = other.Mark; + break; } + } public void MergeFrom(pb::CodedInputStream input) { @@ -1060,12 +1411,22 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 8: { - UseTestCa = input.ReadBool(); + case 10: { + global::Grpc.Testing.ClientConfig subBuilder = new global::Grpc.Testing.ClientConfig(); + if (argtypeCase_ == ArgtypeOneofCase.Setup) { + subBuilder.MergeFrom(Setup); + } + input.ReadMessage(subBuilder); + Setup = subBuilder; break; } case 18: { - ServerHostOverride = input.ReadString(); + global::Grpc.Testing.Mark subBuilder = new global::Grpc.Testing.Mark(); + if (argtypeCase_ == ArgtypeOneofCase.Mark) { + subBuilder.MergeFrom(Mark); + } + input.ReadMessage(subBuilder); + Mark = subBuilder; break; } } @@ -1075,67 +1436,50 @@ namespace Grpc.Testing { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class ClientConfig : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClientConfig()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class ServerConfig : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServerConfig()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[7]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[8]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public ClientConfig() { + public ServerConfig() { OnConstruction(); } partial void OnConstruction(); - public ClientConfig(ClientConfig other) : this() { - serverTargets_ = other.serverTargets_.Clone(); - clientType_ = other.clientType_; + public ServerConfig(ServerConfig other) : this() { + serverType_ = other.serverType_; SecurityParams = other.securityParams_ != null ? other.SecurityParams.Clone() : null; - outstandingRpcsPerChannel_ = other.outstandingRpcsPerChannel_; - clientChannels_ = other.clientChannels_; - asyncClientThreads_ = other.asyncClientThreads_; - rpcType_ = other.rpcType_; - LoadParams = other.loadParams_ != null ? other.LoadParams.Clone() : null; + port_ = other.port_; + asyncServerThreads_ = other.asyncServerThreads_; + coreLimit_ = other.coreLimit_; PayloadConfig = other.payloadConfig_ != null ? other.PayloadConfig.Clone() : null; - HistogramParams = other.histogramParams_ != null ? other.HistogramParams.Clone() : null; coreList_ = other.coreList_.Clone(); - coreLimit_ = other.coreLimit_; - } - - public ClientConfig Clone() { - return new ClientConfig(this); } - /// Field number for the "server_targets" field. - public const int ServerTargetsFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_serverTargets_codec - = pb::FieldCodec.ForString(10); - private readonly pbc::RepeatedField serverTargets_ = new pbc::RepeatedField(); - /// - /// List of targets to connect to. At least one target needs to be specified. - /// - public pbc::RepeatedField ServerTargets { - get { return serverTargets_; } + public ServerConfig Clone() { + return new ServerConfig(this); } - /// Field number for the "client_type" field. - public const int ClientTypeFieldNumber = 2; - private global::Grpc.Testing.ClientType clientType_ = global::Grpc.Testing.ClientType.SYNC_CLIENT; - public global::Grpc.Testing.ClientType ClientType { - get { return clientType_; } + /// Field number for the "server_type" field. + public const int ServerTypeFieldNumber = 1; + private global::Grpc.Testing.ServerType serverType_ = global::Grpc.Testing.ServerType.SYNC_SERVER; + public global::Grpc.Testing.ServerType ServerType { + get { return serverType_; } set { - clientType_ = value; + serverType_ = value; } } /// Field number for the "security_params" field. - public const int SecurityParamsFieldNumber = 3; + public const int SecurityParamsFieldNumber = 2; private global::Grpc.Testing.SecurityParams securityParams_; public global::Grpc.Testing.SecurityParams SecurityParams { get { return securityParams_; } @@ -1144,73 +1488,51 @@ namespace Grpc.Testing { } } - /// Field number for the "outstanding_rpcs_per_channel" field. - public const int OutstandingRpcsPerChannelFieldNumber = 4; - private int outstandingRpcsPerChannel_; - /// - /// How many concurrent RPCs to start for each channel. - /// For synchronous client, use a separate thread for each outstanding RPC. - /// - public int OutstandingRpcsPerChannel { - get { return outstandingRpcsPerChannel_; } - set { - outstandingRpcsPerChannel_ = value; - } - } - - /// Field number for the "client_channels" field. - public const int ClientChannelsFieldNumber = 5; - private int clientChannels_; + /// Field number for the "port" field. + public const int PortFieldNumber = 4; + private int port_; /// - /// Number of independent client channels to create. - /// i-th channel will connect to server_target[i % server_targets.size()] + /// Port on which to listen. Zero means pick unused port. /// - public int ClientChannels { - get { return clientChannels_; } + public int Port { + get { return port_; } set { - clientChannels_ = value; + port_ = value; } } - /// Field number for the "async_client_threads" field. - public const int AsyncClientThreadsFieldNumber = 7; - private int asyncClientThreads_; + /// Field number for the "async_server_threads" field. + public const int AsyncServerThreadsFieldNumber = 7; + private int asyncServerThreads_; /// - /// Only for async client. Number of threads to use to start/manage RPCs. + /// Only for async server. Number of threads used to serve the requests. /// - public int AsyncClientThreads { - get { return asyncClientThreads_; } - set { - asyncClientThreads_ = value; - } - } - - /// Field number for the "rpc_type" field. - public const int RpcTypeFieldNumber = 8; - private global::Grpc.Testing.RpcType rpcType_ = global::Grpc.Testing.RpcType.UNARY; - public global::Grpc.Testing.RpcType RpcType { - get { return rpcType_; } + public int AsyncServerThreads { + get { return asyncServerThreads_; } set { - rpcType_ = value; + asyncServerThreads_ = value; } } - /// Field number for the "load_params" field. - public const int LoadParamsFieldNumber = 10; - private global::Grpc.Testing.LoadParams loadParams_; + /// Field number for the "core_limit" field. + public const int CoreLimitFieldNumber = 8; + private int coreLimit_; /// - /// The requested load for the entire client (aggregated over all the threads). + /// Specify the number of cores to limit server to, if desired /// - public global::Grpc.Testing.LoadParams LoadParams { - get { return loadParams_; } + public int CoreLimit { + get { return coreLimit_; } set { - loadParams_ = value; + coreLimit_ = value; } } /// Field number for the "payload_config" field. - public const int PayloadConfigFieldNumber = 11; + public const int PayloadConfigFieldNumber = 9; private global::Grpc.Testing.PayloadConfig payloadConfig_; + /// + /// payload config, used in generic server + /// public global::Grpc.Testing.PayloadConfig PayloadConfig { get { return payloadConfig_; } set { @@ -1218,78 +1540,48 @@ namespace Grpc.Testing { } } - /// Field number for the "histogram_params" field. - public const int HistogramParamsFieldNumber = 12; - private global::Grpc.Testing.HistogramParams histogramParams_; - public global::Grpc.Testing.HistogramParams HistogramParams { - get { return histogramParams_; } - set { - histogramParams_ = value; - } - } - /// Field number for the "core_list" field. - public const int CoreListFieldNumber = 13; + public const int CoreListFieldNumber = 10; private static readonly pb::FieldCodec _repeated_coreList_codec - = pb::FieldCodec.ForInt32(106); + = pb::FieldCodec.ForInt32(82); private readonly pbc::RepeatedField coreList_ = new pbc::RepeatedField(); /// - /// Specify the cores we should run the client on, if desired + /// Specify the cores we should run the server on, if desired /// public pbc::RepeatedField CoreList { get { return coreList_; } } - /// Field number for the "core_limit" field. - public const int CoreLimitFieldNumber = 14; - private int coreLimit_; - public int CoreLimit { - get { return coreLimit_; } - set { - coreLimit_ = value; - } - } - public override bool Equals(object other) { - return Equals(other as ClientConfig); + return Equals(other as ServerConfig); } - public bool Equals(ClientConfig other) { + public bool Equals(ServerConfig other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!serverTargets_.Equals(other.serverTargets_)) return false; - if (ClientType != other.ClientType) return false; + if (ServerType != other.ServerType) return false; if (!object.Equals(SecurityParams, other.SecurityParams)) return false; - if (OutstandingRpcsPerChannel != other.OutstandingRpcsPerChannel) return false; - if (ClientChannels != other.ClientChannels) return false; - if (AsyncClientThreads != other.AsyncClientThreads) return false; - if (RpcType != other.RpcType) return false; - if (!object.Equals(LoadParams, other.LoadParams)) return false; + if (Port != other.Port) return false; + if (AsyncServerThreads != other.AsyncServerThreads) return false; + if (CoreLimit != other.CoreLimit) return false; if (!object.Equals(PayloadConfig, other.PayloadConfig)) return false; - if (!object.Equals(HistogramParams, other.HistogramParams)) return false; if(!coreList_.Equals(other.coreList_)) return false; - if (CoreLimit != other.CoreLimit) return false; return true; } public override int GetHashCode() { int hash = 1; - hash ^= serverTargets_.GetHashCode(); - if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) hash ^= ClientType.GetHashCode(); + if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) hash ^= ServerType.GetHashCode(); if (securityParams_ != null) hash ^= SecurityParams.GetHashCode(); - if (OutstandingRpcsPerChannel != 0) hash ^= OutstandingRpcsPerChannel.GetHashCode(); - if (ClientChannels != 0) hash ^= ClientChannels.GetHashCode(); - if (AsyncClientThreads != 0) hash ^= AsyncClientThreads.GetHashCode(); - if (RpcType != global::Grpc.Testing.RpcType.UNARY) hash ^= RpcType.GetHashCode(); - if (loadParams_ != null) hash ^= LoadParams.GetHashCode(); + if (Port != 0) hash ^= Port.GetHashCode(); + if (AsyncServerThreads != 0) hash ^= AsyncServerThreads.GetHashCode(); + if (CoreLimit != 0) hash ^= CoreLimit.GetHashCode(); if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode(); - if (histogramParams_ != null) hash ^= HistogramParams.GetHashCode(); hash ^= coreList_.GetHashCode(); - if (CoreLimit != 0) hash ^= CoreLimit.GetHashCode(); return hash; } @@ -1298,94 +1590,63 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - serverTargets_.WriteTo(output, _repeated_serverTargets_codec); - if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { - output.WriteRawTag(16); - output.WriteEnum((int) ClientType); + if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { + output.WriteRawTag(8); + output.WriteEnum((int) ServerType); } if (securityParams_ != null) { - output.WriteRawTag(26); + output.WriteRawTag(18); output.WriteMessage(SecurityParams); } - if (OutstandingRpcsPerChannel != 0) { + if (Port != 0) { output.WriteRawTag(32); - output.WriteInt32(OutstandingRpcsPerChannel); - } - if (ClientChannels != 0) { - output.WriteRawTag(40); - output.WriteInt32(ClientChannels); + output.WriteInt32(Port); } - if (AsyncClientThreads != 0) { + if (AsyncServerThreads != 0) { output.WriteRawTag(56); - output.WriteInt32(AsyncClientThreads); + output.WriteInt32(AsyncServerThreads); } - if (RpcType != global::Grpc.Testing.RpcType.UNARY) { + if (CoreLimit != 0) { output.WriteRawTag(64); - output.WriteEnum((int) RpcType); - } - if (loadParams_ != null) { - output.WriteRawTag(82); - output.WriteMessage(LoadParams); + output.WriteInt32(CoreLimit); } if (payloadConfig_ != null) { - output.WriteRawTag(90); + output.WriteRawTag(74); output.WriteMessage(PayloadConfig); } - if (histogramParams_ != null) { - output.WriteRawTag(98); - output.WriteMessage(HistogramParams); - } coreList_.WriteTo(output, _repeated_coreList_codec); - if (CoreLimit != 0) { - output.WriteRawTag(112); - output.WriteInt32(CoreLimit); - } } public int CalculateSize() { int size = 0; - size += serverTargets_.CalculateSize(_repeated_serverTargets_codec); - if (ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ClientType); + if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ServerType); } if (securityParams_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(SecurityParams); } - if (OutstandingRpcsPerChannel != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutstandingRpcsPerChannel); - } - if (ClientChannels != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ClientChannels); - } - if (AsyncClientThreads != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(AsyncClientThreads); + if (Port != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); } - if (RpcType != global::Grpc.Testing.RpcType.UNARY) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RpcType); + if (AsyncServerThreads != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AsyncServerThreads); } - if (loadParams_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(LoadParams); + if (CoreLimit != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CoreLimit); } if (payloadConfig_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(PayloadConfig); } - if (histogramParams_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(HistogramParams); - } size += coreList_.CalculateSize(_repeated_coreList_codec); - if (CoreLimit != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(CoreLimit); - } return size; } - public void MergeFrom(ClientConfig other) { + public void MergeFrom(ServerConfig other) { if (other == null) { return; } - serverTargets_.Add(other.serverTargets_); - if (other.ClientType != global::Grpc.Testing.ClientType.SYNC_CLIENT) { - ClientType = other.ClientType; + if (other.ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { + ServerType = other.ServerType; } if (other.securityParams_ != null) { if (securityParams_ == null) { @@ -1393,23 +1654,14 @@ namespace Grpc.Testing { } SecurityParams.MergeFrom(other.SecurityParams); } - if (other.OutstandingRpcsPerChannel != 0) { - OutstandingRpcsPerChannel = other.OutstandingRpcsPerChannel; - } - if (other.ClientChannels != 0) { - ClientChannels = other.ClientChannels; - } - if (other.AsyncClientThreads != 0) { - AsyncClientThreads = other.AsyncClientThreads; + if (other.Port != 0) { + Port = other.Port; } - if (other.RpcType != global::Grpc.Testing.RpcType.UNARY) { - RpcType = other.RpcType; + if (other.AsyncServerThreads != 0) { + AsyncServerThreads = other.AsyncServerThreads; } - if (other.loadParams_ != null) { - if (loadParams_ == null) { - loadParams_ = new global::Grpc.Testing.LoadParams(); - } - LoadParams.MergeFrom(other.LoadParams); + if (other.CoreLimit != 0) { + CoreLimit = other.CoreLimit; } if (other.payloadConfig_ != null) { if (payloadConfig_ == null) { @@ -1417,16 +1669,7 @@ namespace Grpc.Testing { } PayloadConfig.MergeFrom(other.PayloadConfig); } - if (other.histogramParams_ != null) { - if (histogramParams_ == null) { - histogramParams_ = new global::Grpc.Testing.HistogramParams(); - } - HistogramParams.MergeFrom(other.HistogramParams); - } coreList_.Add(other.coreList_); - if (other.CoreLimit != 0) { - CoreLimit = other.CoreLimit; - } } public void MergeFrom(pb::CodedInputStream input) { @@ -1436,15 +1679,11 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 10: { - serverTargets_.AddEntriesFrom(input, _repeated_serverTargets_codec); - break; - } - case 16: { - clientType_ = (global::Grpc.Testing.ClientType) input.ReadEnum(); + case 8: { + serverType_ = (global::Grpc.Testing.ServerType) input.ReadEnum(); break; } - case 26: { + case 18: { if (securityParams_ == null) { securityParams_ = new global::Grpc.Testing.SecurityParams(); } @@ -1452,51 +1691,29 @@ namespace Grpc.Testing { break; } case 32: { - OutstandingRpcsPerChannel = input.ReadInt32(); - break; - } - case 40: { - ClientChannels = input.ReadInt32(); + Port = input.ReadInt32(); break; } case 56: { - AsyncClientThreads = input.ReadInt32(); + AsyncServerThreads = input.ReadInt32(); break; } case 64: { - rpcType_ = (global::Grpc.Testing.RpcType) input.ReadEnum(); - break; - } - case 82: { - if (loadParams_ == null) { - loadParams_ = new global::Grpc.Testing.LoadParams(); - } - input.ReadMessage(loadParams_); + CoreLimit = input.ReadInt32(); break; } - case 90: { + case 74: { if (payloadConfig_ == null) { payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); } input.ReadMessage(payloadConfig_); break; } - case 98: { - if (histogramParams_ == null) { - histogramParams_ = new global::Grpc.Testing.HistogramParams(); - } - input.ReadMessage(histogramParams_); - break; - } - case 106: - case 104: { + case 82: + case 80: { coreList_.AddEntriesFrom(input, _repeated_coreList_codec); break; } - case 112: { - CoreLimit = input.ReadInt32(); - break; - } } } } @@ -1504,60 +1721,99 @@ namespace Grpc.Testing { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class ClientStatus : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClientStatus()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class ServerArgs : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServerArgs()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[8]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[9]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public ClientStatus() { + public ServerArgs() { OnConstruction(); } partial void OnConstruction(); - public ClientStatus(ClientStatus other) : this() { - Stats = other.stats_ != null ? other.Stats.Clone() : null; + public ServerArgs(ServerArgs other) : this() { + switch (other.ArgtypeCase) { + case ArgtypeOneofCase.Setup: + Setup = other.Setup.Clone(); + break; + case ArgtypeOneofCase.Mark: + Mark = other.Mark.Clone(); + break; + } + } - public ClientStatus Clone() { - return new ClientStatus(this); + public ServerArgs Clone() { + return new ServerArgs(this); } - /// Field number for the "stats" field. - public const int StatsFieldNumber = 1; - private global::Grpc.Testing.ClientStats stats_; - public global::Grpc.Testing.ClientStats Stats { - get { return stats_; } + /// Field number for the "setup" field. + public const int SetupFieldNumber = 1; + public global::Grpc.Testing.ServerConfig Setup { + get { return argtypeCase_ == ArgtypeOneofCase.Setup ? (global::Grpc.Testing.ServerConfig) argtype_ : null; } set { - stats_ = value; + argtype_ = value; + argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Setup; + } + } + + /// Field number for the "mark" field. + public const int MarkFieldNumber = 2; + public global::Grpc.Testing.Mark Mark { + get { return argtypeCase_ == ArgtypeOneofCase.Mark ? (global::Grpc.Testing.Mark) argtype_ : null; } + set { + argtype_ = value; + argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Mark; } } + private object argtype_; + /// Enum of possible cases for the "argtype" oneof. + public enum ArgtypeOneofCase { + None = 0, + Setup = 1, + Mark = 2, + } + private ArgtypeOneofCase argtypeCase_ = ArgtypeOneofCase.None; + public ArgtypeOneofCase ArgtypeCase { + get { return argtypeCase_; } + } + + public void ClearArgtype() { + argtypeCase_ = ArgtypeOneofCase.None; + argtype_ = null; + } + public override bool Equals(object other) { - return Equals(other as ClientStatus); + return Equals(other as ServerArgs); } - public bool Equals(ClientStatus other) { + public bool Equals(ServerArgs other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(Stats, other.Stats)) return false; + if (!object.Equals(Setup, other.Setup)) return false; + if (!object.Equals(Mark, other.Mark)) return false; + if (ArgtypeCase != other.ArgtypeCase) return false; return true; } public override int GetHashCode() { int hash = 1; - if (stats_ != null) hash ^= Stats.GetHashCode(); + if (argtypeCase_ == ArgtypeOneofCase.Setup) hash ^= Setup.GetHashCode(); + if (argtypeCase_ == ArgtypeOneofCase.Mark) hash ^= Mark.GetHashCode(); + hash ^= (int) argtypeCase_; return hash; } @@ -1566,30 +1822,40 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (stats_ != null) { + if (argtypeCase_ == ArgtypeOneofCase.Setup) { output.WriteRawTag(10); - output.WriteMessage(Stats); + output.WriteMessage(Setup); + } + if (argtypeCase_ == ArgtypeOneofCase.Mark) { + output.WriteRawTag(18); + output.WriteMessage(Mark); } } public int CalculateSize() { int size = 0; - if (stats_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stats); + if (argtypeCase_ == ArgtypeOneofCase.Setup) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Setup); + } + if (argtypeCase_ == ArgtypeOneofCase.Mark) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Mark); } return size; } - public void MergeFrom(ClientStatus other) { + public void MergeFrom(ServerArgs other) { if (other == null) { return; } - if (other.stats_ != null) { - if (stats_ == null) { - stats_ = new global::Grpc.Testing.ClientStats(); - } - Stats.MergeFrom(other.Stats); + switch (other.ArgtypeCase) { + case ArgtypeOneofCase.Setup: + Setup = other.Setup; + break; + case ArgtypeOneofCase.Mark: + Mark = other.Mark; + break; } + } public void MergeFrom(pb::CodedInputStream input) { @@ -1600,10 +1866,21 @@ namespace Grpc.Testing { input.SkipLastField(); break; case 10: { - if (stats_ == null) { - stats_ = new global::Grpc.Testing.ClientStats(); + global::Grpc.Testing.ServerConfig subBuilder = new global::Grpc.Testing.ServerConfig(); + if (argtypeCase_ == ArgtypeOneofCase.Setup) { + subBuilder.MergeFrom(Setup); } - input.ReadMessage(stats_); + input.ReadMessage(subBuilder); + Setup = subBuilder; + break; + } + case 18: { + global::Grpc.Testing.Mark subBuilder = new global::Grpc.Testing.Mark(); + if (argtypeCase_ == ArgtypeOneofCase.Mark) { + subBuilder.MergeFrom(Mark); + } + input.ReadMessage(subBuilder); + Mark = subBuilder; break; } } @@ -1612,67 +1889,93 @@ namespace Grpc.Testing { } - /// - /// Request current stats - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class Mark : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Mark()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class ServerStatus : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServerStatus()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[9]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[10]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public Mark() { + public ServerStatus() { OnConstruction(); } partial void OnConstruction(); - public Mark(Mark other) : this() { - reset_ = other.reset_; + public ServerStatus(ServerStatus other) : this() { + Stats = other.stats_ != null ? other.Stats.Clone() : null; + port_ = other.port_; + cores_ = other.cores_; } - public Mark Clone() { - return new Mark(this); + public ServerStatus Clone() { + return new ServerStatus(this); } - /// Field number for the "reset" field. - public const int ResetFieldNumber = 1; - private bool reset_; + /// Field number for the "stats" field. + public const int StatsFieldNumber = 1; + private global::Grpc.Testing.ServerStats stats_; + public global::Grpc.Testing.ServerStats Stats { + get { return stats_; } + set { + stats_ = value; + } + } + + /// Field number for the "port" field. + public const int PortFieldNumber = 2; + private int port_; /// - /// if true, the stats will be reset after taking their snapshot. + /// the port bound by the server /// - public bool Reset { - get { return reset_; } + public int Port { + get { return port_; } set { - reset_ = value; + port_ = value; + } + } + + /// Field number for the "cores" field. + public const int CoresFieldNumber = 3; + private int cores_; + /// + /// Number of cores available to the server + /// + public int Cores { + get { return cores_; } + set { + cores_ = value; } } public override bool Equals(object other) { - return Equals(other as Mark); + return Equals(other as ServerStatus); } - public bool Equals(Mark other) { + public bool Equals(ServerStatus other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Reset != other.Reset) return false; + if (!object.Equals(Stats, other.Stats)) return false; + if (Port != other.Port) return false; + if (Cores != other.Cores) return false; return true; } public override int GetHashCode() { int hash = 1; - if (Reset != false) hash ^= Reset.GetHashCode(); + if (stats_ != null) hash ^= Stats.GetHashCode(); + if (Port != 0) hash ^= Port.GetHashCode(); + if (Cores != 0) hash ^= Cores.GetHashCode(); return hash; } @@ -1681,26 +1984,49 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (Reset != false) { - output.WriteRawTag(8); - output.WriteBool(Reset); + if (stats_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Stats); + } + if (Port != 0) { + output.WriteRawTag(16); + output.WriteInt32(Port); + } + if (Cores != 0) { + output.WriteRawTag(24); + output.WriteInt32(Cores); } } public int CalculateSize() { int size = 0; - if (Reset != false) { - size += 1 + 1; + if (stats_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stats); + } + if (Port != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); + } + if (Cores != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Cores); } return size; } - public void MergeFrom(Mark other) { + public void MergeFrom(ServerStatus other) { if (other == null) { return; } - if (other.Reset != false) { - Reset = other.Reset; + if (other.stats_ != null) { + if (stats_ == null) { + stats_ = new global::Grpc.Testing.ServerStats(); + } + Stats.MergeFrom(other.Stats); + } + if (other.Port != 0) { + Port = other.Port; + } + if (other.Cores != 0) { + Cores = other.Cores; } } @@ -1711,8 +2037,19 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 8: { - Reset = input.ReadBool(); + case 10: { + if (stats_ == null) { + stats_ = new global::Grpc.Testing.ServerStats(); + } + input.ReadMessage(stats_); + break; + } + case 16: { + Port = input.ReadInt32(); + break; + } + case 24: { + Cores = input.ReadInt32(); break; } } @@ -1722,99 +2059,47 @@ namespace Grpc.Testing { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class ClientArgs : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClientArgs()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class CoreRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CoreRequest()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[10]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[11]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public ClientArgs() { + public CoreRequest() { OnConstruction(); } partial void OnConstruction(); - public ClientArgs(ClientArgs other) : this() { - switch (other.ArgtypeCase) { - case ArgtypeOneofCase.Setup: - Setup = other.Setup.Clone(); - break; - case ArgtypeOneofCase.Mark: - Mark = other.Mark.Clone(); - break; - } - - } - - public ClientArgs Clone() { - return new ClientArgs(this); - } - - /// Field number for the "setup" field. - public const int SetupFieldNumber = 1; - public global::Grpc.Testing.ClientConfig Setup { - get { return argtypeCase_ == ArgtypeOneofCase.Setup ? (global::Grpc.Testing.ClientConfig) argtype_ : null; } - set { - argtype_ = value; - argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Setup; - } - } - - /// Field number for the "mark" field. - public const int MarkFieldNumber = 2; - public global::Grpc.Testing.Mark Mark { - get { return argtypeCase_ == ArgtypeOneofCase.Mark ? (global::Grpc.Testing.Mark) argtype_ : null; } - set { - argtype_ = value; - argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Mark; - } - } - - private object argtype_; - /// Enum of possible cases for the "argtype" oneof. - public enum ArgtypeOneofCase { - None = 0, - Setup = 1, - Mark = 2, - } - private ArgtypeOneofCase argtypeCase_ = ArgtypeOneofCase.None; - public ArgtypeOneofCase ArgtypeCase { - get { return argtypeCase_; } + public CoreRequest(CoreRequest other) : this() { } - public void ClearArgtype() { - argtypeCase_ = ArgtypeOneofCase.None; - argtype_ = null; + public CoreRequest Clone() { + return new CoreRequest(this); } public override bool Equals(object other) { - return Equals(other as ClientArgs); + return Equals(other as CoreRequest); } - public bool Equals(ClientArgs other) { + public bool Equals(CoreRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(Setup, other.Setup)) return false; - if (!object.Equals(Mark, other.Mark)) return false; - if (ArgtypeCase != other.ArgtypeCase) return false; return true; } public override int GetHashCode() { int hash = 1; - if (argtypeCase_ == ArgtypeOneofCase.Setup) hash ^= Setup.GetHashCode(); - if (argtypeCase_ == ArgtypeOneofCase.Mark) hash ^= Mark.GetHashCode(); - hash ^= (int) argtypeCase_; return hash; } @@ -1823,40 +2108,17 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (argtypeCase_ == ArgtypeOneofCase.Setup) { - output.WriteRawTag(10); - output.WriteMessage(Setup); - } - if (argtypeCase_ == ArgtypeOneofCase.Mark) { - output.WriteRawTag(18); - output.WriteMessage(Mark); - } } public int CalculateSize() { int size = 0; - if (argtypeCase_ == ArgtypeOneofCase.Setup) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Setup); - } - if (argtypeCase_ == ArgtypeOneofCase.Mark) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Mark); - } return size; } - public void MergeFrom(ClientArgs other) { + public void MergeFrom(CoreRequest other) { if (other == null) { - return; - } - switch (other.ArgtypeCase) { - case ArgtypeOneofCase.Setup: - Setup = other.Setup; - break; - case ArgtypeOneofCase.Mark: - Mark = other.Mark; - break; + return; } - } public void MergeFrom(pb::CodedInputStream input) { @@ -1866,24 +2128,6 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 10: { - global::Grpc.Testing.ClientConfig subBuilder = new global::Grpc.Testing.ClientConfig(); - if (argtypeCase_ == ArgtypeOneofCase.Setup) { - subBuilder.MergeFrom(Setup); - } - input.ReadMessage(subBuilder); - Setup = subBuilder; - break; - } - case 18: { - global::Grpc.Testing.Mark subBuilder = new global::Grpc.Testing.Mark(); - if (argtypeCase_ == ArgtypeOneofCase.Mark) { - subBuilder.MergeFrom(Mark); - } - input.ReadMessage(subBuilder); - Mark = subBuilder; - break; - } } } } @@ -1891,152 +2135,63 @@ namespace Grpc.Testing { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class ServerConfig : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServerConfig()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class CoreResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CoreResponse()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[11]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[12]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public ServerConfig() { + public CoreResponse() { OnConstruction(); } partial void OnConstruction(); - public ServerConfig(ServerConfig other) : this() { - serverType_ = other.serverType_; - SecurityParams = other.securityParams_ != null ? other.SecurityParams.Clone() : null; - port_ = other.port_; - asyncServerThreads_ = other.asyncServerThreads_; - coreLimit_ = other.coreLimit_; - PayloadConfig = other.payloadConfig_ != null ? other.PayloadConfig.Clone() : null; - coreList_ = other.coreList_.Clone(); - } - - public ServerConfig Clone() { - return new ServerConfig(this); - } - - /// Field number for the "server_type" field. - public const int ServerTypeFieldNumber = 1; - private global::Grpc.Testing.ServerType serverType_ = global::Grpc.Testing.ServerType.SYNC_SERVER; - public global::Grpc.Testing.ServerType ServerType { - get { return serverType_; } - set { - serverType_ = value; - } - } - - /// Field number for the "security_params" field. - public const int SecurityParamsFieldNumber = 2; - private global::Grpc.Testing.SecurityParams securityParams_; - public global::Grpc.Testing.SecurityParams SecurityParams { - get { return securityParams_; } - set { - securityParams_ = value; - } - } - - /// Field number for the "port" field. - public const int PortFieldNumber = 4; - private int port_; - /// - /// Port on which to listen. Zero means pick unused port. - /// - public int Port { - get { return port_; } - set { - port_ = value; - } - } - - /// Field number for the "async_server_threads" field. - public const int AsyncServerThreadsFieldNumber = 7; - private int asyncServerThreads_; - /// - /// Only for async server. Number of threads used to serve the requests. - /// - public int AsyncServerThreads { - get { return asyncServerThreads_; } - set { - asyncServerThreads_ = value; - } + public CoreResponse(CoreResponse other) : this() { + cores_ = other.cores_; } - /// Field number for the "core_limit" field. - public const int CoreLimitFieldNumber = 8; - private int coreLimit_; - /// - /// Specify the number of cores to limit server to, if desired - /// - public int CoreLimit { - get { return coreLimit_; } - set { - coreLimit_ = value; - } + public CoreResponse Clone() { + return new CoreResponse(this); } - /// Field number for the "payload_config" field. - public const int PayloadConfigFieldNumber = 9; - private global::Grpc.Testing.PayloadConfig payloadConfig_; + /// Field number for the "cores" field. + public const int CoresFieldNumber = 1; + private int cores_; /// - /// payload config, used in generic server + /// Number of cores available on the server /// - public global::Grpc.Testing.PayloadConfig PayloadConfig { - get { return payloadConfig_; } + public int Cores { + get { return cores_; } set { - payloadConfig_ = value; + cores_ = value; } } - /// Field number for the "core_list" field. - public const int CoreListFieldNumber = 10; - private static readonly pb::FieldCodec _repeated_coreList_codec - = pb::FieldCodec.ForInt32(82); - private readonly pbc::RepeatedField coreList_ = new pbc::RepeatedField(); - /// - /// Specify the cores we should run the server on, if desired - /// - public pbc::RepeatedField CoreList { - get { return coreList_; } - } - public override bool Equals(object other) { - return Equals(other as ServerConfig); + return Equals(other as CoreResponse); } - public bool Equals(ServerConfig other) { + public bool Equals(CoreResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ServerType != other.ServerType) return false; - if (!object.Equals(SecurityParams, other.SecurityParams)) return false; - if (Port != other.Port) return false; - if (AsyncServerThreads != other.AsyncServerThreads) return false; - if (CoreLimit != other.CoreLimit) return false; - if (!object.Equals(PayloadConfig, other.PayloadConfig)) return false; - if(!coreList_.Equals(other.coreList_)) return false; + if (Cores != other.Cores) return false; return true; } public override int GetHashCode() { int hash = 1; - if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) hash ^= ServerType.GetHashCode(); - if (securityParams_ != null) hash ^= SecurityParams.GetHashCode(); - if (Port != 0) hash ^= Port.GetHashCode(); - if (AsyncServerThreads != 0) hash ^= AsyncServerThreads.GetHashCode(); - if (CoreLimit != 0) hash ^= CoreLimit.GetHashCode(); - if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode(); - hash ^= coreList_.GetHashCode(); + if (Cores != 0) hash ^= Cores.GetHashCode(); return hash; } @@ -2045,128 +2200,38 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { + if (Cores != 0) { output.WriteRawTag(8); - output.WriteEnum((int) ServerType); - } - if (securityParams_ != null) { - output.WriteRawTag(18); - output.WriteMessage(SecurityParams); - } - if (Port != 0) { - output.WriteRawTag(32); - output.WriteInt32(Port); - } - if (AsyncServerThreads != 0) { - output.WriteRawTag(56); - output.WriteInt32(AsyncServerThreads); - } - if (CoreLimit != 0) { - output.WriteRawTag(64); - output.WriteInt32(CoreLimit); - } - if (payloadConfig_ != null) { - output.WriteRawTag(74); - output.WriteMessage(PayloadConfig); + output.WriteInt32(Cores); } - coreList_.WriteTo(output, _repeated_coreList_codec); } public int CalculateSize() { int size = 0; - if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ServerType); - } - if (securityParams_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(SecurityParams); - } - if (Port != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); - } - if (AsyncServerThreads != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(AsyncServerThreads); - } - if (CoreLimit != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(CoreLimit); - } - if (payloadConfig_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(PayloadConfig); + if (Cores != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Cores); } - size += coreList_.CalculateSize(_repeated_coreList_codec); return size; } - public void MergeFrom(ServerConfig other) { + public void MergeFrom(CoreResponse other) { if (other == null) { return; } - if (other.ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) { - ServerType = other.ServerType; - } - if (other.securityParams_ != null) { - if (securityParams_ == null) { - securityParams_ = new global::Grpc.Testing.SecurityParams(); - } - SecurityParams.MergeFrom(other.SecurityParams); - } - if (other.Port != 0) { - Port = other.Port; - } - if (other.AsyncServerThreads != 0) { - AsyncServerThreads = other.AsyncServerThreads; - } - if (other.CoreLimit != 0) { - CoreLimit = other.CoreLimit; - } - if (other.payloadConfig_ != null) { - if (payloadConfig_ == null) { - payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); - } - PayloadConfig.MergeFrom(other.PayloadConfig); + if (other.Cores != 0) { + Cores = other.Cores; } - coreList_.Add(other.coreList_); } public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - input.SkipLastField(); - break; - case 8: { - serverType_ = (global::Grpc.Testing.ServerType) input.ReadEnum(); - break; - } - case 18: { - if (securityParams_ == null) { - securityParams_ = new global::Grpc.Testing.SecurityParams(); - } - input.ReadMessage(securityParams_); - break; - } - case 32: { - Port = input.ReadInt32(); - break; - } - case 56: { - AsyncServerThreads = input.ReadInt32(); - break; - } - case 64: { - CoreLimit = input.ReadInt32(); - break; - } - case 74: { - if (payloadConfig_ == null) { - payloadConfig_ = new global::Grpc.Testing.PayloadConfig(); - } - input.ReadMessage(payloadConfig_); + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); break; - } - case 82: - case 80: { - coreList_.AddEntriesFrom(input, _repeated_coreList_codec); + case 8: { + Cores = input.ReadInt32(); break; } } @@ -2176,99 +2241,47 @@ namespace Grpc.Testing { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class ServerArgs : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServerArgs()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class Void : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Void()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[12]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[13]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public ServerArgs() { + public Void() { OnConstruction(); } partial void OnConstruction(); - public ServerArgs(ServerArgs other) : this() { - switch (other.ArgtypeCase) { - case ArgtypeOneofCase.Setup: - Setup = other.Setup.Clone(); - break; - case ArgtypeOneofCase.Mark: - Mark = other.Mark.Clone(); - break; - } - - } - - public ServerArgs Clone() { - return new ServerArgs(this); - } - - /// Field number for the "setup" field. - public const int SetupFieldNumber = 1; - public global::Grpc.Testing.ServerConfig Setup { - get { return argtypeCase_ == ArgtypeOneofCase.Setup ? (global::Grpc.Testing.ServerConfig) argtype_ : null; } - set { - argtype_ = value; - argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Setup; - } - } - - /// Field number for the "mark" field. - public const int MarkFieldNumber = 2; - public global::Grpc.Testing.Mark Mark { - get { return argtypeCase_ == ArgtypeOneofCase.Mark ? (global::Grpc.Testing.Mark) argtype_ : null; } - set { - argtype_ = value; - argtypeCase_ = value == null ? ArgtypeOneofCase.None : ArgtypeOneofCase.Mark; - } - } - - private object argtype_; - /// Enum of possible cases for the "argtype" oneof. - public enum ArgtypeOneofCase { - None = 0, - Setup = 1, - Mark = 2, - } - private ArgtypeOneofCase argtypeCase_ = ArgtypeOneofCase.None; - public ArgtypeOneofCase ArgtypeCase { - get { return argtypeCase_; } + public Void(Void other) : this() { } - public void ClearArgtype() { - argtypeCase_ = ArgtypeOneofCase.None; - argtype_ = null; + public Void Clone() { + return new Void(this); } public override bool Equals(object other) { - return Equals(other as ServerArgs); + return Equals(other as Void); } - public bool Equals(ServerArgs other) { + public bool Equals(Void other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(Setup, other.Setup)) return false; - if (!object.Equals(Mark, other.Mark)) return false; - if (ArgtypeCase != other.ArgtypeCase) return false; return true; } public override int GetHashCode() { int hash = 1; - if (argtypeCase_ == ArgtypeOneofCase.Setup) hash ^= Setup.GetHashCode(); - if (argtypeCase_ == ArgtypeOneofCase.Mark) hash ^= Mark.GetHashCode(); - hash ^= (int) argtypeCase_; return hash; } @@ -2277,40 +2290,17 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (argtypeCase_ == ArgtypeOneofCase.Setup) { - output.WriteRawTag(10); - output.WriteMessage(Setup); - } - if (argtypeCase_ == ArgtypeOneofCase.Mark) { - output.WriteRawTag(18); - output.WriteMessage(Mark); - } } public int CalculateSize() { int size = 0; - if (argtypeCase_ == ArgtypeOneofCase.Setup) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Setup); - } - if (argtypeCase_ == ArgtypeOneofCase.Mark) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Mark); - } return size; } - public void MergeFrom(ServerArgs other) { + public void MergeFrom(Void other) { if (other == null) { return; } - switch (other.ArgtypeCase) { - case ArgtypeOneofCase.Setup: - Setup = other.Setup; - break; - case ArgtypeOneofCase.Mark: - Mark = other.Mark; - break; - } - } public void MergeFrom(pb::CodedInputStream input) { @@ -2320,117 +2310,185 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 10: { - global::Grpc.Testing.ServerConfig subBuilder = new global::Grpc.Testing.ServerConfig(); - if (argtypeCase_ == ArgtypeOneofCase.Setup) { - subBuilder.MergeFrom(Setup); - } - input.ReadMessage(subBuilder); - Setup = subBuilder; - break; - } - case 18: { - global::Grpc.Testing.Mark subBuilder = new global::Grpc.Testing.Mark(); - if (argtypeCase_ == ArgtypeOneofCase.Mark) { - subBuilder.MergeFrom(Mark); - } - input.ReadMessage(subBuilder); - Mark = subBuilder; - break; - } } } } } + /// + /// A single performance scenario: input to qps_json_driver + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class ServerStatus : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ServerStatus()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class Scenario : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Scenario()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[13]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[14]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public ServerStatus() { + public Scenario() { OnConstruction(); } partial void OnConstruction(); - public ServerStatus(ServerStatus other) : this() { - Stats = other.stats_ != null ? other.Stats.Clone() : null; - port_ = other.port_; - cores_ = other.cores_; + public Scenario(Scenario other) : this() { + name_ = other.name_; + ClientConfig = other.clientConfig_ != null ? other.ClientConfig.Clone() : null; + numClients_ = other.numClients_; + ServerConfig = other.serverConfig_ != null ? other.ServerConfig.Clone() : null; + numServers_ = other.numServers_; + warmupSeconds_ = other.warmupSeconds_; + benchmarkSeconds_ = other.benchmarkSeconds_; + spawnLocalWorkerCount_ = other.spawnLocalWorkerCount_; } - public ServerStatus Clone() { - return new ServerStatus(this); + public Scenario Clone() { + return new Scenario(this); } - /// Field number for the "stats" field. - public const int StatsFieldNumber = 1; - private global::Grpc.Testing.ServerStats stats_; - public global::Grpc.Testing.ServerStats Stats { - get { return stats_; } + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Human readable name for this scenario + /// + public string Name { + get { return name_; } set { - stats_ = value; + name_ = pb::Preconditions.CheckNotNull(value, "value"); } } - /// Field number for the "port" field. - public const int PortFieldNumber = 2; - private int port_; + /// Field number for the "client_config" field. + public const int ClientConfigFieldNumber = 2; + private global::Grpc.Testing.ClientConfig clientConfig_; /// - /// the port bound by the server + /// Client configuration /// - public int Port { - get { return port_; } + public global::Grpc.Testing.ClientConfig ClientConfig { + get { return clientConfig_; } set { - port_ = value; + clientConfig_ = value; } } - /// Field number for the "cores" field. - public const int CoresFieldNumber = 3; - private int cores_; + /// Field number for the "num_clients" field. + public const int NumClientsFieldNumber = 3; + private int numClients_; /// - /// Number of cores available to the server + /// Number of clients to start for the test /// - public int Cores { - get { return cores_; } + public int NumClients { + get { return numClients_; } set { - cores_ = value; + numClients_ = value; + } + } + + /// Field number for the "server_config" field. + public const int ServerConfigFieldNumber = 4; + private global::Grpc.Testing.ServerConfig serverConfig_; + /// + /// Server configuration + /// + public global::Grpc.Testing.ServerConfig ServerConfig { + get { return serverConfig_; } + set { + serverConfig_ = value; + } + } + + /// Field number for the "num_servers" field. + public const int NumServersFieldNumber = 5; + private int numServers_; + /// + /// Number of servers to start for the test + /// + public int NumServers { + get { return numServers_; } + set { + numServers_ = value; + } + } + + /// Field number for the "warmup_seconds" field. + public const int WarmupSecondsFieldNumber = 6; + private int warmupSeconds_; + /// + /// Warmup period, in seconds + /// + public int WarmupSeconds { + get { return warmupSeconds_; } + set { + warmupSeconds_ = value; + } + } + + /// Field number for the "benchmark_seconds" field. + public const int BenchmarkSecondsFieldNumber = 7; + private int benchmarkSeconds_; + /// + /// Benchmark time, in seconds + /// + public int BenchmarkSeconds { + get { return benchmarkSeconds_; } + set { + benchmarkSeconds_ = value; + } + } + + /// Field number for the "spawn_local_worker_count" field. + public const int SpawnLocalWorkerCountFieldNumber = 8; + private int spawnLocalWorkerCount_; + /// + /// Number of workers to spawn locally (usually zero) + /// + public int SpawnLocalWorkerCount { + get { return spawnLocalWorkerCount_; } + set { + spawnLocalWorkerCount_ = value; } } public override bool Equals(object other) { - return Equals(other as ServerStatus); + return Equals(other as Scenario); } - public bool Equals(ServerStatus other) { + public bool Equals(Scenario other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(Stats, other.Stats)) return false; - if (Port != other.Port) return false; - if (Cores != other.Cores) return false; + if (Name != other.Name) return false; + if (!object.Equals(ClientConfig, other.ClientConfig)) return false; + if (NumClients != other.NumClients) return false; + if (!object.Equals(ServerConfig, other.ServerConfig)) return false; + if (NumServers != other.NumServers) return false; + if (WarmupSeconds != other.WarmupSeconds) return false; + if (BenchmarkSeconds != other.BenchmarkSeconds) return false; + if (SpawnLocalWorkerCount != other.SpawnLocalWorkerCount) return false; return true; } public override int GetHashCode() { int hash = 1; - if (stats_ != null) hash ^= Stats.GetHashCode(); - if (Port != 0) hash ^= Port.GetHashCode(); - if (Cores != 0) hash ^= Cores.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (clientConfig_ != null) hash ^= ClientConfig.GetHashCode(); + if (NumClients != 0) hash ^= NumClients.GetHashCode(); + if (serverConfig_ != null) hash ^= ServerConfig.GetHashCode(); + if (NumServers != 0) hash ^= NumServers.GetHashCode(); + if (WarmupSeconds != 0) hash ^= WarmupSeconds.GetHashCode(); + if (BenchmarkSeconds != 0) hash ^= BenchmarkSeconds.GetHashCode(); + if (SpawnLocalWorkerCount != 0) hash ^= SpawnLocalWorkerCount.GetHashCode(); return hash; } @@ -2439,49 +2497,102 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (stats_ != null) { + if (Name.Length != 0) { output.WriteRawTag(10); - output.WriteMessage(Stats); + output.WriteString(Name); } - if (Port != 0) { - output.WriteRawTag(16); - output.WriteInt32(Port); + if (clientConfig_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ClientConfig); } - if (Cores != 0) { + if (NumClients != 0) { output.WriteRawTag(24); - output.WriteInt32(Cores); + output.WriteInt32(NumClients); + } + if (serverConfig_ != null) { + output.WriteRawTag(34); + output.WriteMessage(ServerConfig); + } + if (NumServers != 0) { + output.WriteRawTag(40); + output.WriteInt32(NumServers); + } + if (WarmupSeconds != 0) { + output.WriteRawTag(48); + output.WriteInt32(WarmupSeconds); + } + if (BenchmarkSeconds != 0) { + output.WriteRawTag(56); + output.WriteInt32(BenchmarkSeconds); + } + if (SpawnLocalWorkerCount != 0) { + output.WriteRawTag(64); + output.WriteInt32(SpawnLocalWorkerCount); } } public int CalculateSize() { int size = 0; - if (stats_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stats); + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } - if (Port != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port); + if (clientConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClientConfig); } - if (Cores != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Cores); + if (NumClients != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumClients); + } + if (serverConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ServerConfig); + } + if (NumServers != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumServers); + } + if (WarmupSeconds != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WarmupSeconds); + } + if (BenchmarkSeconds != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(BenchmarkSeconds); + } + if (SpawnLocalWorkerCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SpawnLocalWorkerCount); } return size; } - public void MergeFrom(ServerStatus other) { + public void MergeFrom(Scenario other) { if (other == null) { return; } - if (other.stats_ != null) { - if (stats_ == null) { - stats_ = new global::Grpc.Testing.ServerStats(); + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.clientConfig_ != null) { + if (clientConfig_ == null) { + clientConfig_ = new global::Grpc.Testing.ClientConfig(); } - Stats.MergeFrom(other.Stats); + ClientConfig.MergeFrom(other.ClientConfig); } - if (other.Port != 0) { - Port = other.Port; + if (other.NumClients != 0) { + NumClients = other.NumClients; } - if (other.Cores != 0) { - Cores = other.Cores; + if (other.serverConfig_ != null) { + if (serverConfig_ == null) { + serverConfig_ = new global::Grpc.Testing.ServerConfig(); + } + ServerConfig.MergeFrom(other.ServerConfig); + } + if (other.NumServers != 0) { + NumServers = other.NumServers; + } + if (other.WarmupSeconds != 0) { + WarmupSeconds = other.WarmupSeconds; + } + if (other.BenchmarkSeconds != 0) { + BenchmarkSeconds = other.BenchmarkSeconds; + } + if (other.SpawnLocalWorkerCount != 0) { + SpawnLocalWorkerCount = other.SpawnLocalWorkerCount; } } @@ -2493,18 +2604,41 @@ namespace Grpc.Testing { input.SkipLastField(); break; case 10: { - if (stats_ == null) { - stats_ = new global::Grpc.Testing.ServerStats(); + Name = input.ReadString(); + break; + } + case 18: { + if (clientConfig_ == null) { + clientConfig_ = new global::Grpc.Testing.ClientConfig(); } - input.ReadMessage(stats_); + input.ReadMessage(clientConfig_); + break; + } + case 24: { + NumClients = input.ReadInt32(); + break; + } + case 34: { + if (serverConfig_ == null) { + serverConfig_ = new global::Grpc.Testing.ServerConfig(); + } + input.ReadMessage(serverConfig_); break; } - case 16: { - Port = input.ReadInt32(); + case 40: { + NumServers = input.ReadInt32(); break; } - case 24: { - Cores = input.ReadInt32(); + case 48: { + WarmupSeconds = input.ReadInt32(); + break; + } + case 56: { + BenchmarkSeconds = input.ReadInt32(); + break; + } + case 64: { + SpawnLocalWorkerCount = input.ReadInt32(); break; } } @@ -2513,48 +2647,63 @@ namespace Grpc.Testing { } + /// + /// A set of scenarios to be run with qps_json_driver + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class CoreRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CoreRequest()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class Scenarios : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Scenarios()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[14]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[15]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public CoreRequest() { + public Scenarios() { OnConstruction(); } partial void OnConstruction(); - public CoreRequest(CoreRequest other) : this() { + public Scenarios(Scenarios other) : this() { + scenarios_ = other.scenarios_.Clone(); } - public CoreRequest Clone() { - return new CoreRequest(this); + public Scenarios Clone() { + return new Scenarios(this); + } + + /// Field number for the "scenarios" field. + public const int Scenarios_FieldNumber = 1; + private static readonly pb::FieldCodec _repeated_scenarios_codec + = pb::FieldCodec.ForMessage(10, global::Grpc.Testing.Scenario.Parser); + private readonly pbc::RepeatedField scenarios_ = new pbc::RepeatedField(); + public pbc::RepeatedField Scenarios_ { + get { return scenarios_; } } public override bool Equals(object other) { - return Equals(other as CoreRequest); + return Equals(other as Scenarios); } - public bool Equals(CoreRequest other) { + public bool Equals(Scenarios other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } + if(!scenarios_.Equals(other.scenarios_)) return false; return true; } public override int GetHashCode() { int hash = 1; + hash ^= scenarios_.GetHashCode(); return hash; } @@ -2563,17 +2712,20 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { + scenarios_.WriteTo(output, _repeated_scenarios_codec); } public int CalculateSize() { int size = 0; + size += scenarios_.CalculateSize(_repeated_scenarios_codec); return size; } - public void MergeFrom(CoreRequest other) { + public void MergeFrom(Scenarios other) { if (other == null) { return; } + scenarios_.Add(other.scenarios_); } public void MergeFrom(pb::CodedInputStream input) { @@ -2583,70 +2735,226 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; + case 10: { + scenarios_.AddEntriesFrom(input, _repeated_scenarios_codec); + break; + } } } } } + /// + /// Basic summary that can be computed from ClientStats and ServerStats + /// once the scenario has finished. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class CoreResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CoreResponse()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class ScenarioResultSummary : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ScenarioResultSummary()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[15]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[16]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public CoreResponse() { + public ScenarioResultSummary() { OnConstruction(); } partial void OnConstruction(); - public CoreResponse(CoreResponse other) : this() { - cores_ = other.cores_; + public ScenarioResultSummary(ScenarioResultSummary other) : this() { + qps_ = other.qps_; + qpsPerServerCore_ = other.qpsPerServerCore_; + serverSystemTime_ = other.serverSystemTime_; + serverUserTime_ = other.serverUserTime_; + clientSystemTime_ = other.clientSystemTime_; + clientUserTime_ = other.clientUserTime_; + latency50_ = other.latency50_; + latency90_ = other.latency90_; + latency95_ = other.latency95_; + latency99_ = other.latency99_; + latency999_ = other.latency999_; } - public CoreResponse Clone() { - return new CoreResponse(this); + public ScenarioResultSummary Clone() { + return new ScenarioResultSummary(this); } - /// Field number for the "cores" field. - public const int CoresFieldNumber = 1; - private int cores_; + /// Field number for the "qps" field. + public const int QpsFieldNumber = 1; + private double qps_; /// - /// Number of cores available on the server + /// Total number of operations per second over all clients. /// - public int Cores { - get { return cores_; } + public double Qps { + get { return qps_; } set { - cores_ = value; + qps_ = value; + } + } + + /// Field number for the "qps_per_server_core" field. + public const int QpsPerServerCoreFieldNumber = 2; + private double qpsPerServerCore_; + /// + /// QPS per one server core. + /// + public double QpsPerServerCore { + get { return qpsPerServerCore_; } + set { + qpsPerServerCore_ = value; + } + } + + /// Field number for the "server_system_time" field. + public const int ServerSystemTimeFieldNumber = 3; + private double serverSystemTime_; + /// + /// server load based on system_time (0.85 => 85%) + /// + public double ServerSystemTime { + get { return serverSystemTime_; } + set { + serverSystemTime_ = value; + } + } + + /// Field number for the "server_user_time" field. + public const int ServerUserTimeFieldNumber = 4; + private double serverUserTime_; + /// + /// server load based on user_time (0.85 => 85%) + /// + public double ServerUserTime { + get { return serverUserTime_; } + set { + serverUserTime_ = value; + } + } + + /// Field number for the "client_system_time" field. + public const int ClientSystemTimeFieldNumber = 5; + private double clientSystemTime_; + /// + /// client load based on system_time (0.85 => 85%) + /// + public double ClientSystemTime { + get { return clientSystemTime_; } + set { + clientSystemTime_ = value; + } + } + + /// Field number for the "client_user_time" field. + public const int ClientUserTimeFieldNumber = 6; + private double clientUserTime_; + /// + /// client load based on user_time (0.85 => 85%) + /// + public double ClientUserTime { + get { return clientUserTime_; } + set { + clientUserTime_ = value; + } + } + + /// Field number for the "latency_50" field. + public const int Latency50FieldNumber = 7; + private double latency50_; + /// + /// X% latency percentiles (in nanoseconds) + /// + public double Latency50 { + get { return latency50_; } + set { + latency50_ = value; + } + } + + /// Field number for the "latency_90" field. + public const int Latency90FieldNumber = 8; + private double latency90_; + public double Latency90 { + get { return latency90_; } + set { + latency90_ = value; + } + } + + /// Field number for the "latency_95" field. + public const int Latency95FieldNumber = 9; + private double latency95_; + public double Latency95 { + get { return latency95_; } + set { + latency95_ = value; + } + } + + /// Field number for the "latency_99" field. + public const int Latency99FieldNumber = 10; + private double latency99_; + public double Latency99 { + get { return latency99_; } + set { + latency99_ = value; + } + } + + /// Field number for the "latency_999" field. + public const int Latency999FieldNumber = 11; + private double latency999_; + public double Latency999 { + get { return latency999_; } + set { + latency999_ = value; } } public override bool Equals(object other) { - return Equals(other as CoreResponse); + return Equals(other as ScenarioResultSummary); } - public bool Equals(CoreResponse other) { + public bool Equals(ScenarioResultSummary other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Cores != other.Cores) return false; + if (Qps != other.Qps) return false; + if (QpsPerServerCore != other.QpsPerServerCore) return false; + if (ServerSystemTime != other.ServerSystemTime) return false; + if (ServerUserTime != other.ServerUserTime) return false; + if (ClientSystemTime != other.ClientSystemTime) return false; + if (ClientUserTime != other.ClientUserTime) return false; + if (Latency50 != other.Latency50) return false; + if (Latency90 != other.Latency90) return false; + if (Latency95 != other.Latency95) return false; + if (Latency99 != other.Latency99) return false; + if (Latency999 != other.Latency999) return false; return true; } public override int GetHashCode() { int hash = 1; - if (Cores != 0) hash ^= Cores.GetHashCode(); + if (Qps != 0D) hash ^= Qps.GetHashCode(); + if (QpsPerServerCore != 0D) hash ^= QpsPerServerCore.GetHashCode(); + if (ServerSystemTime != 0D) hash ^= ServerSystemTime.GetHashCode(); + if (ServerUserTime != 0D) hash ^= ServerUserTime.GetHashCode(); + if (ClientSystemTime != 0D) hash ^= ClientSystemTime.GetHashCode(); + if (ClientUserTime != 0D) hash ^= ClientUserTime.GetHashCode(); + if (Latency50 != 0D) hash ^= Latency50.GetHashCode(); + if (Latency90 != 0D) hash ^= Latency90.GetHashCode(); + if (Latency95 != 0D) hash ^= Latency95.GetHashCode(); + if (Latency99 != 0D) hash ^= Latency99.GetHashCode(); + if (Latency999 != 0D) hash ^= Latency999.GetHashCode(); return hash; } @@ -2655,26 +2963,126 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { - if (Cores != 0) { - output.WriteRawTag(8); - output.WriteInt32(Cores); + if (Qps != 0D) { + output.WriteRawTag(9); + output.WriteDouble(Qps); + } + if (QpsPerServerCore != 0D) { + output.WriteRawTag(17); + output.WriteDouble(QpsPerServerCore); + } + if (ServerSystemTime != 0D) { + output.WriteRawTag(25); + output.WriteDouble(ServerSystemTime); + } + if (ServerUserTime != 0D) { + output.WriteRawTag(33); + output.WriteDouble(ServerUserTime); + } + if (ClientSystemTime != 0D) { + output.WriteRawTag(41); + output.WriteDouble(ClientSystemTime); + } + if (ClientUserTime != 0D) { + output.WriteRawTag(49); + output.WriteDouble(ClientUserTime); + } + if (Latency50 != 0D) { + output.WriteRawTag(57); + output.WriteDouble(Latency50); + } + if (Latency90 != 0D) { + output.WriteRawTag(65); + output.WriteDouble(Latency90); + } + if (Latency95 != 0D) { + output.WriteRawTag(73); + output.WriteDouble(Latency95); + } + if (Latency99 != 0D) { + output.WriteRawTag(81); + output.WriteDouble(Latency99); + } + if (Latency999 != 0D) { + output.WriteRawTag(89); + output.WriteDouble(Latency999); } } public int CalculateSize() { int size = 0; - if (Cores != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Cores); + if (Qps != 0D) { + size += 1 + 8; + } + if (QpsPerServerCore != 0D) { + size += 1 + 8; + } + if (ServerSystemTime != 0D) { + size += 1 + 8; + } + if (ServerUserTime != 0D) { + size += 1 + 8; + } + if (ClientSystemTime != 0D) { + size += 1 + 8; + } + if (ClientUserTime != 0D) { + size += 1 + 8; + } + if (Latency50 != 0D) { + size += 1 + 8; + } + if (Latency90 != 0D) { + size += 1 + 8; + } + if (Latency95 != 0D) { + size += 1 + 8; + } + if (Latency99 != 0D) { + size += 1 + 8; + } + if (Latency999 != 0D) { + size += 1 + 8; } return size; } - public void MergeFrom(CoreResponse other) { + public void MergeFrom(ScenarioResultSummary other) { if (other == null) { return; } - if (other.Cores != 0) { - Cores = other.Cores; + if (other.Qps != 0D) { + Qps = other.Qps; + } + if (other.QpsPerServerCore != 0D) { + QpsPerServerCore = other.QpsPerServerCore; + } + if (other.ServerSystemTime != 0D) { + ServerSystemTime = other.ServerSystemTime; + } + if (other.ServerUserTime != 0D) { + ServerUserTime = other.ServerUserTime; + } + if (other.ClientSystemTime != 0D) { + ClientSystemTime = other.ClientSystemTime; + } + if (other.ClientUserTime != 0D) { + ClientUserTime = other.ClientUserTime; + } + if (other.Latency50 != 0D) { + Latency50 = other.Latency50; + } + if (other.Latency90 != 0D) { + Latency90 = other.Latency90; + } + if (other.Latency95 != 0D) { + Latency95 = other.Latency95; + } + if (other.Latency99 != 0D) { + Latency99 = other.Latency99; + } + if (other.Latency999 != 0D) { + Latency999 = other.Latency999; } } @@ -2685,8 +3093,48 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; - case 8: { - Cores = input.ReadInt32(); + case 9: { + Qps = input.ReadDouble(); + break; + } + case 17: { + QpsPerServerCore = input.ReadDouble(); + break; + } + case 25: { + ServerSystemTime = input.ReadDouble(); + break; + } + case 33: { + ServerUserTime = input.ReadDouble(); + break; + } + case 41: { + ClientSystemTime = input.ReadDouble(); + break; + } + case 49: { + ClientUserTime = input.ReadDouble(); + break; + } + case 57: { + Latency50 = input.ReadDouble(); + break; + } + case 65: { + Latency90 = input.ReadDouble(); + break; + } + case 73: { + Latency95 = input.ReadDouble(); + break; + } + case 81: { + Latency99 = input.ReadDouble(); + break; + } + case 89: { + Latency999 = input.ReadDouble(); break; } } @@ -2695,48 +3143,144 @@ namespace Grpc.Testing { } + /// + /// Results of a single benchmark scenario. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public sealed partial class Void : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Void()); - public static pb::MessageParser Parser { get { return _parser; } } + public sealed partial class ScenarioResult : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ScenarioResult()); + public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[16]; } + get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[17]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } - public Void() { + public ScenarioResult() { OnConstruction(); } partial void OnConstruction(); - public Void(Void other) : this() { + public ScenarioResult(ScenarioResult other) : this() { + Scenario = other.scenario_ != null ? other.Scenario.Clone() : null; + Latencies = other.latencies_ != null ? other.Latencies.Clone() : null; + clientStats_ = other.clientStats_.Clone(); + serverStats_ = other.serverStats_.Clone(); + serverCores_ = other.serverCores_.Clone(); + Summary = other.summary_ != null ? other.Summary.Clone() : null; } - public Void Clone() { - return new Void(this); + public ScenarioResult Clone() { + return new ScenarioResult(this); + } + + /// Field number for the "scenario" field. + public const int ScenarioFieldNumber = 1; + private global::Grpc.Testing.Scenario scenario_; + /// + /// Inputs used to run the scenario. + /// + public global::Grpc.Testing.Scenario Scenario { + get { return scenario_; } + set { + scenario_ = value; + } + } + + /// Field number for the "latencies" field. + public const int LatenciesFieldNumber = 2; + private global::Grpc.Testing.HistogramData latencies_; + /// + /// Histograms from all clients merged into one histogram. + /// + public global::Grpc.Testing.HistogramData Latencies { + get { return latencies_; } + set { + latencies_ = value; + } + } + + /// Field number for the "client_stats" field. + public const int ClientStatsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_clientStats_codec + = pb::FieldCodec.ForMessage(26, global::Grpc.Testing.ClientStats.Parser); + private readonly pbc::RepeatedField clientStats_ = new pbc::RepeatedField(); + /// + /// Client stats for each client + /// + public pbc::RepeatedField ClientStats { + get { return clientStats_; } + } + + /// Field number for the "server_stats" field. + public const int ServerStatsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_serverStats_codec + = pb::FieldCodec.ForMessage(34, global::Grpc.Testing.ServerStats.Parser); + private readonly pbc::RepeatedField serverStats_ = new pbc::RepeatedField(); + /// + /// Server stats for each server + /// + public pbc::RepeatedField ServerStats { + get { return serverStats_; } + } + + /// Field number for the "server_cores" field. + public const int ServerCoresFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_serverCores_codec + = pb::FieldCodec.ForInt32(42); + private readonly pbc::RepeatedField serverCores_ = new pbc::RepeatedField(); + /// + /// Number of cores available to each server + /// + public pbc::RepeatedField ServerCores { + get { return serverCores_; } + } + + /// Field number for the "summary" field. + public const int SummaryFieldNumber = 6; + private global::Grpc.Testing.ScenarioResultSummary summary_; + /// + /// An after-the-fact computed summary + /// + public global::Grpc.Testing.ScenarioResultSummary Summary { + get { return summary_; } + set { + summary_ = value; + } } public override bool Equals(object other) { - return Equals(other as Void); + return Equals(other as ScenarioResult); } - public bool Equals(Void other) { + public bool Equals(ScenarioResult other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } + if (!object.Equals(Scenario, other.Scenario)) return false; + if (!object.Equals(Latencies, other.Latencies)) return false; + if(!clientStats_.Equals(other.clientStats_)) return false; + if(!serverStats_.Equals(other.serverStats_)) return false; + if(!serverCores_.Equals(other.serverCores_)) return false; + if (!object.Equals(Summary, other.Summary)) return false; return true; } public override int GetHashCode() { int hash = 1; + if (scenario_ != null) hash ^= Scenario.GetHashCode(); + if (latencies_ != null) hash ^= Latencies.GetHashCode(); + hash ^= clientStats_.GetHashCode(); + hash ^= serverStats_.GetHashCode(); + hash ^= serverCores_.GetHashCode(); + if (summary_ != null) hash ^= Summary.GetHashCode(); return hash; } @@ -2745,17 +3289,65 @@ namespace Grpc.Testing { } public void WriteTo(pb::CodedOutputStream output) { + if (scenario_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Scenario); + } + if (latencies_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Latencies); + } + clientStats_.WriteTo(output, _repeated_clientStats_codec); + serverStats_.WriteTo(output, _repeated_serverStats_codec); + serverCores_.WriteTo(output, _repeated_serverCores_codec); + if (summary_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Summary); + } } public int CalculateSize() { int size = 0; + if (scenario_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Scenario); + } + if (latencies_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Latencies); + } + size += clientStats_.CalculateSize(_repeated_clientStats_codec); + size += serverStats_.CalculateSize(_repeated_serverStats_codec); + size += serverCores_.CalculateSize(_repeated_serverCores_codec); + if (summary_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Summary); + } return size; } - public void MergeFrom(Void other) { + public void MergeFrom(ScenarioResult other) { if (other == null) { return; } + if (other.scenario_ != null) { + if (scenario_ == null) { + scenario_ = new global::Grpc.Testing.Scenario(); + } + Scenario.MergeFrom(other.Scenario); + } + if (other.latencies_ != null) { + if (latencies_ == null) { + latencies_ = new global::Grpc.Testing.HistogramData(); + } + Latencies.MergeFrom(other.Latencies); + } + clientStats_.Add(other.clientStats_); + serverStats_.Add(other.serverStats_); + serverCores_.Add(other.serverCores_); + if (other.summary_ != null) { + if (summary_ == null) { + summary_ = new global::Grpc.Testing.ScenarioResultSummary(); + } + Summary.MergeFrom(other.Summary); + } } public void MergeFrom(pb::CodedInputStream input) { @@ -2765,6 +3357,40 @@ namespace Grpc.Testing { default: input.SkipLastField(); break; + case 10: { + if (scenario_ == null) { + scenario_ = new global::Grpc.Testing.Scenario(); + } + input.ReadMessage(scenario_); + break; + } + case 18: { + if (latencies_ == null) { + latencies_ = new global::Grpc.Testing.HistogramData(); + } + input.ReadMessage(latencies_); + break; + } + case 26: { + clientStats_.AddEntriesFrom(input, _repeated_clientStats_codec); + break; + } + case 34: { + serverStats_.AddEntriesFrom(input, _repeated_serverStats_codec); + break; + } + case 42: + case 40: { + serverCores_.AddEntriesFrom(input, _repeated_serverCores_codec); + break; + } + case 50: { + if (summary_ == null) { + summary_ = new global::Grpc.Testing.ScenarioResultSummary(); + } + input.ReadMessage(summary_); + break; + } } } } diff --git a/src/csharp/Grpc.IntegrationTesting/Messages.cs b/src/csharp/Grpc.IntegrationTesting/Messages.cs index 7ca47860f65..fcff4759417 100644 --- a/src/csharp/Grpc.IntegrationTesting/Messages.cs +++ b/src/csharp/Grpc.IntegrationTesting/Messages.cs @@ -47,11 +47,12 @@ namespace Grpc.Testing { "c3Npb24YBiABKA4yHS5ncnBjLnRlc3RpbmcuQ29tcHJlc3Npb25UeXBlEjEK", "D3Jlc3BvbnNlX3N0YXR1cxgHIAEoCzIYLmdycGMudGVzdGluZy5FY2hvU3Rh", "dHVzIkUKG1N0cmVhbWluZ091dHB1dENhbGxSZXNwb25zZRImCgdwYXlsb2Fk", - "GAEgASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQiMwoNUmVjb25uZWN0SW5m", - "bxIOCgZwYXNzZWQYASABKAgSEgoKYmFja29mZl9tcxgCIAMoBSo/CgtQYXls", - "b2FkVHlwZRIQCgxDT01QUkVTU0FCTEUQABISCg5VTkNPTVBSRVNTQUJMRRAB", - "EgoKBlJBTkRPTRACKjIKD0NvbXByZXNzaW9uVHlwZRIICgROT05FEAASCAoE", - "R1pJUBABEgsKB0RFRkxBVEUQAmIGcHJvdG8z")); + "GAEgASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQiMwoPUmVjb25uZWN0UGFy", + "YW1zEiAKGG1heF9yZWNvbm5lY3RfYmFja29mZl9tcxgBIAEoBSIzCg1SZWNv", + "bm5lY3RJbmZvEg4KBnBhc3NlZBgBIAEoCBISCgpiYWNrb2ZmX21zGAIgAygF", + "Kj8KC1BheWxvYWRUeXBlEhAKDENPTVBSRVNTQUJMRRAAEhIKDlVOQ09NUFJF", + "U1NBQkxFEAESCgoGUkFORE9NEAIqMgoPQ29tcHJlc3Npb25UeXBlEggKBE5P", + "TkUQABIICgRHWklQEAESCwoHREVGTEFURRACYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), typeof(global::Grpc.Testing.CompressionType), }, new pbr::GeneratedCodeInfo[] { @@ -64,6 +65,7 @@ namespace Grpc.Testing { new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs" }, null, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingOutputCallRequest), global::Grpc.Testing.StreamingOutputCallRequest.Parser, new[]{ "ResponseType", "ResponseParameters", "Payload", "ResponseCompression", "ResponseStatus" }, null, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingOutputCallResponse), global::Grpc.Testing.StreamingOutputCallResponse.Parser, new[]{ "Payload" }, null, null, null), + new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ReconnectParams), global::Grpc.Testing.ReconnectParams.Parser, new[]{ "MaxReconnectBackoffMs" }, null, null, null), new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ReconnectInfo), global::Grpc.Testing.ReconnectInfo.Parser, new[]{ "Passed", "BackoffMs" }, null, null, null) })); } @@ -1572,6 +1574,113 @@ namespace Grpc.Testing { } + /// + /// For reconnect interop test only. + /// Client tells server what reconnection parameters it used. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class ReconnectParams : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReconnectParams()); + public static pb::MessageParser Parser { get { return _parser; } } + + public static pbr::MessageDescriptor Descriptor { + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[9]; } + } + + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + public ReconnectParams() { + OnConstruction(); + } + + partial void OnConstruction(); + + public ReconnectParams(ReconnectParams other) : this() { + maxReconnectBackoffMs_ = other.maxReconnectBackoffMs_; + } + + public ReconnectParams Clone() { + return new ReconnectParams(this); + } + + /// Field number for the "max_reconnect_backoff_ms" field. + public const int MaxReconnectBackoffMsFieldNumber = 1; + private int maxReconnectBackoffMs_; + public int MaxReconnectBackoffMs { + get { return maxReconnectBackoffMs_; } + set { + maxReconnectBackoffMs_ = value; + } + } + + public override bool Equals(object other) { + return Equals(other as ReconnectParams); + } + + public bool Equals(ReconnectParams other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MaxReconnectBackoffMs != other.MaxReconnectBackoffMs) return false; + return true; + } + + public override int GetHashCode() { + int hash = 1; + if (MaxReconnectBackoffMs != 0) hash ^= MaxReconnectBackoffMs.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (MaxReconnectBackoffMs != 0) { + output.WriteRawTag(8); + output.WriteInt32(MaxReconnectBackoffMs); + } + } + + public int CalculateSize() { + int size = 0; + if (MaxReconnectBackoffMs != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxReconnectBackoffMs); + } + return size; + } + + public void MergeFrom(ReconnectParams other) { + if (other == null) { + return; + } + if (other.MaxReconnectBackoffMs != 0) { + MaxReconnectBackoffMs = other.MaxReconnectBackoffMs; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + MaxReconnectBackoffMs = input.ReadInt32(); + break; + } + } + } + } + + } + /// /// For reconnect interop test only. /// Server tells client whether its reconnects are following the spec and the @@ -1583,7 +1692,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[9]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[10]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { diff --git a/src/csharp/Grpc.IntegrationTesting/Test.cs b/src/csharp/Grpc.IntegrationTesting/Test.cs index 91e0a1e04c0..363f6444ec2 100644 --- a/src/csharp/Grpc.IntegrationTesting/Test.cs +++ b/src/csharp/Grpc.IntegrationTesting/Test.cs @@ -40,10 +40,10 @@ namespace Grpc.Testing { "bWluZ091dHB1dENhbGxSZXF1ZXN0GikuZ3JwYy50ZXN0aW5nLlN0cmVhbWlu", "Z091dHB1dENhbGxSZXNwb25zZSgBMAEyVQoUVW5pbXBsZW1lbnRlZFNlcnZp", "Y2USPQoRVW5pbXBsZW1lbnRlZENhbGwSEy5ncnBjLnRlc3RpbmcuRW1wdHka", - "Ey5ncnBjLnRlc3RpbmcuRW1wdHkyfwoQUmVjb25uZWN0U2VydmljZRIxCgVT", - "dGFydBITLmdycGMudGVzdGluZy5FbXB0eRoTLmdycGMudGVzdGluZy5FbXB0", - "eRI4CgRTdG9wEhMuZ3JwYy50ZXN0aW5nLkVtcHR5GhsuZ3JwYy50ZXN0aW5n", - "LlJlY29ubmVjdEluZm9iBnByb3RvMw==")); + "Ey5ncnBjLnRlc3RpbmcuRW1wdHkyiQEKEFJlY29ubmVjdFNlcnZpY2USOwoF", + "U3RhcnQSHS5ncnBjLnRlc3RpbmcuUmVjb25uZWN0UGFyYW1zGhMuZ3JwYy50", + "ZXN0aW5nLkVtcHR5EjgKBFN0b3ASEy5ncnBjLnRlc3RpbmcuRW1wdHkaGy5n", + "cnBjLnRlc3RpbmcuUmVjb25uZWN0SW5mb2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Grpc.Testing.EmptyReflection.Descriptor, global::Grpc.Testing.MessagesReflection.Descriptor, }, new pbr::GeneratedCodeInfo(null, null)); diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index b84ec2d984a..31746cbe715 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -367,14 +367,15 @@ namespace Grpc.Testing { { static readonly string __ServiceName = "grpc.testing.ReconnectService"; + static readonly Marshaller __Marshaller_ReconnectParams = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectParams.Parser.ParseFrom); static readonly Marshaller __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom); static readonly Marshaller __Marshaller_ReconnectInfo = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom); - static readonly Method __Method_Start = new Method( + static readonly Method __Method_Start = new Method( MethodType.Unary, __ServiceName, "Start", - __Marshaller_Empty, + __Marshaller_ReconnectParams, __Marshaller_Empty); static readonly Method __Method_Stop = new Method( @@ -394,10 +395,10 @@ namespace Grpc.Testing { [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IReconnectServiceClient { - global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, CallOptions options); - AsyncUnaryCall StartAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - AsyncUnaryCall StartAsync(global::Grpc.Testing.Empty request, CallOptions options); + global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options); + AsyncUnaryCall StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + AsyncUnaryCall StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options); global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options); AsyncUnaryCall StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); @@ -408,14 +409,14 @@ namespace Grpc.Testing { [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IReconnectService { - Task Start(global::Grpc.Testing.Empty request, ServerCallContext context); + Task Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context); Task Stop(global::Grpc.Testing.Empty request, ServerCallContext context); } // server-side abstract class public abstract class ReconnectServiceBase { - public virtual Task Start(global::Grpc.Testing.Empty request, ServerCallContext context) + public virtual Task Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -445,19 +446,19 @@ namespace Grpc.Testing { { } - public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return Start(request, new CallOptions(headers, deadline, cancellationToken)); } - public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, CallOptions options) + public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request); } - public virtual AsyncUnaryCall StartAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual AsyncUnaryCall StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return StartAsync(request, new CallOptions(headers, deadline, cancellationToken)); } - public virtual AsyncUnaryCall StartAsync(global::Grpc.Testing.Empty request, CallOptions options) + public virtual AsyncUnaryCall StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request); } diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto index 5db39d0298e..28769ef6538 100644 --- a/src/proto/grpc/testing/control.proto +++ b/src/proto/grpc/testing/control.proto @@ -57,18 +57,6 @@ message PoissonParams { double offered_load = 1; } -message UniformParams { - double interarrival_lo = 1; - double interarrival_hi = 2; -} - -message DeterministicParams { double offered_load = 1; } - -message ParetoParams { - double interarrival_base = 1; - double alpha = 2; -} - // Once an RPC finishes, immediately start a new one. // No configuration parameters needed. message ClosedLoopParams {} @@ -77,9 +65,6 @@ message LoadParams { oneof load { ClosedLoopParams closed_loop = 1; PoissonParams poisson = 2; - UniformParams uniform = 3; - DeterministicParams determ = 4; - ParetoParams pareto = 5; }; } diff --git a/src/ruby/qps/src/proto/grpc/testing/control.rb b/src/ruby/qps/src/proto/grpc/testing/control.rb index d007123f261..b81e22659d0 100644 --- a/src/ruby/qps/src/proto/grpc/testing/control.rb +++ b/src/ruby/qps/src/proto/grpc/testing/control.rb @@ -9,26 +9,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "grpc.testing.PoissonParams" do optional :offered_load, :double, 1 end - add_message "grpc.testing.UniformParams" do - optional :interarrival_lo, :double, 1 - optional :interarrival_hi, :double, 2 - end - add_message "grpc.testing.DeterministicParams" do - optional :offered_load, :double, 1 - end - add_message "grpc.testing.ParetoParams" do - optional :interarrival_base, :double, 1 - optional :alpha, :double, 2 - end add_message "grpc.testing.ClosedLoopParams" do end add_message "grpc.testing.LoadParams" do oneof :load do optional :closed_loop, :message, 1, "grpc.testing.ClosedLoopParams" optional :poisson, :message, 2, "grpc.testing.PoissonParams" - optional :uniform, :message, 3, "grpc.testing.UniformParams" - optional :determ, :message, 4, "grpc.testing.DeterministicParams" - optional :pareto, :message, 5, "grpc.testing.ParetoParams" end end add_message "grpc.testing.SecurityParams" do @@ -88,6 +74,40 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "grpc.testing.Void" do end + add_message "grpc.testing.Scenario" do + optional :name, :string, 1 + optional :client_config, :message, 2, "grpc.testing.ClientConfig" + optional :num_clients, :int32, 3 + optional :server_config, :message, 4, "grpc.testing.ServerConfig" + optional :num_servers, :int32, 5 + optional :warmup_seconds, :int32, 6 + optional :benchmark_seconds, :int32, 7 + optional :spawn_local_worker_count, :int32, 8 + end + add_message "grpc.testing.Scenarios" do + repeated :scenarios, :message, 1, "grpc.testing.Scenario" + end + add_message "grpc.testing.ScenarioResultSummary" do + optional :qps, :double, 1 + optional :qps_per_server_core, :double, 2 + optional :server_system_time, :double, 3 + optional :server_user_time, :double, 4 + optional :client_system_time, :double, 5 + optional :client_user_time, :double, 6 + optional :latency_50, :double, 7 + optional :latency_90, :double, 8 + optional :latency_95, :double, 9 + optional :latency_99, :double, 10 + optional :latency_999, :double, 11 + end + add_message "grpc.testing.ScenarioResult" do + optional :scenario, :message, 1, "grpc.testing.Scenario" + optional :latencies, :message, 2, "grpc.testing.HistogramData" + repeated :client_stats, :message, 3, "grpc.testing.ClientStats" + repeated :server_stats, :message, 4, "grpc.testing.ServerStats" + repeated :server_cores, :int32, 5 + optional :summary, :message, 6, "grpc.testing.ScenarioResultSummary" + end add_enum "grpc.testing.ClientType" do value :SYNC_CLIENT, 0 value :ASYNC_CLIENT, 1 @@ -106,9 +126,6 @@ end module Grpc module Testing PoissonParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.PoissonParams").msgclass - UniformParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.UniformParams").msgclass - DeterministicParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.DeterministicParams").msgclass - ParetoParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ParetoParams").msgclass ClosedLoopParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClosedLoopParams").msgclass LoadParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.LoadParams").msgclass SecurityParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.SecurityParams").msgclass @@ -122,6 +139,10 @@ module Grpc CoreRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.CoreRequest").msgclass CoreResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.CoreResponse").msgclass Void = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Void").msgclass + Scenario = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Scenario").msgclass + Scenarios = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Scenarios").msgclass + ScenarioResultSummary = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ScenarioResultSummary").msgclass + ScenarioResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ScenarioResult").msgclass ClientType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientType").enummodule ServerType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ServerType").enummodule RpcType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.RpcType").enummodule diff --git a/src/ruby/qps/src/proto/grpc/testing/messages.rb b/src/ruby/qps/src/proto/grpc/testing/messages.rb index b9c32dbef5d..2bdfe0eade3 100644 --- a/src/ruby/qps/src/proto/grpc/testing/messages.rb +++ b/src/ruby/qps/src/proto/grpc/testing/messages.rb @@ -46,6 +46,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "grpc.testing.StreamingOutputCallResponse" do optional :payload, :message, 1, "grpc.testing.Payload" end + add_message "grpc.testing.ReconnectParams" do + optional :max_reconnect_backoff_ms, :int32, 1 + end add_message "grpc.testing.ReconnectInfo" do optional :passed, :bool, 1 repeated :backoff_ms, :int32, 2 @@ -73,6 +76,7 @@ module Grpc ResponseParameters = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ResponseParameters").msgclass StreamingOutputCallRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingOutputCallRequest").msgclass StreamingOutputCallResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingOutputCallResponse").msgclass + ReconnectParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ReconnectParams").msgclass ReconnectInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ReconnectInfo").msgclass PayloadType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.PayloadType").enummodule CompressionType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.CompressionType").enummodule diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index e958141d4ea..5a9027a4a23 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -173,20 +173,6 @@ class Client { random_dist.reset( new ExpDist(load.poisson().offered_load() / num_threads)); break; - case LoadParams::kUniform: - random_dist.reset( - new UniformDist(load.uniform().interarrival_lo() * num_threads, - load.uniform().interarrival_hi() * num_threads)); - break; - case LoadParams::kDeterm: - random_dist.reset( - new DetDist(num_threads / load.determ().offered_load())); - break; - case LoadParams::kPareto: - random_dist.reset( - new ParetoDist(load.pareto().interarrival_base() * num_threads, - load.pareto().alpha())); - break; default: GPR_ASSERT(false); } diff --git a/test/cpp/qps/interarrival.h b/test/cpp/qps/interarrival.h index 0cc78533ce0..0980d5e8baa 100644 --- a/test/cpp/qps/interarrival.h +++ b/test/cpp/qps/interarrival.h @@ -82,62 +82,6 @@ class ExpDist GRPC_FINAL : public RandomDistInterface { double lambda_recip_; }; -// UniformDist implements a random distribution that has -// interarrival time uniformly spread between [lo,hi). The -// mean interarrival time is (lo+hi)/2. For more information, -// see http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29 - -class UniformDist GRPC_FINAL : public RandomDistInterface { - public: - UniformDist(double lo, double hi) : lo_(lo), range_(hi - lo) {} - ~UniformDist() GRPC_OVERRIDE {} - double transform(double uni) const GRPC_OVERRIDE { - return uni * range_ + lo_; - } - - private: - double lo_; - double range_; -}; - -// DetDist provides a random distribution with interarrival time -// of val. Note that this is not additive, so using this on multiple -// flows of control (threads within the same client or separate -// clients) will not preserve any deterministic interarrival gap across -// requests. - -class DetDist GRPC_FINAL : public RandomDistInterface { - public: - explicit DetDist(double val) : val_(val) {} - ~DetDist() GRPC_OVERRIDE {} - double transform(double uni) const GRPC_OVERRIDE { return val_; } - - private: - double val_; -}; - -// ParetoDist provides a random distribution with interarrival time -// spread according to a Pareto (heavy-tailed) distribution. In this -// model, many interarrival times are close to the base, but a sufficient -// number will be high (up to infinity) as to disturb the mean. It is a -// good representation of the response times of data center jobs. See -// http://en.wikipedia.org/wiki/Pareto_distribution - -class ParetoDist GRPC_FINAL : public RandomDistInterface { - public: - ParetoDist(double base, double alpha) - : base_(base), alpha_recip_(1.0 / alpha) {} - ~ParetoDist() GRPC_OVERRIDE {} - double transform(double uni) const GRPC_OVERRIDE { - // Note: Use 1.0-uni above to avoid div by zero if uni is 0 - return base_ / pow(1.0 - uni, alpha_recip_); - } - - private: - double base_; - double alpha_recip_; -}; - // A class library for generating pseudo-random interarrival times // in an efficient re-entrant way. The random table is built at construction // time, and each call must include the thread id of the invoker diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index 608181f77fb..e4683e475f2 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -68,11 +68,6 @@ DEFINE_string(client_type, "SYNC_CLIENT", "Client type"); DEFINE_int32(async_client_threads, 1, "Async client threads"); DEFINE_double(poisson_load, -1.0, "Poisson offered load (qps)"); -DEFINE_double(uniform_lo, -1.0, "Uniform low interarrival time (us)"); -DEFINE_double(uniform_hi, -1.0, "Uniform high interarrival time (us)"); -DEFINE_double(determ_load, -1.0, "Deterministic offered load (qps)"); -DEFINE_double(pareto_base, -1.0, "Pareto base interarrival time (us)"); -DEFINE_double(pareto_alpha, -1.0, "Pareto alpha value"); DEFINE_int32(client_core_limit, -1, "Limit on client cores to use"); @@ -137,17 +132,6 @@ static void QpsDriver() { if (FLAGS_poisson_load > 0.0) { auto poisson = client_config.mutable_load_params()->mutable_poisson(); poisson->set_offered_load(FLAGS_poisson_load); - } else if (FLAGS_uniform_lo > 0.0) { - auto uniform = client_config.mutable_load_params()->mutable_uniform(); - uniform->set_interarrival_lo(FLAGS_uniform_lo / 1e6); - uniform->set_interarrival_hi(FLAGS_uniform_hi / 1e6); - } else if (FLAGS_determ_load > 0.0) { - auto determ = client_config.mutable_load_params()->mutable_determ(); - determ->set_offered_load(FLAGS_determ_load); - } else if (FLAGS_pareto_base > 0.0) { - auto pareto = client_config.mutable_load_params()->mutable_pareto(); - pareto->set_interarrival_base(FLAGS_pareto_base / 1e6); - pareto->set_alpha(FLAGS_pareto_alpha); } else { client_config.mutable_load_params()->mutable_closed_loop(); // No further load parameters to set up for closed loop diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc index 48585af7566..4055c8a718f 100644 --- a/test/cpp/qps/qps_interarrival_test.cc +++ b/test/cpp/qps/qps_interarrival_test.cc @@ -63,14 +63,8 @@ static void RunTest(RandomDistInterface &&r, int threads, std::string title) { } using grpc::testing::ExpDist; -using grpc::testing::DetDist; -using grpc::testing::UniformDist; -using grpc::testing::ParetoDist; int main(int argc, char **argv) { RunTest(ExpDist(10.0), 5, std::string("Exponential(10)")); - RunTest(DetDist(5.0), 5, std::string("Det(5)")); - RunTest(UniformDist(0.0, 10.0), 5, std::string("Uniform(0,10)")); - RunTest(ParetoDist(1.0, 1.0), 5, std::string("Pareto(1,1)")); return 0; } From 2a52203af9099e0328f95abc923153d3e219ba2e Mon Sep 17 00:00:00 2001 From: itessier Date: Tue, 19 Apr 2016 17:38:51 -0700 Subject: [PATCH 80/93] Update boringssl to latest chromium-stable. This also fixes the x25519_NEON symbol error when importing the gRPC Python modules on ARM. Change-Id: Id98cf6b0f9a3a8f5b88204bd0a6ad2346182ba3d --- Makefile | 72 ++- binding.gyp | 3 + config.m4 | 3 + grpc.gemspec | 5 +- package.xml | 5 +- src/boringssl/err_data.c | 510 +++++++++--------- src/python/grpcio/grpc_core_dependencies.py | 3 + third_party/boringssl | 2 +- tools/run_tests/sanity/check_submodules.sh | 2 +- tools/run_tests/sources_and_headers.json | 27 +- tools/run_tests/tests.json | 24 + .../vcxproj/boringssl/boringssl.vcxproj | 8 +- .../boringssl/boringssl.vcxproj.filters | 15 +- .../boringssl_x509_test.vcxproj | 198 +++++++ .../boringssl_x509_test.vcxproj.filters | 7 + .../boringssl_x509_test_lib.vcxproj | 170 ++++++ .../boringssl_x509_test_lib.vcxproj.filters | 24 + 17 files changed, 816 insertions(+), 262 deletions(-) create mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj create mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj create mode 100644 vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj.filters diff --git a/Makefile b/Makefile index 50fc16753ae..b6cd86d368c 100644 --- a/Makefile +++ b/Makefile @@ -1077,6 +1077,7 @@ boringssl_refcount_test: $(BINDIR)/$(CONFIG)/boringssl_refcount_test boringssl_rsa_test: $(BINDIR)/$(CONFIG)/boringssl_rsa_test boringssl_thread_test: $(BINDIR)/$(CONFIG)/boringssl_thread_test boringssl_pkcs7_test: $(BINDIR)/$(CONFIG)/boringssl_pkcs7_test +boringssl_x509_test: $(BINDIR)/$(CONFIG)/boringssl_x509_test boringssl_tab_test: $(BINDIR)/$(CONFIG)/boringssl_tab_test boringssl_v3name_test: $(BINDIR)/$(CONFIG)/boringssl_v3name_test boringssl_pqueue_test: $(BINDIR)/$(CONFIG)/boringssl_pqueue_test @@ -1197,7 +1198,7 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a ifeq ($(HAS_ZOOKEEPER),true) privatelibs_zookeeper: @@ -1435,6 +1436,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/boringssl_rsa_test \ $(BINDIR)/$(CONFIG)/boringssl_thread_test \ $(BINDIR)/$(CONFIG)/boringssl_pkcs7_test \ + $(BINDIR)/$(CONFIG)/boringssl_x509_test \ $(BINDIR)/$(CONFIG)/boringssl_tab_test \ $(BINDIR)/$(CONFIG)/boringssl_v3name_test \ $(BINDIR)/$(CONFIG)/boringssl_pqueue_test \ @@ -4079,6 +4081,7 @@ LIBBORINGSSL_SRC = \ third_party/boringssl/crypto/bn/shift.c \ third_party/boringssl/crypto/bn/sqrt.c \ third_party/boringssl/crypto/buf/buf.c \ + third_party/boringssl/crypto/bytestring/asn1_compat.c \ third_party/boringssl/crypto/bytestring/ber.c \ third_party/boringssl/crypto/bytestring/cbb.c \ third_party/boringssl/crypto/bytestring/cbs.c \ @@ -4102,6 +4105,7 @@ LIBBORINGSSL_SRC = \ third_party/boringssl/crypto/cpu-intel.c \ third_party/boringssl/crypto/crypto.c \ third_party/boringssl/crypto/curve25519/curve25519.c \ + third_party/boringssl/crypto/curve25519/x25519-x86_64.c \ third_party/boringssl/crypto/des/des.c \ third_party/boringssl/crypto/dh/check.c \ third_party/boringssl/crypto/dh/dh.c \ @@ -4293,6 +4297,7 @@ LIBBORINGSSL_SRC = \ third_party/boringssl/ssl/ssl_buffer.c \ third_party/boringssl/ssl/ssl_cert.c \ third_party/boringssl/ssl/ssl_cipher.c \ + third_party/boringssl/ssl/ssl_ecdh.c \ third_party/boringssl/ssl/ssl_file.c \ third_party/boringssl/ssl/ssl_lib.c \ third_party/boringssl/ssl/ssl_rsa.c \ @@ -5521,6 +5526,44 @@ ifneq ($(NO_DEPS),true) endif +LIBBORINGSSL_X509_TEST_LIB_SRC = \ + third_party/boringssl/crypto/x509/x509_test.cc \ + +PUBLIC_HEADERS_CXX += \ + +LIBBORINGSSL_X509_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_X509_TEST_LIB_SRC)))) + +$(LIBBORINGSSL_X509_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX +$(LIBBORINGSSL_X509_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare + +ifeq ($(NO_PROTOBUF),true) + +# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. + +$(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a: protobuf_dep_error + + +else + +$(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_X509_TEST_LIB_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBBORINGSSL_X509_TEST_LIB_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a +endif + + + + +endif + +ifneq ($(NO_DEPS),true) +-include $(LIBBORINGSSL_X509_TEST_LIB_OBJS:.o=.dep) +endif + + LIBBORINGSSL_TAB_TEST_LIB_SRC = \ third_party/boringssl/crypto/x509v3/tab_test.c \ @@ -12743,6 +12786,33 @@ endif +# boringssl needs an override to ensure that it does not include +# system openssl headers regardless of other configuration +# we do so here with a target specific variable assignment +$(BORINGSSL_X509_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_X509_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) +$(BORINGSSL_X509_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/boringssl_x509_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/boringssl_x509_test: $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/boringssl_x509_test + +endif + + + + + # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment diff --git a/binding.gyp b/binding.gyp index 53d86534def..e6c31eda4dd 100644 --- a/binding.gyp +++ b/binding.gyp @@ -223,6 +223,7 @@ 'third_party/boringssl/crypto/bn/shift.c', 'third_party/boringssl/crypto/bn/sqrt.c', 'third_party/boringssl/crypto/buf/buf.c', + 'third_party/boringssl/crypto/bytestring/asn1_compat.c', 'third_party/boringssl/crypto/bytestring/ber.c', 'third_party/boringssl/crypto/bytestring/cbb.c', 'third_party/boringssl/crypto/bytestring/cbs.c', @@ -246,6 +247,7 @@ 'third_party/boringssl/crypto/cpu-intel.c', 'third_party/boringssl/crypto/crypto.c', 'third_party/boringssl/crypto/curve25519/curve25519.c', + 'third_party/boringssl/crypto/curve25519/x25519-x86_64.c', 'third_party/boringssl/crypto/des/des.c', 'third_party/boringssl/crypto/dh/check.c', 'third_party/boringssl/crypto/dh/dh.c', @@ -437,6 +439,7 @@ 'third_party/boringssl/ssl/ssl_buffer.c', 'third_party/boringssl/ssl/ssl_cert.c', 'third_party/boringssl/ssl/ssl_cipher.c', + 'third_party/boringssl/ssl/ssl_ecdh.c', 'third_party/boringssl/ssl/ssl_file.c', 'third_party/boringssl/ssl/ssl_lib.c', 'third_party/boringssl/ssl/ssl_rsa.c', diff --git a/config.m4 b/config.m4 index c26cb7b881f..d7876145333 100644 --- a/config.m4 +++ b/config.m4 @@ -317,6 +317,7 @@ if test "$PHP_GRPC" != "no"; then third_party/boringssl/crypto/bn/shift.c \ third_party/boringssl/crypto/bn/sqrt.c \ third_party/boringssl/crypto/buf/buf.c \ + third_party/boringssl/crypto/bytestring/asn1_compat.c \ third_party/boringssl/crypto/bytestring/ber.c \ third_party/boringssl/crypto/bytestring/cbb.c \ third_party/boringssl/crypto/bytestring/cbs.c \ @@ -340,6 +341,7 @@ if test "$PHP_GRPC" != "no"; then third_party/boringssl/crypto/cpu-intel.c \ third_party/boringssl/crypto/crypto.c \ third_party/boringssl/crypto/curve25519/curve25519.c \ + third_party/boringssl/crypto/curve25519/x25519-x86_64.c \ third_party/boringssl/crypto/des/des.c \ third_party/boringssl/crypto/dh/check.c \ third_party/boringssl/crypto/dh/dh.c \ @@ -531,6 +533,7 @@ if test "$PHP_GRPC" != "no"; then third_party/boringssl/ssl/ssl_buffer.c \ third_party/boringssl/ssl/ssl_cert.c \ third_party/boringssl/ssl/ssl_cipher.c \ + third_party/boringssl/ssl/ssl_ecdh.c \ third_party/boringssl/ssl/ssl_file.c \ third_party/boringssl/ssl/ssl_lib.c \ third_party/boringssl/ssl/ssl_rsa.c \ diff --git a/grpc.gemspec b/grpc.gemspec index 9c858b25791..c80d6a5bad4 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -482,12 +482,12 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl/crypto/cipher/internal.h ) s.files += %w( third_party/boringssl/crypto/conf/conf_def.h ) s.files += %w( third_party/boringssl/crypto/conf/internal.h ) + s.files += %w( third_party/boringssl/crypto/curve25519/internal.h ) s.files += %w( third_party/boringssl/crypto/des/internal.h ) s.files += %w( third_party/boringssl/crypto/dh/internal.h ) s.files += %w( third_party/boringssl/crypto/digest/internal.h ) s.files += %w( third_party/boringssl/crypto/digest/md32_common.h ) s.files += %w( third_party/boringssl/crypto/directory.h ) - s.files += %w( third_party/boringssl/crypto/dsa/internal.h ) s.files += %w( third_party/boringssl/crypto/ec/internal.h ) s.files += %w( third_party/boringssl/crypto/ec/p256-x86_64-table.h ) s.files += %w( third_party/boringssl/crypto/evp/internal.h ) @@ -652,6 +652,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl/crypto/bn/shift.c ) s.files += %w( third_party/boringssl/crypto/bn/sqrt.c ) s.files += %w( third_party/boringssl/crypto/buf/buf.c ) + s.files += %w( third_party/boringssl/crypto/bytestring/asn1_compat.c ) s.files += %w( third_party/boringssl/crypto/bytestring/ber.c ) s.files += %w( third_party/boringssl/crypto/bytestring/cbb.c ) s.files += %w( third_party/boringssl/crypto/bytestring/cbs.c ) @@ -675,6 +676,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl/crypto/cpu-intel.c ) s.files += %w( third_party/boringssl/crypto/crypto.c ) s.files += %w( third_party/boringssl/crypto/curve25519/curve25519.c ) + s.files += %w( third_party/boringssl/crypto/curve25519/x25519-x86_64.c ) s.files += %w( third_party/boringssl/crypto/des/des.c ) s.files += %w( third_party/boringssl/crypto/dh/check.c ) s.files += %w( third_party/boringssl/crypto/dh/dh.c ) @@ -866,6 +868,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl/ssl/ssl_buffer.c ) s.files += %w( third_party/boringssl/ssl/ssl_cert.c ) s.files += %w( third_party/boringssl/ssl/ssl_cipher.c ) + s.files += %w( third_party/boringssl/ssl/ssl_ecdh.c ) s.files += %w( third_party/boringssl/ssl/ssl_file.c ) s.files += %w( third_party/boringssl/ssl/ssl_lib.c ) s.files += %w( third_party/boringssl/ssl/ssl_rsa.c ) diff --git a/package.xml b/package.xml index ced62b63d66..f78c2eda5c6 100644 --- a/package.xml +++ b/package.xml @@ -485,12 +485,12 @@ + - @@ -655,6 +655,7 @@ + @@ -678,6 +679,7 @@ + @@ -869,6 +871,7 @@ + diff --git a/src/boringssl/err_data.c b/src/boringssl/err_data.c index 1a1d9504197..d4cc08bd99c 100644 --- a/src/boringssl/err_data.c +++ b/src/boringssl/err_data.c @@ -54,30 +54,30 @@ OPENSSL_COMPILE_ASSERT(ERR_LIB_USER == 32, library_values_changed_32); OPENSSL_COMPILE_ASSERT(ERR_NUM_LIBS == 33, library_values_changed_num); const uint32_t kOpenSSLReasonValues[] = { - 0xc3207ba, - 0xc3287d4, - 0xc3307e3, - 0xc3387f3, - 0xc340802, - 0xc34881b, - 0xc350827, - 0xc358844, - 0xc360856, - 0xc368864, - 0xc370874, - 0xc378881, - 0xc380891, - 0xc38889c, - 0xc3908b2, - 0xc3988c1, - 0xc3a08d5, - 0xc3a87c7, + 0xc3207ab, + 0xc3287c5, + 0xc3307d4, + 0xc3387e4, + 0xc3407f3, + 0xc34880c, + 0xc350818, + 0xc358835, + 0xc360847, + 0xc368855, + 0xc370865, + 0xc378872, + 0xc380882, + 0xc38888d, + 0xc3908a3, + 0xc3988b2, + 0xc3a08c6, + 0xc3a87b8, 0xc3b00b0, - 0x10321478, - 0x10329484, - 0x1033149d, - 0x103394b0, - 0x10340de1, + 0x10321484, + 0x10329490, + 0x103314a9, + 0x103394bc, + 0x10340ded, 0x103494cf, 0x103514e4, 0x10359516, @@ -97,7 +97,7 @@ const uint32_t kOpenSSLReasonValues[] = { 0x103c9658, 0x103d166f, 0x103d9682, - 0x103e0b6c, + 0x103e0b5d, 0x103e96b3, 0x103f16c6, 0x103f96e0, @@ -108,87 +108,91 @@ const uint32_t kOpenSSLReasonValues[] = { 0x10421747, 0x1042975b, 0x1043176d, - 0x104385d0, - 0x104408c1, + 0x104385c1, + 0x104408b2, 0x10449782, 0x10451799, 0x104597ae, 0x104617bc, 0x10469695, 0x104714f7, - 0x104787c7, + 0x104787b8, 0x104800b0, - 0x104894c3, - 0x14320b4f, - 0x14328b5d, - 0x14330b6c, - 0x14338b7e, + 0x10488b8c, + 0x14320b40, + 0x14328b4e, + 0x14330b5d, + 0x14338b6f, 0x18320083, - 0x18328e47, - 0x18340e75, - 0x18348e89, - 0x18358ec0, - 0x18368eed, - 0x18370f00, - 0x18378f14, - 0x18380f38, - 0x18388f46, - 0x18390f5c, - 0x18398f70, - 0x183a0f80, - 0x183b0f90, - 0x183b8fa5, - 0x183c8fd0, - 0x183d0fe4, - 0x183d8ff4, - 0x183e0b9b, - 0x183e9001, - 0x183f1013, - 0x183f901e, - 0x1840102e, - 0x1840903f, - 0x18411050, - 0x18419062, - 0x1842108b, - 0x184290bd, - 0x184310cc, - 0x18451135, - 0x1845914b, - 0x18461166, - 0x18468ed8, - 0x184709d9, + 0x18328e53, + 0x18340e81, + 0x18348e95, + 0x18358ecc, + 0x18368ef9, + 0x18370f0c, + 0x18378f20, + 0x18380f44, + 0x18388f52, + 0x18390f68, + 0x18398f7c, + 0x183a0f8c, + 0x183b0f9c, + 0x183b8fb1, + 0x183c8fdc, + 0x183d0ff0, + 0x183d9000, + 0x183e0b98, + 0x183e900d, + 0x183f101f, + 0x183f902a, + 0x1840103a, + 0x1840904b, + 0x1841105c, + 0x1841906e, + 0x18421097, + 0x184290c9, + 0x184310d8, + 0x18451141, + 0x18459157, + 0x18461172, + 0x18468ee4, + 0x184709ca, 0x18478094, - 0x18480fbc, - 0x18489101, - 0x18490e5d, - 0x18498e9e, - 0x184a119c, - 0x184a9119, - 0x184b10e0, - 0x184b8e37, - 0x184c10a4, - 0x184c866b, - 0x184d1181, - 0x203211c3, - 0x243211cf, - 0x24328907, - 0x243311e1, - 0x243391ee, - 0x243411fb, - 0x2434920d, - 0x2435121c, - 0x24359239, - 0x24361246, - 0x24369254, - 0x24371262, - 0x24379270, - 0x24381279, - 0x24389286, - 0x24391299, - 0x28320b8f, - 0x28328b9b, - 0x28330b6c, - 0x28338bae, + 0x18480fc8, + 0x1848910d, + 0x18490e69, + 0x18498eaa, + 0x184a11a8, + 0x184a9125, + 0x184b10ec, + 0x184b8e43, + 0x184c10b0, + 0x184c865c, + 0x184d118d, + 0x184d80b0, + 0x203211cf, + 0x243211db, + 0x243288f8, + 0x243311ed, + 0x243391fa, + 0x24341207, + 0x24349219, + 0x24351228, + 0x24359245, + 0x24361252, + 0x24369260, + 0x2437126e, + 0x2437927c, + 0x24381285, + 0x24389292, + 0x243912a5, + 0x28320b80, + 0x28328b98, + 0x28330b5d, + 0x28338bab, + 0x28340b8c, + 0x28348094, + 0x283500b0, 0x2c32281d, 0x2c32a82b, 0x2c33283d, @@ -207,7 +211,7 @@ const uint32_t kOpenSSLReasonValues[] = { 0x2c39a917, 0x2c3a292b, 0x2c3aa93c, - 0x2c3b1359, + 0x2c3b1365, 0x2c3ba94d, 0x2c3c2961, 0x2c3ca977, @@ -219,12 +223,12 @@ const uint32_t kOpenSSLReasonValues[] = { 0x2c3faa09, 0x2c402a2c, 0x2c40aa4b, - 0x2c4111c3, + 0x2c4111cf, 0x2c41aa5c, 0x2c422a6f, - 0x2c429135, + 0x2c429141, 0x2c432a80, - 0x2c4386a2, + 0x2c438693, 0x2c4429ad, 0x30320000, 0x30328015, @@ -277,77 +281,79 @@ const uint32_t kOpenSSLReasonValues[] = { 0x304a03b4, 0x304a83c7, 0x304b03d2, - 0x304b83e1, - 0x304c03f2, - 0x304c83fe, - 0x304d0414, - 0x304d8422, - 0x304e0438, - 0x304e844a, - 0x304f045c, - 0x304f846f, - 0x30500482, - 0x30508493, - 0x305104a3, - 0x305184bb, - 0x305204d0, - 0x305284e8, - 0x305304fc, - 0x30538514, - 0x3054052d, - 0x30548546, - 0x30550563, - 0x3055856e, - 0x30560586, - 0x30568596, - 0x305705a7, - 0x305785ba, - 0x305805d0, - 0x305885d9, - 0x305905ee, + 0x304b83e3, + 0x304c03ef, + 0x304c8405, + 0x304d0413, + 0x304d8429, + 0x304e043b, + 0x304e844d, + 0x304f0460, + 0x304f8473, + 0x30500484, + 0x30508494, + 0x305104ac, + 0x305184c1, + 0x305204d9, + 0x305284ed, + 0x30530505, + 0x3053851e, + 0x30540537, + 0x30548554, + 0x3055055f, + 0x30558577, + 0x30560587, + 0x30568598, + 0x305705ab, + 0x305785c1, + 0x305805ca, + 0x305885df, + 0x305905f2, 0x30598601, - 0x305a0610, + 0x305a0621, 0x305a8630, - 0x305b063f, - 0x305b864b, - 0x305c066b, - 0x305c8687, - 0x305d0698, - 0x305d86a2, - 0x34320ac9, - 0x34328add, - 0x34330afa, - 0x34338b0d, - 0x34340b1c, - 0x34348b39, + 0x305b063c, + 0x305b865c, + 0x305c0678, + 0x305c8689, + 0x305d0693, + 0x34320aba, + 0x34328ace, + 0x34330aeb, + 0x34338afe, + 0x34340b0d, + 0x34348b2a, 0x3c320083, - 0x3c328bd8, - 0x3c330bf1, - 0x3c338c0c, - 0x3c340c29, - 0x3c348c44, - 0x3c350c5f, - 0x3c358c74, - 0x3c360c8d, - 0x3c368ca5, - 0x3c370cb6, - 0x3c378cc4, - 0x3c380cd1, - 0x3c388ce5, - 0x3c390b9b, - 0x3c398cf9, - 0x3c3a0d0d, - 0x3c3a8881, - 0x3c3b0d1d, - 0x3c3b8d38, - 0x3c3c0d4a, - 0x3c3c8d60, - 0x3c3d0d6a, - 0x3c3d8d7e, - 0x3c3e0d8c, - 0x3c3e8db1, - 0x3c3f0bc4, - 0x3c3f8d9a, + 0x3c328bd5, + 0x3c330bee, + 0x3c338c09, + 0x3c340c26, + 0x3c348c50, + 0x3c350c6b, + 0x3c358c80, + 0x3c360c99, + 0x3c368cb1, + 0x3c370cc2, + 0x3c378cd0, + 0x3c380cdd, + 0x3c388cf1, + 0x3c390b98, + 0x3c398d05, + 0x3c3a0d19, + 0x3c3a8872, + 0x3c3b0d29, + 0x3c3b8d44, + 0x3c3c0d56, + 0x3c3c8d6c, + 0x3c3d0d76, + 0x3c3d8d8a, + 0x3c3e0d98, + 0x3c3e8dbd, + 0x3c3f0bc1, + 0x3c3f8da6, + 0x3c400094, + 0x3c4080b0, + 0x3c410c41, 0x403217d3, 0x403297e9, 0x40331817, @@ -362,7 +368,7 @@ const uint32_t kOpenSSLReasonValues[] = { 0x403798b8, 0x403818c3, 0x403898d5, - 0x40390de1, + 0x40390ded, 0x403998e5, 0x403a18f8, 0x403a9919, @@ -437,7 +443,7 @@ const uint32_t kOpenSSLReasonValues[] = { 0x405d1e9e, 0x405d9eb5, 0x405e1ed5, - 0x405e8a17, + 0x405e8a08, 0x405f1ef6, 0x405f9f03, 0x40601f11, @@ -474,18 +480,18 @@ const uint32_t kOpenSSLReasonValues[] = { 0x406fa60d, 0x40702620, 0x4070a63d, - 0x40710782, + 0x40710773, 0x4071a64f, 0x40722662, 0x4072a67b, 0x40732693, - 0x407390bd, + 0x407390c9, 0x407426a7, 0x4074a6c1, 0x407526d2, 0x4075a6e6, 0x407626f4, - 0x40769286, + 0x40769292, 0x40772719, 0x4077a73b, 0x40782756, @@ -528,48 +534,48 @@ const uint32_t kOpenSSLReasonValues[] = { 0x422c251d, 0x422ca4d8, 0x422d24b7, - 0x443206ad, - 0x443286bc, - 0x443306c8, - 0x443386d6, - 0x443406e9, - 0x443486fa, - 0x44350701, - 0x4435870b, - 0x4436071e, - 0x44368734, - 0x44370746, - 0x44378753, - 0x44380762, - 0x4438876a, - 0x44390782, - 0x44398790, - 0x443a07a3, - 0x4c3212b0, - 0x4c3292c0, - 0x4c3312d3, - 0x4c3392f3, + 0x4432069e, + 0x443286ad, + 0x443306b9, + 0x443386c7, + 0x443406da, + 0x443486eb, + 0x443506f2, + 0x443586fc, + 0x4436070f, + 0x44368725, + 0x44370737, + 0x44378744, + 0x44380753, + 0x4438875b, + 0x44390773, + 0x44398781, + 0x443a0794, + 0x4c3212bc, + 0x4c3292cc, + 0x4c3312df, + 0x4c3392ff, 0x4c340094, 0x4c3480b0, - 0x4c3512ff, - 0x4c35930d, - 0x4c361329, - 0x4c36933c, - 0x4c37134b, - 0x4c379359, - 0x4c38136e, - 0x4c38937a, - 0x4c39139a, - 0x4c3993c4, - 0x4c3a13dd, - 0x4c3a93f6, - 0x4c3b05d0, - 0x4c3b940f, - 0x4c3c1421, - 0x4c3c9430, - 0x4c3d10bd, - 0x4c3d9449, - 0x4c3e1456, + 0x4c35130b, + 0x4c359319, + 0x4c361335, + 0x4c369348, + 0x4c371357, + 0x4c379365, + 0x4c38137a, + 0x4c389386, + 0x4c3913a6, + 0x4c3993d0, + 0x4c3a13e9, + 0x4c3a9402, + 0x4c3b05c1, + 0x4c3b941b, + 0x4c3c142d, + 0x4c3c943c, + 0x4c3d10c9, + 0x4c3d9455, + 0x4c3e1462, 0x50322a92, 0x5032aaa1, 0x50332aac, @@ -607,7 +613,7 @@ const uint32_t kOpenSSLReasonValues[] = { 0x50432d43, 0x5043ad53, 0x50442d62, - 0x50448414, + 0x50448405, 0x50452d76, 0x5045ad94, 0x50462da7, @@ -631,45 +637,45 @@ const uint32_t kOpenSSLReasonValues[] = { 0x504f2f62, 0x504faf79, 0x50502f88, - 0x50508687, + 0x50508678, 0x50512f9b, - 0x58320e1f, - 0x68320de1, - 0x68328b9b, - 0x68330bae, - 0x68338def, - 0x68340dff, + 0x58320e2b, + 0x68320ded, + 0x68328b98, + 0x68330bab, + 0x68338dfb, + 0x68340e0b, 0x683480b0, - 0x6c320dbd, - 0x6c328b7e, - 0x6c330dc8, - 0x7432098d, - 0x783208f2, - 0x78328907, - 0x78330913, + 0x6c320dc9, + 0x6c328b6f, + 0x6c330dd4, + 0x7432097e, + 0x783208e3, + 0x783288f8, + 0x78330904, 0x78338083, - 0x78340922, - 0x78348937, - 0x78350956, - 0x78358978, - 0x7836098d, - 0x783689a3, - 0x783709b3, - 0x783789c6, - 0x783809d9, - 0x783889eb, - 0x783909f8, - 0x78398a17, - 0x783a0a2c, - 0x783a8a3a, - 0x783b0a44, - 0x783b8a58, - 0x783c0a6f, - 0x783c8a84, - 0x783d0a9b, - 0x783d8ab0, - 0x783e0a06, - 0x7c3211b2, + 0x78340913, + 0x78348928, + 0x78350947, + 0x78358969, + 0x7836097e, + 0x78368994, + 0x783709a4, + 0x783789b7, + 0x783809ca, + 0x783889dc, + 0x783909e9, + 0x78398a08, + 0x783a0a1d, + 0x783a8a2b, + 0x783b0a35, + 0x783b8a49, + 0x783c0a60, + 0x783c8a75, + 0x783d0a8c, + 0x783d8aa1, + 0x783e09f7, + 0x7c3211be, }; const size_t kOpenSSLReasonValuesLen = sizeof(kOpenSSLReasonValues) / sizeof(kOpenSSLReasonValues[0]); @@ -725,7 +731,6 @@ const char kOpenSSLReasonStringData[] = "INVALID_UNIVERSALSTRING_LENGTH\0" "INVALID_UTF8STRING\0" "LIST_ERROR\0" - "MALLOC_FAILURE\0" "MISSING_ASN1_EOS\0" "MISSING_EOC\0" "MISSING_SECOND_NUMBER\0" @@ -833,6 +838,7 @@ const char kOpenSSLReasonStringData[] = "MODULUS_TOO_LARGE\0" "NO_PRIVATE_VALUE\0" "BAD_Q_VALUE\0" + "BAD_VERSION\0" "MISSING_PARAMETERS\0" "NEED_NEW_SETUP_VALUES\0" "BIGNUM_OUT_OF_RANGE\0" @@ -840,6 +846,7 @@ const char kOpenSSLReasonStringData[] = "D2I_ECPKPARAMETERS_FAILURE\0" "EC_GROUP_NEW_BY_NAME_FAILURE\0" "GROUP2PKPARAMETERS_FAILURE\0" + "GROUP_MISMATCH\0" "I2D_ECPKPARAMETERS_FAILURE\0" "INCOMPATIBLE_OBJECTS\0" "INVALID_COMPRESSED_POINT\0" @@ -948,7 +955,6 @@ const char kOpenSSLReasonStringData[] = "BAD_FIXED_HEADER_DECRYPT\0" "BAD_PAD_BYTE_COUNT\0" "BAD_RSA_PARAMETERS\0" - "BAD_VERSION\0" "BLOCK_TYPE_IS_NOT_01\0" "BN_NOT_INITIALIZED\0" "CANNOT_RECOVER_MULTI_PRIME_KEY\0" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index de25edbeb52..94e1807c6b4 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -311,6 +311,7 @@ CORE_SOURCE_FILES = [ 'third_party/boringssl/crypto/bn/shift.c', 'third_party/boringssl/crypto/bn/sqrt.c', 'third_party/boringssl/crypto/buf/buf.c', + 'third_party/boringssl/crypto/bytestring/asn1_compat.c', 'third_party/boringssl/crypto/bytestring/ber.c', 'third_party/boringssl/crypto/bytestring/cbb.c', 'third_party/boringssl/crypto/bytestring/cbs.c', @@ -334,6 +335,7 @@ CORE_SOURCE_FILES = [ 'third_party/boringssl/crypto/cpu-intel.c', 'third_party/boringssl/crypto/crypto.c', 'third_party/boringssl/crypto/curve25519/curve25519.c', + 'third_party/boringssl/crypto/curve25519/x25519-x86_64.c', 'third_party/boringssl/crypto/des/des.c', 'third_party/boringssl/crypto/dh/check.c', 'third_party/boringssl/crypto/dh/dh.c', @@ -525,6 +527,7 @@ CORE_SOURCE_FILES = [ 'third_party/boringssl/ssl/ssl_buffer.c', 'third_party/boringssl/ssl/ssl_cert.c', 'third_party/boringssl/ssl/ssl_cipher.c', + 'third_party/boringssl/ssl/ssl_ecdh.c', 'third_party/boringssl/ssl/ssl_file.c', 'third_party/boringssl/ssl/ssl_lib.c', 'third_party/boringssl/ssl/ssl_rsa.c', diff --git a/third_party/boringssl b/third_party/boringssl index 907ae62b9d8..c880e42ba1c 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 +Subproject commit c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 06e66f09292..3349d28cf9e 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -41,7 +41,7 @@ want_submodules=`mktemp /tmp/submXXXXXX` git submodule | awk '{ print $1 }' | sort > $submodules cat << EOF | awk '{ print $1 }' | sort > $want_submodules - 907ae62b9d81121cb86b604f83e6b811a43f7a87 third_party/boringssl (version_for_cocoapods_1.0-72-g907ae62) + c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 third_party/boringssl (heads/2661) 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f) c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0) f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463) diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 7978f12d53f..64b71fdba77 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3206,6 +3206,19 @@ "third_party": true, "type": "target" }, + { + "deps": [ + "boringssl", + "boringssl_test_util", + "boringssl_x509_test_lib" + ], + "headers": [], + "language": "c++", + "name": "boringssl_x509_test", + "src": [], + "third_party": true, + "type": "target" + }, { "deps": [ "boringssl", @@ -4544,12 +4557,12 @@ "third_party/boringssl/crypto/cipher/internal.h", "third_party/boringssl/crypto/conf/conf_def.h", "third_party/boringssl/crypto/conf/internal.h", + "third_party/boringssl/crypto/curve25519/internal.h", "third_party/boringssl/crypto/des/internal.h", "third_party/boringssl/crypto/dh/internal.h", "third_party/boringssl/crypto/digest/internal.h", "third_party/boringssl/crypto/digest/md32_common.h", "third_party/boringssl/crypto/directory.h", - "third_party/boringssl/crypto/dsa/internal.h", "third_party/boringssl/crypto/ec/internal.h", "third_party/boringssl/crypto/ec/p256-x86_64-table.h", "third_party/boringssl/crypto/evp/internal.h", @@ -5056,6 +5069,18 @@ "third_party": true, "type": "lib" }, + { + "deps": [ + "boringssl", + "boringssl_test_util" + ], + "headers": [], + "language": "c++", + "name": "boringssl_x509_test_lib", + "src": [], + "third_party": true, + "type": "lib" + }, { "deps": [ "boringssl", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index f4a76dedb1a..05ca43a1fef 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -4240,6 +4240,30 @@ "windows" ] }, + { + "args": [], + "boringssl": true, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "defaults": "boringssl", + "exclude_configs": [ + "asan" + ], + "flaky": false, + "language": "c++", + "name": "boringssl_x509_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "boringssl": true, diff --git a/vsprojects/vcxproj/boringssl/boringssl.vcxproj b/vsprojects/vcxproj/boringssl/boringssl.vcxproj index 27125c42dc2..59db775d799 100644 --- a/vsprojects/vcxproj/boringssl/boringssl.vcxproj +++ b/vsprojects/vcxproj/boringssl/boringssl.vcxproj @@ -156,12 +156,12 @@ + - @@ -400,6 +400,8 @@ + + @@ -446,6 +448,8 @@ + + @@ -828,6 +832,8 @@ + + diff --git a/vsprojects/vcxproj/boringssl/boringssl.vcxproj.filters b/vsprojects/vcxproj/boringssl/boringssl.vcxproj.filters index 8cee094270c..bd996bdc445 100644 --- a/vsprojects/vcxproj/boringssl/boringssl.vcxproj.filters +++ b/vsprojects/vcxproj/boringssl/boringssl.vcxproj.filters @@ -217,6 +217,9 @@ third_party\boringssl\crypto\buf + + third_party\boringssl\crypto\bytestring + third_party\boringssl\crypto\bytestring @@ -286,6 +289,9 @@ third_party\boringssl\crypto\curve25519 + + third_party\boringssl\crypto\curve25519 + third_party\boringssl\crypto\des @@ -859,6 +865,9 @@ third_party\boringssl\ssl + + third_party\boringssl\ssl + third_party\boringssl\ssl @@ -912,6 +921,9 @@ third_party\boringssl\crypto\conf + + third_party\boringssl\crypto\curve25519 + third_party\boringssl\crypto\des @@ -927,9 +939,6 @@ third_party\boringssl\crypto - - third_party\boringssl\crypto\dsa - third_party\boringssl\crypto\ec diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj new file mode 100644 index 00000000000..2bf7f71531f --- /dev/null +++ b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj @@ -0,0 +1,198 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0E1472A5-A857-7680-45C6-7C4DD2F6BE48} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + boringssl_x509_test + static + Debug + static + Debug + + + boringssl_x509_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + false + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + false + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + false + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + false + None + false + + + Console + true + false + true + true + + + + + + + + + + {62DBB3BA-05D6-D2CF-7EC5-253F2AC25892} + + + {427037B1-B51B-D6F1-5025-AD12B200266A} + + + {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj.filters new file mode 100644 index 00000000000..00e4276f1d4 --- /dev/null +++ b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test/boringssl_x509_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj new file mode 100644 index 00000000000..f8b0e7a7015 --- /dev/null +++ b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj @@ -0,0 +1,170 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {62DBB3BA-05D6-D2CF-7EC5-253F2AC25892} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + boringssl_x509_test_lib + + + boringssl_x509_test_lib + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + false + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + false + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + false + None + false + + + Windows + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + false + None + false + + + Windows + true + false + true + true + + + + + + + + + + {427037B1-B51B-D6F1-5025-AD12B200266A} + + + {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj.filters new file mode 100644 index 00000000000..216a56fae30 --- /dev/null +++ b/vsprojects/vcxproj/test/boringssl/boringssl_x509_test_lib/boringssl_x509_test_lib.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + third_party\boringssl\crypto\x509 + + + + + + {0a04403f-6935-8e9c-c271-cfcb728d6dd3} + + + {8ffac2f8-0d1d-00df-018c-56100e9842f7} + + + {2d1857b4-2355-6af6-b6c8-b33f3ec27013} + + + {615f50f9-1415-e8e4-49ec-987a5772c7ee} + + + + From 29089c7b41425a7f274c1d56597d5635182b506d Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 20 Apr 2016 12:38:16 -0700 Subject: [PATCH 81/93] Deprecation of qps_driver and use of shell scripts, in progress --- Makefile | 46 +---- build.yaml | 14 -- test/cpp/qps/qps-sweep.sh | 170 ------------------ test/cpp/qps/qps_json_driver.cc | 27 +-- test/cpp/qps/single_run_localhost.sh | 56 ------ tools/jenkins/run_performance.sh | 9 +- .../performance/build_performance.sh | 2 +- tools/run_tests/run_performance_tests.py | 4 +- tools/run_tests/sources_and_headers.json | 20 --- 9 files changed, 25 insertions(+), 323 deletions(-) delete mode 100755 test/cpp/qps/qps-sweep.sh delete mode 100755 test/cpp/qps/single_run_localhost.sh diff --git a/Makefile b/Makefile index 50fc16753ae..928f09362b2 100644 --- a/Makefile +++ b/Makefile @@ -1023,7 +1023,6 @@ interop_test: $(BINDIR)/$(CONFIG)/interop_test json_run_localhost: $(BINDIR)/$(CONFIG)/json_run_localhost metrics_client: $(BINDIR)/$(CONFIG)/metrics_client mock_test: $(BINDIR)/$(CONFIG)/mock_test -qps_driver: $(BINDIR)/$(CONFIG)/qps_driver qps_interarrival_test: $(BINDIR)/$(CONFIG)/qps_interarrival_test qps_json_driver: $(BINDIR)/$(CONFIG)/qps_json_driver qps_openloop_test: $(BINDIR)/$(CONFIG)/qps_openloop_test @@ -1764,7 +1763,7 @@ tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/ tools_cxx: privatelibs_cxx -buildbenchmarks: privatelibs $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark $(BINDIR)/$(CONFIG)/qps_driver +buildbenchmarks: privatelibs $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark benchmarks: buildbenchmarks @@ -10906,49 +10905,6 @@ endif endif -QPS_DRIVER_SRC = \ - test/cpp/qps/qps_driver.cc \ - -QPS_DRIVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(QPS_DRIVER_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/qps_driver: openssl_dep_error - -else - - - - -ifeq ($(NO_PROTOBUF),true) - -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. - -$(BINDIR)/$(CONFIG)/qps_driver: protobuf_dep_error - -else - -$(BINDIR)/$(CONFIG)/qps_driver: $(PROTOBUF_DEP) $(QPS_DRIVER_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(QPS_DRIVER_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_driver - -endif - -endif - -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_driver.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a - -deps_qps_driver: $(QPS_DRIVER_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(QPS_DRIVER_OBJS:.o=.dep) -endif -endif - - QPS_INTERARRIVAL_TEST_SRC = \ test/cpp/qps/qps_interarrival_test.cc \ diff --git a/build.yaml b/build.yaml index a9a9e6ac9f3..92ba4d91031 100644 --- a/build.yaml +++ b/build.yaml @@ -2706,20 +2706,6 @@ targets: - grpc - gpr_test_util - gpr -- name: qps_driver - build: benchmark - language: c++ - src: - - test/cpp/qps/qps_driver.cc - deps: - - qps - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc - - gpr_test_util - - gpr - - grpc++_test_config - name: qps_interarrival_test build: test run: false diff --git a/test/cpp/qps/qps-sweep.sh b/test/cpp/qps/qps-sweep.sh deleted file mode 100755 index 8f7fb927727..00000000000 --- a/test/cpp/qps/qps-sweep.sh +++ /dev/null @@ -1,170 +0,0 @@ -#!/bin/sh - -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -if [ x"$QPS_WORKERS" == x ]; then - echo Error: Must set QPS_WORKERS variable in form \ - "host:port,host:port,..." 1>&2 - exit 1 -fi - -bins=`find . .. ../.. ../../.. -name bins | head -1` - -# Print out each command that gets executed -set -x - -# -# Specify parameters used in some of the tests -# - -# big is the size in bytes of large messages (0 is the size otherwise) -big=65536 - -# wide is the number of client channels in multi-channel tests (1 otherwise) -wide=64 - -# deep is the number of RPCs outstanding on a channel in non-ping-pong tests -# (the value used is 1 otherwise) -deep=100 - -# half is half the count of worker processes, used in the crossbar scenario -# that uses equal clients and servers. The other scenarios use only 1 server -# and either 1 client or N-1 clients as appropriate -half=`echo $QPS_WORKERS | awk -F, '{print int(NF/2)}'` - -for secure in true false; do - # Scenario 1: generic async streaming ping-pong (contentionless latency) - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=1 \ - --client_channels=1 --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 - - # Scenario 2: generic async streaming "unconstrained" (QPS) - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=0 2>&1 | tee /tmp/qps-test.$$ - - # Scenario 2b: QPS with a single server core - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=0 --server_core_limit=1 - - # Scenario 2c: protobuf-based QPS - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --simple_req_size=0 --simple_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=0 - - # Scenario 3: Latency at sub-peak load (all clients equally loaded) - for loadfactor in 0.2 0.5 0.7; do - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=0 --poisson_load=`awk -v lf=$loadfactor \ - '$5 == "QPS:" {print int(lf * $6); exit}' /tmp/qps-test.$$` - done - - rm /tmp/qps-test.$$ - - # Scenario 4: Single-channel bidirectional throughput test (like TCP_STREAM). - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=1 --bbuf_req_size=$big --bbuf_resp_size=$big \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 - - # Scenario 5: Sync unary ping-pong with protobufs - "$bins"/opt/qps_driver --rpc_type=UNARY --client_type=SYNC_CLIENT \ - --server_type=SYNC_SERVER --outstanding_rpcs_per_channel=1 \ - --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \ - --secure_test=$secure --num_servers=1 --num_clients=1 - - # Scenario 6: Sync streaming ping-pong with protobufs - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=SYNC_CLIENT \ - --server_type=SYNC_SERVER --outstanding_rpcs_per_channel=1 \ - --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \ - --secure_test=$secure --num_servers=1 --num_clients=1 - - # Scenario 7: Async unary ping-pong with protobufs - "$bins"/opt/qps_driver --rpc_type=UNARY --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=1 \ - --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 - - # Scenario 8: Async streaming ping-pong with protobufs - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=1 \ - --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 - - # Scenario 9: Crossbar QPS test - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=$half --num_clients=0 - - # Scenario 10: Multi-channel bidir throughput test - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=1 \ - --client_channels=$wide --bbuf_req_size=$big --bbuf_resp_size=$big \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=1 - - # Scenario 11: Single-channel request throughput test - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=1 --bbuf_req_size=$big --bbuf_resp_size=0 \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 - - # Scenario 12: Single-channel response throughput test - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=1 --bbuf_req_size=0 --bbuf_resp_size=$big \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 - - # Scenario 13: Single-channel bidirectional protobuf throughput test - "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=1 --simple_req_size=$big --simple_resp_size=$big \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 -done diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index e9266a5711b..17f3d3c4633 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -48,6 +48,7 @@ DEFINE_string(scenarios_file, "", "JSON file containing an array of Scenario objects"); DEFINE_string(scenarios_json, "", "JSON string containing an array of Scenario objects"); +DEFINE_bool(quit, false, "Quit the workers"); namespace grpc { namespace testing { @@ -55,12 +56,17 @@ namespace testing { static void QpsDriver() { grpc::string json; - if (FLAGS_scenarios_file != "") { - if (FLAGS_scenarios_json != "") { - gpr_log(GPR_ERROR, - "Only one of --scenarios_file or --scenarios_json must be set"); - abort(); - } + bool scfile = (FLAGS_scenarios_file != ""); + bool scjson = (FLAGS_scenarios_json != ""); + if ((!scfile && !scjson && !FLAGS_quit) || + (scfile && (scjson || FLAGS_quit)) || + (scjson && FLAGS_quit)) { + gpr_log(GPR_ERROR, "Exactly one of --scenarios_file, --scenarios_json, " + "or --quit must be set"); + abort(); + } + + if (scfile) { // Read the json data from disk FILE *json_file = fopen(FLAGS_scenarios_file.c_str(), "r"); GPR_ASSERT(json_file != NULL); @@ -72,12 +78,11 @@ static void QpsDriver() { fclose(json_file); json = grpc::string(data, data + len); delete[] data; - } else if (FLAGS_scenarios_json != "") { + } else if (scjson) { json = FLAGS_scenarios_json.c_str(); - } else { - gpr_log(GPR_ERROR, - "One of --scenarios_file or --scenarios_json must be set"); - abort(); + } else if (FLAGS_quit) { + RunQuit(); + return; } // Parse into an array of scenarios diff --git a/test/cpp/qps/single_run_localhost.sh b/test/cpp/qps/single_run_localhost.sh deleted file mode 100755 index f5356f18343..00000000000 --- a/test/cpp/qps/single_run_localhost.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# performs a single qps run with one client and one server - -set -ex - -cd $(dirname $0)/../../.. - -killall qps_worker || true - -config=opt - -NUMCPUS=`python2.7 -c 'import multiprocessing; print multiprocessing.cpu_count()'` - -make CONFIG=$config qps_worker qps_driver -j$NUMCPUS - -bins/$config/qps_worker -driver_port 10000 & -PID1=$! -bins/$config/qps_worker -driver_port 10010 & -PID2=$! - -export QPS_WORKERS="localhost:10000,localhost:10010" - -bins/$config/qps_driver $* - -kill -2 $PID1 $PID2 -wait - diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index 8bbb894820b..c2c2e0b6afb 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -40,7 +40,7 @@ cd $(dirname $0)/../.. config=opt -make CONFIG=$config qps_worker qps_driver -j8 +make CONFIG=$config qps_worker qps_json_driver -j8 bins/$config/qps_worker -driver_port 10000 & PID1=$! @@ -66,7 +66,7 @@ deep=100 # # Get total core count -cores=`grep -c ^processor /proc/cpuinfo` +cores=`grep -c ^processor /proc/cpuinfo || sysctl -n hw.ncpu` halfcores=`expr $cores / 2` for secure in true false; do @@ -84,7 +84,8 @@ for secure in true false; do --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \ --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ --num_servers=1 --num_clients=0 \ - --server_core_limit=$halfcores --client_core_limit=0 |& tee /tmp/qps-test.$$ + --server_core_limit=$halfcores --client_core_limit=0 2>&1 | \ + tee /tmp/qps-test.$$ # Scenario 2b: QPS with a single server core bins/$config/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ @@ -131,6 +132,6 @@ for secure in true false; do done -bins/$config/qps_driver --quit=true +bins/$config/qps_json_driver --quit=true wait diff --git a/tools/run_tests/performance/build_performance.sh b/tools/run_tests/performance/build_performance.sh index 0c9211b643c..8cfe1c48e99 100755 --- a/tools/run_tests/performance/build_performance.sh +++ b/tools/run_tests/performance/build_performance.sh @@ -42,7 +42,7 @@ CONFIG=${CONFIG:-opt} # TODO(jtattermusch): not embedding OpenSSL breaks the C# build because # grpc_csharp_ext needs OpenSSL embedded and some intermediate files from # this build will be reused. -make CONFIG=${CONFIG} EMBED_OPENSSL=true EMBED_ZLIB=true qps_worker qps_driver qps_json_driver -j8 +make CONFIG=${CONFIG} EMBED_OPENSSL=true EMBED_ZLIB=true qps_worker qps_json_driver -j8 for language in $@ do diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index c820a5493bd..fc9095d62a2 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -118,14 +118,14 @@ def create_scenario_jobspec(scenario_json, workers, remote_host=None, def create_quit_jobspec(workers, remote_host=None): """Runs quit using QPS driver.""" # setting QPS_WORKERS env variable here makes sure it works with SSH too. - cmd = 'QPS_WORKERS="%s" bins/opt/qps_driver --quit' % ','.join(workers) + cmd = 'QPS_WORKERS="%s" bins/opt/qps_json_driver --quit' % ','.join(workers) if remote_host: user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, remote_host) cmd = 'ssh %s "cd ~/performance_workspace/grpc/ && "%s' % (user_at_host, pipes.quote(cmd)) return jobset.JobSpec( cmdline=[cmd], - shortname='qps_driver.quit', + shortname='qps_json_driver.quit', timeout_seconds=3*60, shell=True, verbose_success=True) diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 7978f12d53f..b2ddace121e 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2342,26 +2342,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_config", - "grpc++_test_util", - "grpc_test_util", - "qps" - ], - "headers": [], - "language": "c++", - "name": "qps_driver", - "src": [ - "test/cpp/qps/qps_driver.cc" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", From 841e782ae502631f7094328fb520914a3f501075 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 20 Apr 2016 13:01:29 -0700 Subject: [PATCH 82/93] Just make this into a wrapper of the broader script with C++ only --- tools/jenkins/run_performance.sh | 96 +------------------------------- 1 file changed, 1 insertion(+), 95 deletions(-) diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index c2c2e0b6afb..2ad87f16a54 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -38,100 +38,6 @@ cd $(dirname $0)/../.. && tools/profiling/latency_profile/run_latency_profile.sh \ || true -config=opt - -make CONFIG=$config qps_worker qps_json_driver -j8 - -bins/$config/qps_worker -driver_port 10000 & -PID1=$! -bins/$config/qps_worker -driver_port 10010 & -PID2=$! - -# -# Put a timeout on these tests -# -((sleep 900; kill $$ && killall qps_worker && rm -f /tmp/qps-test.$$ )&) - -export QPS_WORKERS="localhost:10000,localhost:10010" - -# big is the size in bytes of large messages (0 is the size otherwise) -big=65536 - -# wide is the number of client channels in multi-channel tests (1 otherwise) -wide=64 - -# deep is the number of RPCs outstanding on a channel in non-ping-pong tests -# (the value used is 1 otherwise) -deep=100 - -# -# Get total core count -cores=`grep -c ^processor /proc/cpuinfo || sysctl -n hw.ncpu` -halfcores=`expr $cores / 2` - -for secure in true false; do - # Scenario 1: generic async streaming ping-pong (contentionless latency) - bins/$config/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=1 \ - --client_channels=1 --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 \ - --server_core_limit=$halfcores --client_core_limit=0 - - # Scenario 2: generic async streaming "unconstrained" (QPS) - bins/$config/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=0 \ - --server_core_limit=$halfcores --client_core_limit=0 2>&1 | \ - tee /tmp/qps-test.$$ - - # Scenario 2b: QPS with a single server core - bins/$config/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=0 --server_core_limit=1 --client_core_limit=0 - - # Scenario 2c: protobuf-based QPS - bins/$config/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --simple_req_size=0 --simple_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=0 \ - --server_core_limit=$halfcores --client_core_limit=0 - - # Scenario 3: Latency at sub-peak load (all clients equally loaded) - for loadfactor in 0.7; do - bins/$config/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \ - --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \ - --num_servers=1 --num_clients=0 --poisson_load=`awk -v lf=$loadfactor \ - '$5 == "QPS:" {print int(lf * $6); exit}' /tmp/qps-test.$$` \ - --server_core_limit=$halfcores --client_core_limit=0 - done - - rm /tmp/qps-test.$$ - - # Scenario 4: Single-channel bidirectional throughput test (like TCP_STREAM). - bins/$config/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \ - --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \ - --client_channels=1 --bbuf_req_size=$big --bbuf_resp_size=$big \ - --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \ - --num_servers=1 --num_clients=1 \ - --server_core_limit=$halfcores --client_core_limit=0 - - # Scenario 5: Sync unary ping-pong with protobufs - bins/$config/qps_driver --rpc_type=UNARY --client_type=SYNC_CLIENT \ - --server_type=SYNC_SERVER --outstanding_rpcs_per_channel=1 \ - --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \ - --secure_test=$secure --num_servers=1 --num_clients=1 \ - --server_core_limit=$halfcores --client_core_limit=0 - -done - -bins/$config/qps_json_driver --quit=true +tools/run_tests/run_performance_tests.py -l c++ wait From 1f13c820ed8ee4ab97da864edbf0b55bd5f87847 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 20 Apr 2016 13:04:35 -0700 Subject: [PATCH 83/93] Eliminate unused source file --- test/cpp/qps/qps_driver.cc | 212 ------------------------------------- 1 file changed, 212 deletions(-) delete mode 100644 test/cpp/qps/qps_driver.cc diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc deleted file mode 100644 index 608181f77fb..00000000000 --- a/test/cpp/qps/qps_driver.cc +++ /dev/null @@ -1,212 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include - -#include -#include - -#include "test/cpp/qps/driver.h" -#include "test/cpp/qps/report.h" -#include "test/cpp/util/benchmark_config.h" - -DEFINE_int32(num_clients, 1, "Number of client binaries"); -DEFINE_int32(num_servers, 1, "Number of server binaries"); - -DEFINE_int32(warmup_seconds, 5, "Warmup time (in seconds)"); -DEFINE_int32(benchmark_seconds, 30, "Benchmark time (in seconds)"); -DEFINE_int32(local_workers, 0, "Number of local workers to start"); - -// Server config -DEFINE_int32(async_server_threads, 1, "Number of threads for async servers"); -DEFINE_string(server_type, "SYNC_SERVER", "Server type"); -DEFINE_int32(server_core_limit, -1, "Limit on server cores to use"); - -// Client config -DEFINE_string(rpc_type, "UNARY", "Type of RPC: UNARY or STREAMING"); -DEFINE_int32(outstanding_rpcs_per_channel, 1, - "Number of outstanding rpcs per channel"); -DEFINE_int32(client_channels, 1, "Number of client channels"); - -DEFINE_int32(simple_req_size, -1, "Simple proto request payload size"); -DEFINE_int32(simple_resp_size, -1, "Simple proto response payload size"); -DEFINE_int32(bbuf_req_size, -1, "Byte-buffer request payload size"); -DEFINE_int32(bbuf_resp_size, -1, "Byte-buffer response payload size"); - -DEFINE_string(client_type, "SYNC_CLIENT", "Client type"); -DEFINE_int32(async_client_threads, 1, "Async client threads"); - -DEFINE_double(poisson_load, -1.0, "Poisson offered load (qps)"); -DEFINE_double(uniform_lo, -1.0, "Uniform low interarrival time (us)"); -DEFINE_double(uniform_hi, -1.0, "Uniform high interarrival time (us)"); -DEFINE_double(determ_load, -1.0, "Deterministic offered load (qps)"); -DEFINE_double(pareto_base, -1.0, "Pareto base interarrival time (us)"); -DEFINE_double(pareto_alpha, -1.0, "Pareto alpha value"); - -DEFINE_int32(client_core_limit, -1, "Limit on client cores to use"); - -DEFINE_bool(secure_test, false, "Run a secure test"); - -DEFINE_bool(quit, false, "Quit the workers"); - -using grpc::testing::ClientConfig; -using grpc::testing::ServerConfig; -using grpc::testing::ClientType; -using grpc::testing::ServerType; -using grpc::testing::RpcType; -using grpc::testing::SecurityParams; - -namespace grpc { -namespace testing { - -static void QpsDriver() { - if (FLAGS_quit) { - RunQuit(); - return; - } - - RpcType rpc_type; - GPR_ASSERT(RpcType_Parse(FLAGS_rpc_type, &rpc_type)); - - ClientType client_type; - ServerType server_type; - GPR_ASSERT(ClientType_Parse(FLAGS_client_type, &client_type)); - GPR_ASSERT(ServerType_Parse(FLAGS_server_type, &server_type)); - - ClientConfig client_config; - client_config.set_client_type(client_type); - client_config.set_outstanding_rpcs_per_channel( - FLAGS_outstanding_rpcs_per_channel); - client_config.set_client_channels(FLAGS_client_channels); - - // Decide which type to use based on the response type - if (FLAGS_simple_resp_size >= 0) { - auto params = - client_config.mutable_payload_config()->mutable_simple_params(); - params->set_resp_size(FLAGS_simple_resp_size); - if (FLAGS_simple_req_size >= 0) { - params->set_req_size(FLAGS_simple_req_size); - } - } else if (FLAGS_bbuf_resp_size >= 0) { - auto params = - client_config.mutable_payload_config()->mutable_bytebuf_params(); - params->set_resp_size(FLAGS_bbuf_resp_size); - if (FLAGS_bbuf_req_size >= 0) { - params->set_req_size(FLAGS_bbuf_req_size); - } - } else { - // set a reasonable default: proto but no payload - client_config.mutable_payload_config()->mutable_simple_params(); - } - - client_config.set_async_client_threads(FLAGS_async_client_threads); - client_config.set_rpc_type(rpc_type); - - // set up the load parameters - if (FLAGS_poisson_load > 0.0) { - auto poisson = client_config.mutable_load_params()->mutable_poisson(); - poisson->set_offered_load(FLAGS_poisson_load); - } else if (FLAGS_uniform_lo > 0.0) { - auto uniform = client_config.mutable_load_params()->mutable_uniform(); - uniform->set_interarrival_lo(FLAGS_uniform_lo / 1e6); - uniform->set_interarrival_hi(FLAGS_uniform_hi / 1e6); - } else if (FLAGS_determ_load > 0.0) { - auto determ = client_config.mutable_load_params()->mutable_determ(); - determ->set_offered_load(FLAGS_determ_load); - } else if (FLAGS_pareto_base > 0.0) { - auto pareto = client_config.mutable_load_params()->mutable_pareto(); - pareto->set_interarrival_base(FLAGS_pareto_base / 1e6); - pareto->set_alpha(FLAGS_pareto_alpha); - } else { - client_config.mutable_load_params()->mutable_closed_loop(); - // No further load parameters to set up for closed loop - } - - client_config.mutable_histogram_params()->set_resolution( - Histogram::default_resolution()); - client_config.mutable_histogram_params()->set_max_possible( - Histogram::default_max_possible()); - - if (FLAGS_client_core_limit > 0) { - client_config.set_core_limit(FLAGS_client_core_limit); - } - - ServerConfig server_config; - server_config.set_server_type(server_type); - server_config.set_async_server_threads(FLAGS_async_server_threads); - - if (FLAGS_server_core_limit > 0) { - server_config.set_core_limit(FLAGS_server_core_limit); - } - - if (FLAGS_bbuf_resp_size >= 0) { - *server_config.mutable_payload_config() = client_config.payload_config(); - } - - if (FLAGS_secure_test) { - // Set up security params - SecurityParams security; - security.set_use_test_ca(true); - security.set_server_host_override("foo.test.google.fr"); - client_config.mutable_security_params()->CopyFrom(security); - server_config.mutable_security_params()->CopyFrom(security); - } - - // Make sure that if we are performing a generic (bytebuf) test - // that we are also using async streaming - GPR_ASSERT(!client_config.payload_config().has_bytebuf_params() || - (client_config.client_type() == ASYNC_CLIENT && - client_config.rpc_type() == STREAMING && - server_config.server_type() == ASYNC_GENERIC_SERVER)); - - const auto result = RunScenario( - client_config, FLAGS_num_clients, server_config, FLAGS_num_servers, - FLAGS_warmup_seconds, FLAGS_benchmark_seconds, FLAGS_local_workers); - - GetReporter()->ReportQPS(*result); - GetReporter()->ReportQPSPerCore(*result); - GetReporter()->ReportLatency(*result); - GetReporter()->ReportTimes(*result); -} - -} // namespace testing -} // namespace grpc - -int main(int argc, char** argv) { - grpc::testing::InitBenchmark(&argc, &argv, true); - - grpc::testing::QpsDriver(); - - return 0; -} From 1c81329421294da7069e1617fe40104df23bf420 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 20 Apr 2016 14:17:27 -0700 Subject: [PATCH 84/93] Fix some of the scenarios core limits, thread limits, and depth --- .../run_tests/performance/scenario_config.py | 20 ++++++++-------- tools/run_tests/tests.json | 24 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index c63e0dbc381..9366b2272ac 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -109,7 +109,7 @@ class CXXLanguage: 'server_config': { 'server_type': 'ASYNC_GENERIC_SERVER', 'security_params': secargs, - 'core_limit': SINGLE_MACHINE_CORES/2, + 'core_limit': 1, 'async_server_threads': 1, 'payload_config': EMPTY_GENERIC_PAYLOAD, }, @@ -126,7 +126,7 @@ class CXXLanguage: 'security_params': secargs, 'outstanding_rpcs_per_channel': DEEP, 'client_channels': WIDE, - 'async_client_threads': 1, + 'async_client_threads': 0, 'rpc_type': 'STREAMING', 'load_params': { 'closed_loop': {} @@ -138,7 +138,7 @@ class CXXLanguage: 'server_type': 'ASYNC_GENERIC_SERVER', 'security_params': secargs, 'core_limit': SINGLE_MACHINE_CORES/2, - 'async_server_threads': 1, + 'async_server_threads': 0, 'payload_config': EMPTY_GENERIC_PAYLOAD, }, 'warmup_seconds': WARMUP_SECONDS, @@ -154,7 +154,7 @@ class CXXLanguage: 'security_params': secargs, 'outstanding_rpcs_per_channel': DEEP, 'client_channels': WIDE, - 'async_client_threads': 1, + 'async_client_threads': 0, 'rpc_type': 'STREAMING', 'load_params': { 'closed_loop': {} @@ -182,7 +182,7 @@ class CXXLanguage: 'security_params': secargs, 'outstanding_rpcs_per_channel': DEEP, 'client_channels': WIDE, - 'async_client_threads': 1, + 'async_client_threads': 0, 'rpc_type': 'STREAMING', 'load_params': { 'closed_loop': {} @@ -194,7 +194,7 @@ class CXXLanguage: 'server_type': 'ASYNC_SERVER', 'security_params': secargs, 'core_limit': SINGLE_MACHINE_CORES/2, - 'async_server_threads': 1, + 'async_server_threads': 0, }, 'warmup_seconds': WARMUP_SECONDS, 'benchmark_seconds': BENCHMARK_SECONDS @@ -207,9 +207,9 @@ class CXXLanguage: 'client_config': { 'client_type': 'ASYNC_CLIENT', 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, + 'outstanding_rpcs_per_channel': DEEP, 'client_channels': 1, - 'async_client_threads': 1, + 'async_client_threads': 0, 'rpc_type': 'STREAMING', 'load_params': { 'closed_loop': {} @@ -221,7 +221,7 @@ class CXXLanguage: 'server_type': 'ASYNC_GENERIC_SERVER', 'security_params': secargs, 'core_limit': SINGLE_MACHINE_CORES/2, - 'async_server_threads': 1, + 'async_server_threads': 0, 'payload_config': BIG_GENERIC_PAYLOAD, }, 'warmup_seconds': WARMUP_SECONDS, @@ -248,7 +248,7 @@ class CXXLanguage: 'server_config': { 'server_type': 'ASYNC_SERVER', 'security_params': secargs, - 'core_limit': SINGLE_MACHINE_CORES/2, + 'core_limit': 1, 'async_server_threads': 1, }, 'warmup_seconds': WARMUP_SECONDS, diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 21f36eb9957..adb81b1e6ae 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -22035,7 +22035,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_generic_async_streaming_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22061,7 +22061,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22087,7 +22087,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22113,7 +22113,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22139,7 +22139,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_single_channel_throughput_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_single_channel_throughput_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22165,7 +22165,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22191,7 +22191,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22217,7 +22217,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22243,7 +22243,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22269,7 +22269,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -22295,7 +22295,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_single_channel_throughput_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_single_channel_throughput_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 65536, \"req_size\": 65536}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22321,7 +22321,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ From 8909428a1a33854866fa581d27fb00a29a65d4fe Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 20 Apr 2016 14:21:30 -0700 Subject: [PATCH 85/93] clang-format --- test/cpp/qps/qps_json_driver.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index 17f3d3c4633..b2e2457bdce 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -59,10 +59,10 @@ static void QpsDriver() { bool scfile = (FLAGS_scenarios_file != ""); bool scjson = (FLAGS_scenarios_json != ""); if ((!scfile && !scjson && !FLAGS_quit) || - (scfile && (scjson || FLAGS_quit)) || - (scjson && FLAGS_quit)) { - gpr_log(GPR_ERROR, "Exactly one of --scenarios_file, --scenarios_json, " - "or --quit must be set"); + (scfile && (scjson || FLAGS_quit)) || (scjson && FLAGS_quit)) { + gpr_log(GPR_ERROR, + "Exactly one of --scenarios_file, --scenarios_json, " + "or --quit must be set"); abort(); } From 108f93ddf08bbab8789c708b576dadd3a6a43903 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 20 Apr 2016 17:58:41 -0700 Subject: [PATCH 86/93] add unary pingpong scenarios for c++ --- .../run_tests/performance/scenario_config.py | 56 ++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 9366b2272ac..cf3c8ae80af 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -228,7 +228,7 @@ class CXXLanguage: 'benchmark_seconds': BENCHMARK_SECONDS } yield { - 'name': 'cpp_protobuf_async_ping_pong_%s' + 'name': 'cpp_protobuf_async_streaming_ping_pong_%s' % secstr, 'num_servers': 1, 'num_clients': 1, @@ -254,6 +254,60 @@ class CXXLanguage: 'warmup_seconds': WARMUP_SECONDS, 'benchmark_seconds': BENCHMARK_SECONDS } + yield { + 'name': 'cpp_protobuf_sync_unary_ping_pong_%s' + % secstr, + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'SYNC_CLIENT', + 'security_params': secargs, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 0, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'SYNC_SERVER', + 'security_params': secargs, + 'core_limit': 1, + 'async_server_threads': 0, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS + } + yield { + 'name': 'cpp_protobuf_async_unary_ping_pong_%s' + % secstr, + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'ASYNC_CLIENT', + 'security_params': secargs, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'ASYNC_SERVER', + 'security_params': secargs, + 'core_limit': 1, + 'async_server_threads': 1, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS + } def __str__(self): return 'c++' From 75576b6da6a52cdae5d5548c4d768207df91cb5b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 20 Apr 2016 18:47:14 -0700 Subject: [PATCH 87/93] regenerate tests.json --- tools/run_tests/tests.json | 112 +++++++++++++++++++++++++++++++++++-- 1 file changed, 108 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 0c1d7bc5e63..1afcd2e632c 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -22189,7 +22189,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22210,7 +22210,59 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_async_ping_pong_secure" + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_secure" + }, + { + "args": [ + "--scenario_json", + "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + ], + "boringssl": true, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1000.0, + "defaults": "boringssl", + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_secure" + }, + { + "args": [ + "--scenario_json", + "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + ], + "boringssl": true, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1000.0, + "defaults": "boringssl", + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure" }, { "args": [ @@ -22345,7 +22397,59 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + ], + "boringssl": true, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1000.0, + "defaults": "boringssl", + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_insecure" + }, + { + "args": [ + "--scenario_json", + "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + ], + "boringssl": true, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1000.0, + "defaults": "boringssl", + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_insecure" + }, + { + "args": [ + "--scenario_json", + "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22366,7 +22470,7 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_async_ping_pong_insecure" + "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure" }, { "args": [ From ac0f020ddc530f98ca94141cd204868bb1275304 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 21 Apr 2016 07:11:52 -0700 Subject: [PATCH 88/93] upgrade go docker image to golang:1.5 --- templates/tools/dockerfile/go_path.include | 2 +- .../stress_test/grpc_interop_stress_go/Dockerfile.template | 2 +- tools/dockerfile/grpc_interop_go/Dockerfile | 4 ++-- .../dockerfile/stress_test/grpc_interop_stress_go/Dockerfile | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/tools/dockerfile/go_path.include b/templates/tools/dockerfile/go_path.include index d61b6f6984c..a41cc49d380 100644 --- a/templates/tools/dockerfile/go_path.include +++ b/templates/tools/dockerfile/go_path.include @@ -1,2 +1,2 @@ # Using login shell removes Go from path, so we add it. -RUN ln -s /usr/src/go/bin/go /usr/local/bin +RUN ln -s /usr/local/go/bin/go /usr/local/bin diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template index 20e4d825cad..3ed3d6556f9 100644 --- a/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template +++ b/templates/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile.template @@ -29,7 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - FROM golang:1.4 + FROM golang:1.5 <%include file="../../gcp_api_libraries.include"/> <%include file="../../go_path.include"/> diff --git a/tools/dockerfile/grpc_interop_go/Dockerfile b/tools/dockerfile/grpc_interop_go/Dockerfile index bb60f09f247..ec71a53c2d3 100644 --- a/tools/dockerfile/grpc_interop_go/Dockerfile +++ b/tools/dockerfile/grpc_interop_go/Dockerfile @@ -27,10 +27,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM golang:1.4 +FROM golang:1.5 # Using login shell removes Go from path, so we add it. -RUN ln -s /usr/src/go/bin/go /usr/local/bin +RUN ln -s /usr/local/go/bin/go /usr/local/bin # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile index feda3fc9bcf..2a875f59f19 100644 --- a/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile +++ b/tools/dockerfile/stress_test/grpc_interop_stress_go/Dockerfile @@ -27,7 +27,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM golang:1.4 +FROM golang:1.5 # Google Cloud platform API libraries RUN apt-get update && apt-get install -y python-pip && apt-get clean @@ -35,7 +35,7 @@ RUN pip install --upgrade google-api-python-client # Using login shell removes Go from path, so we add it. -RUN ln -s /usr/src/go/bin/go /usr/local/bin +RUN ln -s /usr/local/go/bin/go /usr/local/bin # Define the default command. CMD ["bash"] From 549da44e80547401c1dbdb312a42a37f04be14b4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 21 Apr 2016 07:23:00 -0700 Subject: [PATCH 89/93] also update interop_http2 image --- tools/dockerfile/grpc_interop_http2/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/dockerfile/grpc_interop_http2/Dockerfile b/tools/dockerfile/grpc_interop_http2/Dockerfile index bb60f09f247..ec71a53c2d3 100644 --- a/tools/dockerfile/grpc_interop_http2/Dockerfile +++ b/tools/dockerfile/grpc_interop_http2/Dockerfile @@ -27,10 +27,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM golang:1.4 +FROM golang:1.5 # Using login shell removes Go from path, so we add it. -RUN ln -s /usr/src/go/bin/go /usr/local/bin +RUN ln -s /usr/local/go/bin/go /usr/local/bin # Define the default command. CMD ["bash"] From b688db087a6840a2a216fae62cfe544738af2f40 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 21 Apr 2016 08:53:45 -0700 Subject: [PATCH 90/93] actually fail on failure --- tools/run_tests/run_performance_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index cf68b6eaf88..ada341abf54 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -361,5 +361,6 @@ try: sys.exit(1) except: traceback.print_exc() + raise finally: finish_qps_workers(qpsworker_jobs) From b49d9e32c9b4bbc82761e36e43cf819ff48b1704 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 21 Apr 2016 09:30:28 -0700 Subject: [PATCH 91/93] stop running latency profile in performance tests --- tools/jenkins/run_performance.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index 2ad87f16a54..9bdd1166401 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -34,10 +34,4 @@ set -ex # Enter the gRPC repo root cd $(dirname $0)/../.. -[[ $* =~ '--latency_profile' ]] \ - && tools/profiling/latency_profile/run_latency_profile.sh \ - || true - tools/run_tests/run_performance_tests.py -l c++ - -wait From 5eacbd98146e2eb008c05453e8e2c6360b800244 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 21 Apr 2016 09:32:14 -0700 Subject: [PATCH 92/93] also run node ruby and C# --- tools/jenkins/run_performance.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index 9bdd1166401..903a1442151 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -34,4 +34,4 @@ set -ex # Enter the gRPC repo root cd $(dirname $0)/../.. -tools/run_tests/run_performance_tests.py -l c++ +tools/run_tests/run_performance_tests.py -l c++ node ruby csharp From 962c38787ce4d8c3bb373ff032ebbf0deae429af Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 21 Apr 2016 10:09:06 -0700 Subject: [PATCH 93/93] update script to initialize perf worker --- tools/gce/linux_performance_worker_init.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index c7272b61a5f..478e04ef370 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -82,9 +82,12 @@ sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang # Python dependencies sudo pip install tabulate +sudo pip install google-api-python-client + curl -O https://bootstrap.pypa.io/get-pip.py sudo pypy get-pip.py sudo pypy -m pip install tabulate +sudo pip install google-api-python-client # Node dependencies (nvm has to be installed under user jenkins) touch .profile @@ -102,4 +105,8 @@ sudo apt-get install -y mono-devel nuget gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 curl -sSL https://get.rvm.io | bash -s stable --ruby +# Install bundler (prerequisite for gRPC Ruby) +source ~/.rvm/scripts/rvm +gem install bundler + # Java dependencies - nothing as we already have Java JDK 8