From 7c1b5db3bb000a7c69d9d8151c66fecbacce64c3 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 30 Mar 2018 13:28:56 -0700 Subject: Convert subchannel_list code to C++. --- grpc.gyp | 2 -- 1 file changed, 2 deletions(-) (limited to 'grpc.gyp') diff --git a/grpc.gyp b/grpc.gyp index 30664695b3..00effc2be0 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -529,7 +529,6 @@ 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc', 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', - 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc', 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc', @@ -1258,7 +1257,6 @@ 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', - 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc', 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', 'src/core/ext/census/grpc_context.cc', 'src/core/ext/filters/max_age/max_age_filter.cc', -- cgit v1.2.3 From de077acf5da5c720253ab1232d90872a494a64ce Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 12 Apr 2018 08:05:44 -0700 Subject: Fix retry code handling of internally triggered recv_trailing_metadata. --- CMakeLists.txt | 2 + Makefile | 2 + gRPC-Core.podspec | 1 + grpc.gyp | 2 + .../ext/filters/client_channel/client_channel.cc | 353 +++++++++------ test/core/end2end/end2end_nosec_tests.cc | 8 + test/core/end2end/end2end_tests.cc | 8 + test/core/end2end/gen_build_yaml.py | 3 + test/core/end2end/generate_tests.bzl | 2 + ...status_before_recv_trailing_metadata_started.cc | 266 ++++++++++++ tools/run_tests/generated/sources_and_headers.json | 2 + tools/run_tests/generated/tests.json | 477 +++++++++++++++++++++ 12 files changed, 994 insertions(+), 132 deletions(-) create mode 100644 test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc (limited to 'grpc.gyp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 18400ea22a..75146d35b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5248,6 +5248,7 @@ add_library(end2end_tests test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc test/core/end2end/tests/retry_non_retriable_status.cc + test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc test/core/end2end/tests/retry_recv_initial_metadata.cc test/core/end2end/tests/retry_recv_message.cc test/core/end2end/tests/retry_server_pushback_delay.cc @@ -5365,6 +5366,7 @@ add_library(end2end_nosec_tests test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc test/core/end2end/tests/retry_non_retriable_status.cc + test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc test/core/end2end/tests/retry_recv_initial_metadata.cc test/core/end2end/tests/retry_recv_message.cc test/core/end2end/tests/retry_server_pushback_delay.cc diff --git a/Makefile b/Makefile index da5f2efebf..1a12b5abbe 100644 --- a/Makefile +++ b/Makefile @@ -9876,6 +9876,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc \ test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc \ test/core/end2end/tests/retry_non_retriable_status.cc \ + test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc \ test/core/end2end/tests/retry_recv_initial_metadata.cc \ test/core/end2end/tests/retry_recv_message.cc \ test/core/end2end/tests/retry_server_pushback_delay.cc \ @@ -9991,6 +9992,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc \ test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc \ test/core/end2end/tests/retry_non_retriable_status.cc \ + test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc \ test/core/end2end/tests/retry_recv_initial_metadata.cc \ test/core/end2end/tests/retry_recv_message.cc \ test/core/end2end/tests/retry_server_pushback_delay.cc \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index bd192b43ca..fc6b31fd23 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1214,6 +1214,7 @@ Pod::Spec.new do |s| 'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc', 'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc', 'test/core/end2end/tests/retry_non_retriable_status.cc', + 'test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc', 'test/core/end2end/tests/retry_recv_initial_metadata.cc', 'test/core/end2end/tests/retry_recv_message.cc', 'test/core/end2end/tests/retry_server_pushback_delay.cc', diff --git a/grpc.gyp b/grpc.gyp index 8d9422eee6..5dd77b3b6d 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -2622,6 +2622,7 @@ 'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc', 'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc', 'test/core/end2end/tests/retry_non_retriable_status.cc', + 'test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc', 'test/core/end2end/tests/retry_recv_initial_metadata.cc', 'test/core/end2end/tests/retry_recv_message.cc', 'test/core/end2end/tests/retry_server_pushback_delay.cc', @@ -2711,6 +2712,7 @@ 'test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc', 'test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc', 'test/core/end2end/tests/retry_non_retriable_status.cc', + 'test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc', 'test/core/end2end/tests/retry_recv_initial_metadata.cc', 'test/core/end2end/tests/retry_recv_message.cc', 'test/core/end2end/tests/retry_server_pushback_delay.cc', diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index a10bfea8b1..33cf56519e 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -842,10 +842,11 @@ typedef struct { bool completed_recv_trailing_metadata : 1; // State for callback processing. bool retry_dispatched : 1; - bool recv_initial_metadata_ready_deferred : 1; - bool recv_message_ready_deferred : 1; + subchannel_batch_data* recv_initial_metadata_ready_deferred_batch; grpc_error* recv_initial_metadata_error; + subchannel_batch_data* recv_message_ready_deferred_batch; grpc_error* recv_message_error; + subchannel_batch_data* recv_trailing_metadata_internal_batch; } subchannel_call_retry_state; // Pending batches stored in call data. @@ -994,6 +995,39 @@ static void maybe_cache_send_ops_for_batch(call_data* calld, } } +// Frees cached send_initial_metadata. +static void free_cached_send_initial_metadata(channel_data* chand, + call_data* calld) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: destroying calld->send_initial_metadata", chand, + calld); + } + grpc_metadata_batch_destroy(&calld->send_initial_metadata); +} + +// Frees cached send_message at index idx. +static void free_cached_send_message(channel_data* chand, call_data* calld, + size_t idx) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: destroying calld->send_messages[%" PRIuPTR "]", + chand, calld, idx); + } + (*calld->send_messages)[idx]->Destroy(); +} + +// Frees cached send_trailing_metadata. +static void free_cached_send_trailing_metadata(channel_data* chand, + call_data* calld) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: destroying calld->send_trailing_metadata", + chand, calld); + } + grpc_metadata_batch_destroy(&calld->send_trailing_metadata); +} + // Frees cached send ops that have already been completed after // committing the call. static void free_cached_send_op_data_after_commit( @@ -1001,19 +1035,13 @@ static void free_cached_send_op_data_after_commit( channel_data* chand = static_cast(elem->channel_data); call_data* calld = static_cast(elem->call_data); if (retry_state->completed_send_initial_metadata) { - grpc_metadata_batch_destroy(&calld->send_initial_metadata); + free_cached_send_initial_metadata(chand, calld); } for (size_t i = 0; i < retry_state->completed_send_message_count; ++i) { - if (grpc_client_channel_trace.enabled()) { - gpr_log(GPR_DEBUG, - "chand=%p calld=%p: destroying calld->send_messages[%" PRIuPTR - "]", - chand, calld, i); - } - (*calld->send_messages)[i]->Destroy(); + free_cached_send_message(chand, calld, i); } if (retry_state->completed_send_trailing_metadata) { - grpc_metadata_batch_destroy(&calld->send_trailing_metadata); + free_cached_send_trailing_metadata(chand, calld); } } @@ -1025,20 +1053,14 @@ static void free_cached_send_op_data_for_completed_batch( channel_data* chand = static_cast(elem->channel_data); call_data* calld = static_cast(elem->call_data); if (batch_data->batch.send_initial_metadata) { - grpc_metadata_batch_destroy(&calld->send_initial_metadata); + free_cached_send_initial_metadata(chand, calld); } if (batch_data->batch.send_message) { - if (grpc_client_channel_trace.enabled()) { - gpr_log(GPR_DEBUG, - "chand=%p calld=%p: destroying calld->send_messages[%" PRIuPTR - "]", - chand, calld, retry_state->completed_send_message_count - 1); - } - (*calld->send_messages)[retry_state->completed_send_message_count - 1] - ->Destroy(); + free_cached_send_message(chand, calld, + retry_state->completed_send_message_count - 1); } if (batch_data->batch.send_trailing_metadata) { - grpc_metadata_batch_destroy(&calld->send_trailing_metadata); + free_cached_send_trailing_metadata(chand, calld); } } @@ -1642,7 +1664,7 @@ static void recv_initial_metadata_ready(void* arg, grpc_error* error) { "(Trailers-Only)", chand, calld); } - retry_state->recv_initial_metadata_ready_deferred = true; + retry_state->recv_initial_metadata_ready_deferred_batch = batch_data; retry_state->recv_initial_metadata_error = GRPC_ERROR_REF(error); if (!retry_state->started_recv_trailing_metadata) { // recv_trailing_metadata not yet started by application; start it @@ -1731,7 +1753,7 @@ static void recv_message_ready(void* arg, grpc_error* error) { "message and recv_trailing_metadata pending)", chand, calld); } - retry_state->recv_message_ready_deferred = true; + retry_state->recv_message_ready_deferred_batch = batch_data; retry_state->recv_message_error = GRPC_ERROR_REF(error); if (!retry_state->started_recv_trailing_metadata) { // recv_trailing_metadata not yet started by application; start it @@ -1749,6 +1771,59 @@ static void recv_message_ready(void* arg, grpc_error* error) { GRPC_ERROR_UNREF(error); } +// +// list of closures to execute in call combiner +// + +// Represents a closure that needs to run in the call combiner as part of +// starting or completing a batch. +typedef struct { + grpc_closure* closure; + grpc_error* error; + const char* reason; + bool free_reason = false; +} closure_to_execute; + +static void execute_closures_in_call_combiner(grpc_call_element* elem, + const char* caller, + closure_to_execute* closures, + size_t num_closures) { + channel_data* chand = static_cast(elem->channel_data); + call_data* calld = static_cast(elem->call_data); + // Note that the call combiner will be yielded for each closure that + // we schedule. We're already running in the call combiner, so one of + // the closures can be scheduled directly, but the others will + // have to re-enter the call combiner. + if (num_closures > 0) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: %s starting closure: %s", chand, + calld, caller, closures[0].reason); + } + GRPC_CLOSURE_SCHED(closures[0].closure, closures[0].error); + if (closures[0].free_reason) { + gpr_free(const_cast(closures[0].reason)); + } + for (size_t i = 1; i < num_closures; ++i) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, + "chand=%p calld=%p: %s starting closure in call combiner: %s", + chand, calld, caller, closures[i].reason); + } + GRPC_CALL_COMBINER_START(calld->call_combiner, closures[i].closure, + closures[i].error, closures[i].reason); + if (closures[i].free_reason) { + gpr_free(const_cast(closures[i].reason)); + } + } + } else { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: no closures to run for %s", chand, + calld, caller); + } + GRPC_CALL_COMBINER_STOP(calld->call_combiner, "no closures to run"); + } +} + // // on_complete callback handling // @@ -1777,36 +1852,35 @@ static void update_retry_state_for_completed_batch( } } -// Represents a closure that needs to run as a result of a completed batch. -typedef struct { - grpc_closure* closure; - grpc_error* error; - const char* reason; -} closure_to_execute; - // Adds any necessary closures for deferred recv_initial_metadata and // recv_message callbacks to closures, updating *num_closures as needed. static void add_closures_for_deferred_recv_callbacks( subchannel_batch_data* batch_data, subchannel_call_retry_state* retry_state, closure_to_execute* closures, size_t* num_closures) { - if (batch_data->batch.recv_trailing_metadata && - retry_state->recv_initial_metadata_ready_deferred) { - closure_to_execute* closure = &closures[(*num_closures)++]; - closure->closure = - GRPC_CLOSURE_INIT(&batch_data->recv_initial_metadata_ready, - invoke_recv_initial_metadata_callback, batch_data, - grpc_schedule_on_exec_ctx); - closure->error = retry_state->recv_initial_metadata_error; - closure->reason = "resuming recv_initial_metadata_ready"; - } - if (batch_data->batch.recv_trailing_metadata && - retry_state->recv_message_ready_deferred) { - closure_to_execute* closure = &closures[(*num_closures)++]; - closure->closure = GRPC_CLOSURE_INIT(&batch_data->recv_message_ready, - invoke_recv_message_callback, - batch_data, grpc_schedule_on_exec_ctx); - closure->error = retry_state->recv_message_error; - closure->reason = "resuming recv_message_ready"; + if (batch_data->batch.recv_trailing_metadata) { + // Add closure for deferred recv_initial_metadata_ready. + if (retry_state->recv_initial_metadata_ready_deferred_batch != nullptr) { + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = GRPC_CLOSURE_INIT( + &batch_data->recv_initial_metadata_ready, + invoke_recv_initial_metadata_callback, + retry_state->recv_initial_metadata_ready_deferred_batch, + grpc_schedule_on_exec_ctx); + closure->error = retry_state->recv_initial_metadata_error; + closure->reason = "resuming recv_initial_metadata_ready"; + retry_state->recv_initial_metadata_ready_deferred_batch = nullptr; + } + // Add closure for deferred recv_message_ready. + if (retry_state->recv_message_ready_deferred_batch != nullptr) { + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = GRPC_CLOSURE_INIT( + &batch_data->recv_message_ready, invoke_recv_message_callback, + retry_state->recv_message_ready_deferred_batch, + grpc_schedule_on_exec_ctx); + closure->error = retry_state->recv_message_error; + closure->reason = "resuming recv_message_ready"; + retry_state->recv_message_ready_deferred_batch = nullptr; + } } } @@ -1951,6 +2025,8 @@ static void on_complete(void* arg, grpc_error* error) { // If we have previously completed recv_trailing_metadata, then the // call is finished. bool call_finished = retry_state->completed_recv_trailing_metadata; + // Record whether we were already committed before receiving this callback. + const bool previously_committed = calld->retry_committed; // Update bookkeeping in retry_state. update_retry_state_for_completed_batch(batch_data, retry_state); if (call_finished) { @@ -1979,35 +2055,39 @@ static void on_complete(void* arg, grpc_error* error) { if (md_batch->idx.named.grpc_retry_pushback_ms != nullptr) { server_pushback_md = &md_batch->idx.named.grpc_retry_pushback_ms->md; } - } else if (retry_state->completed_recv_trailing_metadata) { - call_finished = true; - } - if (call_finished && grpc_client_channel_trace.enabled()) { - gpr_log(GPR_DEBUG, "chand=%p calld=%p: call finished, status=%s", chand, - calld, grpc_status_code_to_string(status)); } - // If the call is finished, check if we should retry. - if (call_finished && - maybe_retry(elem, batch_data, status, server_pushback_md)) { - // Unref batch_data for deferred recv_initial_metadata_ready or - // recv_message_ready callbacks, if any. - if (batch_data->batch.recv_trailing_metadata && - retry_state->recv_initial_metadata_ready_deferred) { - batch_data_unref(batch_data); - GRPC_ERROR_UNREF(retry_state->recv_initial_metadata_error); + // If the call just finished, check if we should retry. + if (call_finished) { + if (grpc_client_channel_trace.enabled()) { + gpr_log(GPR_DEBUG, "chand=%p calld=%p: call finished, status=%s", chand, + calld, grpc_status_code_to_string(status)); } - if (batch_data->batch.recv_trailing_metadata && - retry_state->recv_message_ready_deferred) { + if (maybe_retry(elem, batch_data, status, server_pushback_md)) { + // Unref batch_data for deferred recv_initial_metadata_ready or + // recv_message_ready callbacks, if any. + if (batch_data->batch.recv_trailing_metadata && + retry_state->recv_initial_metadata_ready_deferred_batch != + nullptr) { + batch_data_unref(batch_data); + GRPC_ERROR_UNREF(retry_state->recv_initial_metadata_error); + } + if (batch_data->batch.recv_trailing_metadata && + retry_state->recv_message_ready_deferred_batch != nullptr) { + batch_data_unref(batch_data); + GRPC_ERROR_UNREF(retry_state->recv_message_error); + } batch_data_unref(batch_data); - GRPC_ERROR_UNREF(retry_state->recv_message_error); + return; } - batch_data_unref(batch_data); - return; + // Not retrying, so commit the call. + retry_commit(elem, retry_state); } } - // If the call is finished or retries are committed, free cached data for - // send ops that we've just completed. - if (call_finished || calld->retry_committed) { + // If we were already committed before receiving this callback, free + // cached data for send ops that we've just completed. (If the call has + // just now finished, the call to retry_commit() above will have freed all + // cached send ops, so we don't need to do it here.) + if (previously_committed) { free_cached_send_op_data_for_completed_batch(elem, batch_data, retry_state); } // Call not being retried. @@ -2042,20 +2122,8 @@ static void on_complete(void* arg, grpc_error* error) { // Don't need batch_data anymore. batch_data_unref(batch_data); // Schedule all of the closures identified above. - // Note that the call combiner will be yielded for each closure that - // we schedule. We're already running in the call combiner, so one of - // the closures can be scheduled directly, but the others will - // have to re-enter the call combiner. - if (num_closures > 0) { - GRPC_CLOSURE_SCHED(closures[0].closure, closures[0].error); - for (size_t i = 1; i < num_closures; ++i) { - GRPC_CALL_COMBINER_START(calld->call_combiner, closures[i].closure, - closures[i].error, closures[i].reason); - } - } else { - GRPC_CALL_COMBINER_STOP(calld->call_combiner, - "no closures to run for on_complete"); - } + execute_closures_in_call_combiner(elem, "on_complete", closures, + num_closures); } // @@ -2072,6 +2140,31 @@ static void start_batch_in_call_combiner(void* arg, grpc_error* ignored) { grpc_subchannel_call_process_op(subchannel_call, batch); } +// Adds a closure to closures that will execute batch in the call combiner. +static void add_closure_for_subchannel_batch( + call_data* calld, grpc_transport_stream_op_batch* batch, + closure_to_execute* closures, size_t* num_closures) { + batch->handler_private.extra_arg = calld->subchannel_call; + GRPC_CLOSURE_INIT(&batch->handler_private.closure, + start_batch_in_call_combiner, batch, + grpc_schedule_on_exec_ctx); + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = &batch->handler_private.closure; + closure->error = GRPC_ERROR_NONE; + // If the tracer is enabled, we log a more detailed message, which + // requires dynamic allocation. This will be freed in + // start_retriable_subchannel_batches(). + if (grpc_client_channel_trace.enabled()) { + char* batch_str = grpc_transport_stream_op_batch_string(batch); + gpr_asprintf(const_cast(&closure->reason), + "starting batch in call combiner: %s", batch_str); + gpr_free(batch_str); + closure->free_reason = true; + } else { + closure->reason = "start_subchannel_batch"; + } +} + // Adds retriable send_initial_metadata op to batch_data. static void add_retriable_send_initial_metadata_op( call_data* calld, subchannel_call_retry_state* retry_state, @@ -2227,8 +2320,12 @@ static void start_internal_recv_trailing_metadata(grpc_call_element* elem) { static_cast( grpc_connected_subchannel_call_get_parent_data( calld->subchannel_call)); - subchannel_batch_data* batch_data = batch_data_create(elem, 1); + // Create batch_data with 2 refs, since this batch will be unreffed twice: + // once when the subchannel batch returns, and again when we actually get + // a recv_trailing_metadata op from the surface. + subchannel_batch_data* batch_data = batch_data_create(elem, 2); add_retriable_recv_trailing_metadata_op(calld, retry_state, batch_data); + retry_state->recv_trailing_metadata_internal_batch = batch_data; // Note: This will release the call combiner. grpc_subchannel_call_process_op(calld->subchannel_call, &batch_data->batch); } @@ -2299,7 +2396,7 @@ static subchannel_batch_data* maybe_create_subchannel_batch_for_replay( // *num_batches as needed. static void add_subchannel_batches_for_pending_batches( grpc_call_element* elem, subchannel_call_retry_state* retry_state, - grpc_transport_stream_op_batch** batches, size_t* num_batches) { + closure_to_execute* closures, size_t* num_closures) { call_data* calld = static_cast(elem->call_data); for (size_t i = 0; i < GPR_ARRAY_SIZE(calld->pending_batches); ++i) { pending_batch* pending = &calld->pending_batches[i]; @@ -2342,13 +2439,37 @@ static void add_subchannel_batches_for_pending_batches( } if (batch->recv_trailing_metadata && retry_state->started_recv_trailing_metadata) { + // If we previously completed a recv_trailing_metadata op + // initiated by start_internal_recv_trailing_metadata(), use the + // result of that instead of trying to re-start this op. + if (retry_state->recv_trailing_metadata_internal_batch != nullptr) { + // If the batch completed, then trigger the completion callback + // directly, so that we return the previously returned results to + // the application. Otherwise, just unref the internally + // started subchannel batch, since we'll propagate the + // completion when it completes. + if (retry_state->completed_recv_trailing_metadata) { + subchannel_batch_data* batch_data = + retry_state->recv_trailing_metadata_internal_batch; + closure_to_execute* closure = &closures[(*num_closures)++]; + closure->closure = &batch_data->on_complete; + // Batches containing recv_trailing_metadata always succeed. + closure->error = GRPC_ERROR_NONE; + closure->reason = + "re-executing on_complete for recv_trailing_metadata " + "to propagate internally triggered result"; + } else { + batch_data_unref(retry_state->recv_trailing_metadata_internal_batch); + } + retry_state->recv_trailing_metadata_internal_batch = nullptr; + } continue; } // If we're not retrying, just send the batch as-is. if (calld->method_params == nullptr || calld->method_params->retry_policy() == nullptr || calld->retry_committed) { - batches[(*num_batches)++] = batch; + add_closure_for_subchannel_batch(calld, batch, closures, num_closures); pending_batch_clear(calld, pending); continue; } @@ -2385,7 +2506,8 @@ static void add_subchannel_batches_for_pending_batches( GPR_ASSERT(batch->collect_stats); add_retriable_recv_trailing_metadata_op(calld, retry_state, batch_data); } - batches[(*num_batches)++] = &batch_data->batch; + add_closure_for_subchannel_batch(calld, &batch_data->batch, closures, + num_closures); } } @@ -2403,62 +2525,29 @@ static void start_retriable_subchannel_batches(void* arg, grpc_error* ignored) { static_cast( grpc_connected_subchannel_call_get_parent_data( calld->subchannel_call)); + // Construct list of closures to execute, one for each pending batch. // We can start up to 6 batches. - grpc_transport_stream_op_batch* - batches[GPR_ARRAY_SIZE(calld->pending_batches)]; - size_t num_batches = 0; + closure_to_execute closures[GPR_ARRAY_SIZE(calld->pending_batches)]; + size_t num_closures = 0; // Replay previously-returned send_* ops if needed. subchannel_batch_data* replay_batch_data = maybe_create_subchannel_batch_for_replay(elem, retry_state); if (replay_batch_data != nullptr) { - batches[num_batches++] = &replay_batch_data->batch; + add_closure_for_subchannel_batch(calld, &replay_batch_data->batch, closures, + &num_closures); } // Now add pending batches. - add_subchannel_batches_for_pending_batches(elem, retry_state, batches, - &num_batches); + add_subchannel_batches_for_pending_batches(elem, retry_state, closures, + &num_closures); // Start batches on subchannel call. - // Note that the call combiner will be yielded for each batch that we - // send down. We're already running in the call combiner, so one of - // the batches can be started directly, but the others will have to - // re-enter the call combiner. if (grpc_client_channel_trace.enabled()) { gpr_log(GPR_DEBUG, "chand=%p calld=%p: starting %" PRIuPTR " retriable batches on subchannel_call=%p", - chand, calld, num_batches, calld->subchannel_call); - } - if (num_batches == 0) { - // This should be fairly rare, but it can happen when (e.g.) an - // attempt completes before it has finished replaying all - // previously sent messages. - GRPC_CALL_COMBINER_STOP(calld->call_combiner, - "no retriable subchannel batches to start"); - } else { - for (size_t i = 1; i < num_batches; ++i) { - if (grpc_client_channel_trace.enabled()) { - char* batch_str = grpc_transport_stream_op_batch_string(batches[i]); - gpr_log(GPR_DEBUG, - "chand=%p calld=%p: starting batch in call combiner: %s", chand, - calld, batch_str); - gpr_free(batch_str); - } - batches[i]->handler_private.extra_arg = calld->subchannel_call; - GRPC_CLOSURE_INIT(&batches[i]->handler_private.closure, - start_batch_in_call_combiner, batches[i], - grpc_schedule_on_exec_ctx); - GRPC_CALL_COMBINER_START(calld->call_combiner, - &batches[i]->handler_private.closure, - GRPC_ERROR_NONE, "start_subchannel_batch"); - } - if (grpc_client_channel_trace.enabled()) { - char* batch_str = grpc_transport_stream_op_batch_string(batches[0]); - gpr_log(GPR_DEBUG, "chand=%p calld=%p: starting batch: %s", chand, calld, - batch_str); - gpr_free(batch_str); - } - // Note: This will release the call combiner. - grpc_subchannel_call_process_op(calld->subchannel_call, batches[0]); + chand, calld, num_closures, calld->subchannel_call); } + execute_closures_in_call_combiner(elem, "start_retriable_subchannel_batches", + closures, num_closures); } // diff --git a/test/core/end2end/end2end_nosec_tests.cc b/test/core/end2end/end2end_nosec_tests.cc index 297408cd92..59eb643a93 100644 --- a/test/core/end2end/end2end_nosec_tests.cc +++ b/test/core/end2end/end2end_nosec_tests.cc @@ -132,6 +132,8 @@ extern void retry_exceeds_buffer_size_in_subsequent_batch(grpc_end2end_test_conf extern void retry_exceeds_buffer_size_in_subsequent_batch_pre_init(void); extern void retry_non_retriable_status(grpc_end2end_test_config config); extern void retry_non_retriable_status_pre_init(void); +extern void retry_non_retriable_status_before_recv_trailing_metadata_started(grpc_end2end_test_config config); +extern void retry_non_retriable_status_before_recv_trailing_metadata_started_pre_init(void); extern void retry_recv_initial_metadata(grpc_end2end_test_config config); extern void retry_recv_initial_metadata_pre_init(void); extern void retry_recv_message(grpc_end2end_test_config config); @@ -236,6 +238,7 @@ void grpc_end2end_tests_pre_init(void) { retry_exceeds_buffer_size_in_initial_batch_pre_init(); retry_exceeds_buffer_size_in_subsequent_batch_pre_init(); retry_non_retriable_status_pre_init(); + retry_non_retriable_status_before_recv_trailing_metadata_started_pre_init(); retry_recv_initial_metadata_pre_init(); retry_recv_message_pre_init(); retry_server_pushback_delay_pre_init(); @@ -320,6 +323,7 @@ void grpc_end2end_tests(int argc, char **argv, retry_exceeds_buffer_size_in_initial_batch(config); retry_exceeds_buffer_size_in_subsequent_batch(config); retry_non_retriable_status(config); + retry_non_retriable_status_before_recv_trailing_metadata_started(config); retry_recv_initial_metadata(config); retry_recv_message(config); retry_server_pushback_delay(config); @@ -552,6 +556,10 @@ void grpc_end2end_tests(int argc, char **argv, retry_non_retriable_status(config); continue; } + if (0 == strcmp("retry_non_retriable_status_before_recv_trailing_metadata_started", argv[i])) { + retry_non_retriable_status_before_recv_trailing_metadata_started(config); + continue; + } if (0 == strcmp("retry_recv_initial_metadata", argv[i])) { retry_recv_initial_metadata(config); continue; diff --git a/test/core/end2end/end2end_tests.cc b/test/core/end2end/end2end_tests.cc index 9b3f655254..9f164b4ead 100644 --- a/test/core/end2end/end2end_tests.cc +++ b/test/core/end2end/end2end_tests.cc @@ -134,6 +134,8 @@ extern void retry_exceeds_buffer_size_in_subsequent_batch(grpc_end2end_test_conf extern void retry_exceeds_buffer_size_in_subsequent_batch_pre_init(void); extern void retry_non_retriable_status(grpc_end2end_test_config config); extern void retry_non_retriable_status_pre_init(void); +extern void retry_non_retriable_status_before_recv_trailing_metadata_started(grpc_end2end_test_config config); +extern void retry_non_retriable_status_before_recv_trailing_metadata_started_pre_init(void); extern void retry_recv_initial_metadata(grpc_end2end_test_config config); extern void retry_recv_initial_metadata_pre_init(void); extern void retry_recv_message(grpc_end2end_test_config config); @@ -239,6 +241,7 @@ void grpc_end2end_tests_pre_init(void) { retry_exceeds_buffer_size_in_initial_batch_pre_init(); retry_exceeds_buffer_size_in_subsequent_batch_pre_init(); retry_non_retriable_status_pre_init(); + retry_non_retriable_status_before_recv_trailing_metadata_started_pre_init(); retry_recv_initial_metadata_pre_init(); retry_recv_message_pre_init(); retry_server_pushback_delay_pre_init(); @@ -324,6 +327,7 @@ void grpc_end2end_tests(int argc, char **argv, retry_exceeds_buffer_size_in_initial_batch(config); retry_exceeds_buffer_size_in_subsequent_batch(config); retry_non_retriable_status(config); + retry_non_retriable_status_before_recv_trailing_metadata_started(config); retry_recv_initial_metadata(config); retry_recv_message(config); retry_server_pushback_delay(config); @@ -560,6 +564,10 @@ void grpc_end2end_tests(int argc, char **argv, retry_non_retriable_status(config); continue; } + if (0 == strcmp("retry_non_retriable_status_before_recv_trailing_metadata_started", argv[i])) { + retry_non_retriable_status_before_recv_trailing_metadata_started(config); + continue; + } if (0 == strcmp("retry_recv_initial_metadata", argv[i])) { retry_recv_initial_metadata(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index c7b0362574..c355fc24b5 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -170,6 +170,9 @@ END2END_TESTS = { proxyable=False), 'retry_non_retriable_status': default_test_options._replace( cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), + 'retry_non_retriable_status_before_recv_trailing_metadata_started': + default_test_options._replace( + cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), 'retry_recv_initial_metadata': default_test_options._replace( cpu_cost=LOWCPU, needs_client_channel=True, proxyable=False), 'retry_recv_message': default_test_options._replace( diff --git a/test/core/end2end/generate_tests.bzl b/test/core/end2end/generate_tests.bzl index 37fd1837f4..11fc576165 100755 --- a/test/core/end2end/generate_tests.bzl +++ b/test/core/end2end/generate_tests.bzl @@ -158,6 +158,8 @@ END2END_TESTS = { needs_client_channel=True, proxyable=False), 'retry_non_retriable_status': test_options(needs_client_channel=True, proxyable=False), + 'retry_non_retriable_status_before_recv_trailing_metadata_started': + test_options(needs_client_channel=True, proxyable=False), 'retry_recv_initial_metadata': test_options(needs_client_channel=True, proxyable=False), 'retry_recv_message': test_options(needs_client_channel=True, diff --git a/test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc b/test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc new file mode 100644 index 0000000000..eb016a3de9 --- /dev/null +++ b/test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc @@ -0,0 +1,266 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/static_metadata.h" + +#include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/tests/cancel_test_helpers.h" + +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, "Running test: %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_from_now(int n) { + return grpc_timeout_seconds_to_deadline(n); +} + +static gpr_timespec five_seconds_from_now(void) { + return n_seconds_from_now(5); +} + +static void drain_cq(grpc_completion_queue* cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); + } 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->shutdown_cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000), + grpc_timeout_seconds_to_deadline(5), + nullptr) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = nullptr; +} + +static void shutdown_client(grpc_end2end_test_fixture* f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = nullptr; +} + +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); + grpc_completion_queue_destroy(f->shutdown_cq); +} + +// Tests that we don't retry for non-retryable status codes, even if +// status is received before the recv_trailing_metadata op is started. +// - 1 retry allowed for ABORTED status +// - first attempt gets INVALID_ARGUMENT, so no retry is done +static void +test_retry_non_retriable_status_before_recv_trailing_metadata_started( + grpc_end2end_test_config config) { + grpc_call* c; + grpc_call* s; + grpc_op ops[6]; + grpc_op* op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_slice request_payload_slice = grpc_slice_from_static_string("foo"); + grpc_slice response_payload_slice = grpc_slice_from_static_string("bar"); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* request_payload_recv = nullptr; + grpc_byte_buffer* response_payload_recv = nullptr; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + char* peer; + + grpc_arg arg; + arg.type = GRPC_ARG_STRING; + arg.key = const_cast(GRPC_ARG_SERVICE_CONFIG); + arg.value.string = const_cast( + "{\n" + " \"methodConfig\": [ {\n" + " \"name\": [\n" + " { \"service\": \"service\", \"method\": \"method\" }\n" + " ],\n" + " \"retryPolicy\": {\n" + " \"maxAttempts\": 2,\n" + " \"initialBackoff\": \"1s\",\n" + " \"maxBackoff\": \"120s\",\n" + " \"backoffMultiplier\": 1.6,\n" + " \"retryableStatusCodes\": [ \"ABORTED\" ]\n" + " }\n" + " } ]\n" + "}"); + grpc_channel_args client_args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "retry_non_retriable_status", &client_args, nullptr); + + cq_verifier* cqv = cq_verifier_create(f.cq); + + gpr_timespec deadline = five_seconds_from_now(); + c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + nullptr, deadline, nullptr); + GPR_ASSERT(c); + + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer_before_call=%s", peer); + gpr_free(peer); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &response_payload_recv; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), true); + cq_verify(cqv); + + peer = grpc_call_get_peer(s); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "server_peer=%s", peer); + gpr_free(peer); + peer = grpc_call_get_peer(c); + GPR_ASSERT(peer != nullptr); + gpr_log(GPR_DEBUG, "client_peer=%s", peer); + gpr_free(peer); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_INVALID_ARGUMENT; + op->data.send_status_from_server.status_details = &status_details; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), true); + CQ_EXPECT_COMPLETION(cqv, tag(1), true); + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(2), true); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_INVALID_ARGUMENT); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, "xyz")); + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + GPR_ASSERT(0 == call_details.flags); + GPR_ASSERT(was_cancelled == 1); + + grpc_slice_unref(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(request_payload_recv); + grpc_byte_buffer_destroy(response_payload_recv); + + grpc_call_unref(c); + grpc_call_unref(s); + + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +void retry_non_retriable_status_before_recv_trailing_metadata_started( + grpc_end2end_test_config config) { + GPR_ASSERT(config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL); + test_retry_non_retriable_status_before_recv_trailing_metadata_started(config); +} + +void retry_non_retriable_status_before_recv_trailing_metadata_started_pre_init() { +} diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index c79996f818..60f1bc3a1b 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -8566,6 +8566,7 @@ "test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc", "test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc", "test/core/end2end/tests/retry_non_retriable_status.cc", + "test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc", "test/core/end2end/tests/retry_recv_initial_metadata.cc", "test/core/end2end/tests/retry_recv_message.cc", "test/core/end2end/tests/retry_server_pushback_delay.cc", @@ -8664,6 +8665,7 @@ "test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc", "test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc", "test/core/end2end/tests/retry_non_retriable_status.cc", + "test/core/end2end/tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc", "test/core/end2end/tests/retry_recv_initial_metadata.cc", "test/core/end2end/tests/retry_recv_message.cc", "test/core/end2end/tests/retry_server_pushback_delay.cc", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index d8c1a125a1..067d9b300d 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -8029,6 +8029,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -9735,6 +9758,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -11413,6 +11459,28 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -14314,6 +14382,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -15835,6 +15926,25 @@ "linux" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -17422,6 +17532,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -19151,6 +19284,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+workarounds_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -20951,6 +21107,30 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -22704,6 +22884,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -24480,6 +24683,30 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -31159,6 +31386,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -34014,6 +34264,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -36663,6 +36936,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -38346,6 +38642,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -41225,6 +41544,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -42727,6 +43069,25 @@ "linux" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -44291,6 +44652,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -45997,6 +46381,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_full+workarounds_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -47773,6 +48180,30 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -49503,6 +49934,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" @@ -55987,6 +56441,29 @@ "posix" ] }, + { + "args": [ + "retry_non_retriable_status_before_recv_trailing_metadata_started" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "retry_recv_initial_metadata" -- cgit v1.2.3 From 7a20c962dfa547a7b7fc1a49e4ff3b2e92eae5e1 Mon Sep 17 00:00:00 2001 From: kpayson64 Date: Wed, 18 Apr 2018 15:19:55 -0700 Subject: Break out qps services into seperate protos --- CMakeLists.txt | 72 +- Makefile | 90 ++- build.yaml | 12 +- grpc.gyp | 4 +- .../Grpc.IntegrationTesting/BenchmarkService.cs | 46 ++ .../BenchmarkServiceGrpc.cs | 329 +++++++++ .../ReportQpsScenarioService.cs | 39 ++ .../ReportQpsScenarioServiceGrpc.cs | 148 ++++ src/csharp/Grpc.IntegrationTesting/Services.cs | 55 -- src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs | 745 --------------------- .../Grpc.IntegrationTesting/WorkerService.cs | 43 ++ .../Grpc.IntegrationTesting/WorkerServiceGrpc.cs | 326 +++++++++ src/csharp/generate_proto_csharp.sh | 2 +- .../Src/Proto/Grpc/Testing/BenchmarkService.php | 41 ++ .../Src/Proto/Grpc/Testing/CompilerTest.php | 37 + .../GPBMetadata/Src/Proto/Grpc/Testing/Control.php | 163 ++--- .../GPBMetadata/Src/Proto/Grpc/Testing/Echo.php | 43 ++ .../Src/Proto/Grpc/Testing/EchoMessages.php | 54 ++ .../Src/Proto/Grpc/Testing/GPBEmpty.php | 26 + .../GPBMetadata/Src/Proto/Grpc/Testing/Metrics.php | 36 + .../Grpc/Testing/ReportQpsScenarioService.php | 30 + .../GPBMetadata/Src/Proto/Grpc/Testing/Test.php | 60 ++ .../Src/Proto/Grpc/Testing/WorkerService.php | 36 + .../generated_code/Grpc/Testing/ClientConfig.php | 32 + .../qps/generated_code/Grpc/Testing/DebugInfo.php | 77 +++ .../generated_code/Grpc/Testing/EchoRequest.php | 75 +++ .../generated_code/Grpc/Testing/EchoResponse.php | 75 +++ .../Grpc/Testing/EchoTestServiceClient.php | 93 +++ .../generated_code/Grpc/Testing/EmptyMessage.php | 23 + .../generated_code/Grpc/Testing/ErrorStatus.php | 103 +++ .../generated_code/Grpc/Testing/GaugeRequest.php | 51 ++ .../generated_code/Grpc/Testing/GaugeResponse.php | 126 ++++ .../Grpc/Testing/MetricsServiceClient.php | 69 ++ .../Grpc/Testing/NoRpcServiceClient.php | 35 + .../qps/generated_code/Grpc/Testing/PBEmpty.php | 30 + .../qps/generated_code/Grpc/Testing/PBVoid.php | 23 + .../Grpc/Testing/ProxyClientServiceClient.php | 8 +- .../Grpc/Testing/ReconnectServiceClient.php | 64 ++ .../Testing/ReportQpsScenarioServiceClient.php | 2 +- .../qps/generated_code/Grpc/Testing/Request.php | 23 + .../generated_code/Grpc/Testing/RequestParams.php | 431 ++++++++++++ .../qps/generated_code/Grpc/Testing/Response.php | 23 + .../generated_code/Grpc/Testing/ResponseParams.php | 101 +++ .../generated_code/Grpc/Testing/ServiceAClient.php | 97 +++ .../generated_code/Grpc/Testing/ServiceBClient.php | 54 ++ .../Grpc/Testing/TestServiceClient.php | 152 +++++ .../Testing/UnimplementedEchoServiceClient.php | 47 ++ .../Grpc/Testing/UnimplementedServiceClient.php | 53 ++ .../Grpc/Testing/WorkerServiceClient.php | 6 +- src/proto/grpc/testing/BUILD | 23 +- src/proto/grpc/testing/benchmark_service.proto | 44 ++ .../grpc/testing/report_qps_scenario_service.proto | 26 + src/proto/grpc/testing/services.proto | 74 -- src/proto/grpc/testing/worker_service.proto | 45 ++ .../grpcio_tests/tests/qps/benchmark_client.py | 5 +- .../grpcio_tests/tests/qps/benchmark_server.py | 7 +- src/python/grpcio_tests/tests/qps/qps_worker.py | 5 +- src/python/grpcio_tests/tests/qps/worker_server.py | 6 +- .../grpcio_tests/tests/testing/_server_test.py | 5 - src/ruby/pb/generate_proto_ruby.sh | 8 +- src/ruby/qps/client.rb | 2 +- src/ruby/qps/proxy-worker.rb | 2 +- src/ruby/qps/server.rb | 2 +- src/ruby/qps/src/proto/grpc/core/stats_pb.rb | 33 + .../src/proto/grpc/testing/benchmark_service_pb.rb | 13 + .../grpc/testing/benchmark_service_services_pb.rb | 56 ++ src/ruby/qps/src/proto/grpc/testing/control_pb.rb | 27 + .../grpc/testing/report_qps_scenario_service_pb.rb | 13 + .../report_qps_scenario_service_services_pb.rb | 42 ++ src/ruby/qps/src/proto/grpc/testing/services_pb.rb | 14 - .../src/proto/grpc/testing/services_services_pb.rb | 77 --- src/ruby/qps/src/proto/grpc/testing/stats_pb.rb | 13 + .../src/proto/grpc/testing/worker_service_pb.rb | 13 + .../grpc/testing/worker_service_services_pb.rb | 58 ++ src/ruby/qps/worker.rb | 2 +- test/cpp/qps/BUILD | 6 +- test/cpp/qps/client.h | 2 +- test/cpp/qps/client_async.cc | 2 +- test/cpp/qps/client_sync.cc | 2 +- test/cpp/qps/driver.cc | 1 + test/cpp/qps/qps_worker.cc | 2 +- test/cpp/qps/report.cc | 2 +- test/cpp/qps/report.h | 2 +- test/cpp/qps/server_async.cc | 2 +- test/cpp/qps/server_sync.cc | 2 +- tools/run_tests/generated/sources_and_headers.json | 40 +- 86 files changed, 3847 insertions(+), 1141 deletions(-) create mode 100644 src/csharp/Grpc.IntegrationTesting/BenchmarkService.cs create mode 100644 src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs create mode 100644 src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioService.cs create mode 100644 src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs delete mode 100644 src/csharp/Grpc.IntegrationTesting/Services.cs delete mode 100644 src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs create mode 100644 src/csharp/Grpc.IntegrationTesting/WorkerService.cs create mode 100644 src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/BenchmarkService.php create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/CompilerTest.php create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Echo.php create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/EchoMessages.php create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/GPBEmpty.php create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Metrics.php create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ReportQpsScenarioService.php create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Test.php create mode 100644 src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/WorkerService.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/DebugInfo.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/EchoRequest.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/EchoResponse.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/EchoTestServiceClient.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/EmptyMessage.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/ErrorStatus.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/GaugeRequest.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/GaugeResponse.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/MetricsServiceClient.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/NoRpcServiceClient.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/PBEmpty.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/PBVoid.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/ReconnectServiceClient.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/Request.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/RequestParams.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/Response.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/ResponseParams.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/ServiceAClient.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/ServiceBClient.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/TestServiceClient.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/UnimplementedEchoServiceClient.php create mode 100644 src/php/tests/qps/generated_code/Grpc/Testing/UnimplementedServiceClient.php create mode 100644 src/proto/grpc/testing/benchmark_service.proto create mode 100644 src/proto/grpc/testing/report_qps_scenario_service.proto delete mode 100644 src/proto/grpc/testing/services.proto create mode 100644 src/proto/grpc/testing/worker_service.proto create mode 100644 src/ruby/qps/src/proto/grpc/core/stats_pb.rb create mode 100644 src/ruby/qps/src/proto/grpc/testing/benchmark_service_pb.rb create mode 100644 src/ruby/qps/src/proto/grpc/testing/benchmark_service_services_pb.rb create mode 100644 src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_pb.rb create mode 100644 src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_services_pb.rb delete mode 100644 src/ruby/qps/src/proto/grpc/testing/services_pb.rb delete mode 100644 src/ruby/qps/src/proto/grpc/testing/services_services_pb.rb create mode 100644 src/ruby/qps/src/proto/grpc/testing/worker_service_pb.rb create mode 100644 src/ruby/qps/src/proto/grpc/testing/worker_service_services_pb.rb (limited to 'grpc.gyp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 18400ea22a..88df3fb0fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4993,10 +4993,18 @@ add_library(qps ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/control.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/control.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/control.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.grpc.pb.h test/cpp/qps/benchmark_config.cc test/cpp/qps/client_async.cc test/cpp/qps/client_sync.cc @@ -5033,7 +5041,13 @@ protobuf_generate_grpc_cpp( src/proto/grpc/testing/control.proto ) protobuf_generate_grpc_cpp( - src/proto/grpc/testing/services.proto + src/proto/grpc/testing/benchmark_service.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/report_qps_scenario_service.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/worker_service.proto ) target_include_directories(qps @@ -10733,10 +10747,18 @@ add_executable(codegen_test_full ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/payloads.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/payloads.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/payloads.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.grpc.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/stats.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/stats.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/stats.pb.h @@ -10756,7 +10778,13 @@ protobuf_generate_grpc_cpp( src/proto/grpc/testing/payloads.proto ) protobuf_generate_grpc_cpp( - src/proto/grpc/testing/services.proto + src/proto/grpc/testing/benchmark_service.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/report_qps_scenario_service.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/worker_service.proto ) protobuf_generate_grpc_cpp( src/proto/grpc/testing/stats.proto @@ -10805,10 +10833,18 @@ add_executable(codegen_test_minimal ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/payloads.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/payloads.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/payloads.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/services.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/benchmark_service.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/worker_service.grpc.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/stats.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/stats.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/stats.pb.h @@ -10829,7 +10865,13 @@ protobuf_generate_grpc_cpp( src/proto/grpc/testing/payloads.proto ) protobuf_generate_grpc_cpp( - src/proto/grpc/testing/services.proto + src/proto/grpc/testing/benchmark_service.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/report_qps_scenario_service.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/worker_service.proto ) protobuf_generate_grpc_cpp( src/proto/grpc/testing/stats.proto diff --git a/Makefile b/Makefile index da5f2efebf..dce07b2d7f 100644 --- a/Makefile +++ b/Makefile @@ -2569,6 +2569,22 @@ $(GENDIR)/src/proto/grpc/status/status.grpc.pb.cc: src/proto/grpc/status/status. $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< endif +ifeq ($(NO_PROTOC),true) +$(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc: protoc_dep_error +else + +$(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc: src/proto/grpc/testing/benchmark_service.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/messages.pb.cc + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< + +$(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc: src/proto/grpc/testing/benchmark_service.proto $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< +endif + ifeq ($(NO_PROTOC),true) $(GENDIR)/src/proto/grpc/testing/compiler_test.pb.cc: protoc_dep_error $(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.cc: protoc_dep_error @@ -2716,16 +2732,16 @@ $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc: src/proto/grpc/testing/pay endif ifeq ($(NO_PROTOC),true) -$(GENDIR)/src/proto/grpc/testing/services.pb.cc: protoc_dep_error -$(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/src/proto/grpc/testing/services.pb.cc: src/proto/grpc/testing/services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc +$(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc: src/proto/grpc/testing/report_qps_scenario_service.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc: src/proto/grpc/testing/services.proto $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc +$(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc: src/proto/grpc/testing/report_qps_scenario_service.proto $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2763,6 +2779,22 @@ $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc: src/proto/grpc/testing/test.pr $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< endif +ifeq ($(NO_PROTOC),true) +$(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc: protoc_dep_error +else + +$(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc: src/proto/grpc/testing/worker_service.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/control.pb.cc + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< + +$(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc: src/proto/grpc/testing/worker_service.proto $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< +endif + ifeq ($(CONFIG),stapprof) src/core/profiling/stap_timers.c: $(GENDIR)/src/core/profiling/stap_probes.h @@ -7180,7 +7212,9 @@ LIBQPS_SRC = \ $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \ - $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc \ test/cpp/qps/benchmark_config.cc \ test/cpp/qps/client_async.cc \ test/cpp/qps/client_sync.cc \ @@ -7236,16 +7270,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/benchmark_config.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/parse_json.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/usage_timer.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/benchmark_config.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/parse_json.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/usage_timer.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ @@ -16496,7 +16530,9 @@ CODEGEN_TEST_FULL_SRC = \ $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \ - $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ test/cpp/codegen/codegen_test_full.cc \ @@ -16535,7 +16571,11 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libg $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/payloads.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a -$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/services.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/benchmark_service.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/report_qps_scenario_service.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/worker_service.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -16548,14 +16588,16 @@ ifneq ($(NO_DEPS),true) -include $(CODEGEN_TEST_FULL_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_full.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_full.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc CODEGEN_TEST_MINIMAL_SRC = \ $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \ - $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ test/cpp/codegen/codegen_test_minimal.cc \ src/cpp/codegen/codegen_init.cc \ @@ -16595,7 +16637,11 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libg $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/payloads.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a -$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/services.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/benchmark_service.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/report_qps_scenario_service.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/worker_service.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -16610,8 +16656,8 @@ ifneq ($(NO_DEPS),true) -include $(CODEGEN_TEST_MINIMAL_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_minimal.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_minimal.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.pb.cc $(GENDIR)/src/proto/grpc/testing/benchmark_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.pb.cc $(GENDIR)/src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.pb.cc $(GENDIR)/src/proto/grpc/testing/worker_service.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc CREDENTIALS_TEST_SRC = \ diff --git a/build.yaml b/build.yaml index fde95d7fcd..e9ad25d711 100644 --- a/build.yaml +++ b/build.yaml @@ -1910,7 +1910,9 @@ libs: - src/proto/grpc/testing/payloads.proto - src/proto/grpc/testing/stats.proto - src/proto/grpc/testing/control.proto - - src/proto/grpc/testing/services.proto + - src/proto/grpc/testing/benchmark_service.proto + - src/proto/grpc/testing/report_qps_scenario_service.proto + - src/proto/grpc/testing/worker_service.proto - test/cpp/qps/benchmark_config.cc - test/cpp/qps/client_async.cc - test/cpp/qps/client_sync.cc @@ -4266,7 +4268,9 @@ targets: - src/proto/grpc/testing/control.proto - src/proto/grpc/testing/messages.proto - src/proto/grpc/testing/payloads.proto - - src/proto/grpc/testing/services.proto + - src/proto/grpc/testing/benchmark_service.proto + - src/proto/grpc/testing/report_qps_scenario_service.proto + - src/proto/grpc/testing/worker_service.proto - src/proto/grpc/testing/stats.proto - test/cpp/codegen/codegen_test_full.cc deps: @@ -4285,7 +4289,9 @@ targets: - src/proto/grpc/testing/control.proto - src/proto/grpc/testing/messages.proto - src/proto/grpc/testing/payloads.proto - - src/proto/grpc/testing/services.proto + - src/proto/grpc/testing/benchmark_service.proto + - src/proto/grpc/testing/report_qps_scenario_service.proto + - src/proto/grpc/testing/worker_service.proto - src/proto/grpc/testing/stats.proto - test/cpp/codegen/codegen_test_minimal.cc deps: diff --git a/grpc.gyp b/grpc.gyp index 8d9422eee6..a32dec1b40 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -1652,7 +1652,9 @@ 'src/proto/grpc/testing/payloads.proto', 'src/proto/grpc/testing/stats.proto', 'src/proto/grpc/testing/control.proto', - 'src/proto/grpc/testing/services.proto', + 'src/proto/grpc/testing/benchmark_service.proto', + 'src/proto/grpc/testing/report_qps_scenario_service.proto', + 'src/proto/grpc/testing/worker_service.proto', 'test/cpp/qps/benchmark_config.cc', 'test/cpp/qps/client_async.cc', 'test/cpp/qps/client_sync.cc', diff --git a/src/csharp/Grpc.IntegrationTesting/BenchmarkService.cs b/src/csharp/Grpc.IntegrationTesting/BenchmarkService.cs new file mode 100644 index 0000000000..11d34c6341 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/BenchmarkService.cs @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/proto/grpc/testing/benchmark_service.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Grpc.Testing { + + /// Holder for reflection information generated from src/proto/grpc/testing/benchmark_service.proto + public static partial class BenchmarkServiceReflection { + + #region Descriptor + /// File descriptor for src/proto/grpc/testing/benchmark_service.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static BenchmarkServiceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci5zcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL2JlbmNobWFya19zZXJ2aWNlLnBy", + "b3RvEgxncnBjLnRlc3RpbmcaJXNyYy9wcm90by9ncnBjL3Rlc3RpbmcvbWVz", + "c2FnZXMucHJvdG8ypgMKEEJlbmNobWFya1NlcnZpY2USRgoJVW5hcnlDYWxs", + "EhsuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlcXVlc3QaHC5ncnBjLnRlc3Rpbmcu", + "U2ltcGxlUmVzcG9uc2USTgoNU3RyZWFtaW5nQ2FsbBIbLmdycGMudGVzdGlu", + "Zy5TaW1wbGVSZXF1ZXN0GhwuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlc3BvbnNl", + "KAEwARJSChNTdHJlYW1pbmdGcm9tQ2xpZW50EhsuZ3JwYy50ZXN0aW5nLlNp", + "bXBsZVJlcXVlc3QaHC5ncnBjLnRlc3RpbmcuU2ltcGxlUmVzcG9uc2UoARJS", + "ChNTdHJlYW1pbmdGcm9tU2VydmVyEhsuZ3JwYy50ZXN0aW5nLlNpbXBsZVJl", + "cXVlc3QaHC5ncnBjLnRlc3RpbmcuU2ltcGxlUmVzcG9uc2UwARJSChFTdHJl", + "YW1pbmdCb3RoV2F5cxIbLmdycGMudGVzdGluZy5TaW1wbGVSZXF1ZXN0Ghwu", + "Z3JwYy50ZXN0aW5nLlNpbXBsZVJlc3BvbnNlKAEwAWIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null)); + } + #endregion + + } +} + +#endregion Designer generated code diff --git a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs new file mode 100644 index 0000000000..20b933fdfa --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs @@ -0,0 +1,329 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/proto/grpc/testing/benchmark_service.proto +// +// Original file comments: +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +#pragma warning disable 1591 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Grpc.Testing { + public static partial class BenchmarkService + { + static readonly string __ServiceName = "grpc.testing.BenchmarkService"; + + static readonly grpc::Marshaller __Marshaller_SimpleRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_SimpleResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom); + + static readonly grpc::Method __Method_UnaryCall = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "UnaryCall", + __Marshaller_SimpleRequest, + __Marshaller_SimpleResponse); + + static readonly grpc::Method __Method_StreamingCall = new grpc::Method( + grpc::MethodType.DuplexStreaming, + __ServiceName, + "StreamingCall", + __Marshaller_SimpleRequest, + __Marshaller_SimpleResponse); + + static readonly grpc::Method __Method_StreamingFromClient = new grpc::Method( + grpc::MethodType.ClientStreaming, + __ServiceName, + "StreamingFromClient", + __Marshaller_SimpleRequest, + __Marshaller_SimpleResponse); + + static readonly grpc::Method __Method_StreamingFromServer = new grpc::Method( + grpc::MethodType.ServerStreaming, + __ServiceName, + "StreamingFromServer", + __Marshaller_SimpleRequest, + __Marshaller_SimpleResponse); + + static readonly grpc::Method __Method_StreamingBothWays = new grpc::Method( + grpc::MethodType.DuplexStreaming, + __ServiceName, + "StreamingBothWays", + __Marshaller_SimpleRequest, + __Marshaller_SimpleResponse); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Grpc.Testing.BenchmarkServiceReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of BenchmarkService + public abstract partial class BenchmarkServiceBase + { + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + public virtual global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Repeated sequence of one request followed by one response. + /// Should be called streaming ping-pong + /// The server returns the client payload as-is on each response + /// + /// Used for reading requests from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + public virtual global::System.Threading.Tasks.Task StreamingCall(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Single-sided unbounded streaming from client to server + /// The server returns the client payload as-is once the client does WritesDone + /// + /// Used for reading requests from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + public virtual global::System.Threading.Tasks.Task StreamingFromClient(grpc::IAsyncStreamReader requestStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Single-sided unbounded streaming from server to client + /// The server repeatedly returns the client payload as-is + /// + /// The request received from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + public virtual global::System.Threading.Tasks.Task StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Two-sided unbounded streaming between server to client + /// Both sides send the content of their own choice to the other + /// + /// Used for reading requests from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + public virtual global::System.Threading.Tasks.Task StreamingBothWays(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for BenchmarkService + public partial class BenchmarkServiceClient : grpc::ClientBase + { + /// Creates a new client for BenchmarkService + /// The channel to use to make remote calls. + public BenchmarkServiceClient(grpc::Channel channel) : base(channel) + { + } + /// Creates a new client for BenchmarkService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + public BenchmarkServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + protected BenchmarkServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); + } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + public virtual grpc::AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); + } + /// + /// Repeated sequence of one request followed by one response. + /// Should be called streaming ping-pong + /// The server returns the client payload as-is on each response + /// + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncDuplexStreamingCall StreamingCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return StreamingCall(new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Repeated sequence of one request followed by one response. + /// Should be called streaming ping-pong + /// The server returns the client payload as-is on each response + /// + /// The options for the call. + /// The call object. + public virtual grpc::AsyncDuplexStreamingCall StreamingCall(grpc::CallOptions options) + { + return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options); + } + /// + /// Single-sided unbounded streaming from client to server + /// The server returns the client payload as-is once the client does WritesDone + /// + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncClientStreamingCall StreamingFromClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return StreamingFromClient(new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Single-sided unbounded streaming from client to server + /// The server returns the client payload as-is once the client does WritesDone + /// + /// The options for the call. + /// The call object. + public virtual grpc::AsyncClientStreamingCall StreamingFromClient(grpc::CallOptions options) + { + return CallInvoker.AsyncClientStreamingCall(__Method_StreamingFromClient, null, options); + } + /// + /// Single-sided unbounded streaming from server to client + /// The server repeatedly returns the client payload as-is + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncServerStreamingCall StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return StreamingFromServer(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Single-sided unbounded streaming from server to client + /// The server repeatedly returns the client payload as-is + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + public virtual grpc::AsyncServerStreamingCall StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncServerStreamingCall(__Method_StreamingFromServer, null, options, request); + } + /// + /// Two-sided unbounded streaming between server to client + /// Both sides send the content of their own choice to the other + /// + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncDuplexStreamingCall StreamingBothWays(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return StreamingBothWays(new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Two-sided unbounded streaming between server to client + /// Both sides send the content of their own choice to the other + /// + /// The options for the call. + /// The call object. + public virtual grpc::AsyncDuplexStreamingCall StreamingBothWays(grpc::CallOptions options) + { + return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingBothWays, null, options); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new BenchmarkServiceClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + public static grpc::ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) + .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall) + .AddMethod(__Method_StreamingFromClient, serviceImpl.StreamingFromClient) + .AddMethod(__Method_StreamingFromServer, serviceImpl.StreamingFromServer) + .AddMethod(__Method_StreamingBothWays, serviceImpl.StreamingBothWays).Build(); + } + + } +} +#endregion diff --git a/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioService.cs b/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioService.cs new file mode 100644 index 0000000000..b82cb52e30 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioService.cs @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/proto/grpc/testing/report_qps_scenario_service.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Grpc.Testing { + + /// Holder for reflection information generated from src/proto/grpc/testing/report_qps_scenario_service.proto + public static partial class ReportQpsScenarioServiceReflection { + + #region Descriptor + /// File descriptor for src/proto/grpc/testing/report_qps_scenario_service.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ReportQpsScenarioServiceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjhzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3JlcG9ydF9xcHNfc2NlbmFyaW9f", + "c2VydmljZS5wcm90bxIMZ3JwYy50ZXN0aW5nGiRzcmMvcHJvdG8vZ3JwYy90", + "ZXN0aW5nL2NvbnRyb2wucHJvdG8yXgoYUmVwb3J0UXBzU2NlbmFyaW9TZXJ2", + "aWNlEkIKDlJlcG9ydFNjZW5hcmlvEhwuZ3JwYy50ZXN0aW5nLlNjZW5hcmlv", + "UmVzdWx0GhIuZ3JwYy50ZXN0aW5nLlZvaWRiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Grpc.Testing.ControlReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null)); + } + #endregion + + } +} + +#endregion Designer generated code diff --git a/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs new file mode 100644 index 0000000000..c9c6f75c8c --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs @@ -0,0 +1,148 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/proto/grpc/testing/report_qps_scenario_service.proto +// +// Original file comments: +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +#pragma warning disable 1591 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Grpc.Testing { + public static partial class ReportQpsScenarioService + { + static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService"; + + static readonly grpc::Marshaller __Marshaller_ScenarioResult = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ScenarioResult.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom); + + static readonly grpc::Method __Method_ReportScenario = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ReportScenario", + __Marshaller_ScenarioResult, + __Marshaller_Void); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Grpc.Testing.ReportQpsScenarioServiceReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of ReportQpsScenarioService + public abstract partial class ReportQpsScenarioServiceBase + { + /// + /// Report results of a QPS test benchmark scenario. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + public virtual global::System.Threading.Tasks.Task ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for ReportQpsScenarioService + public partial class ReportQpsScenarioServiceClient : grpc::ClientBase + { + /// Creates a new client for ReportQpsScenarioService + /// The channel to use to make remote calls. + public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel) + { + } + /// Creates a new client for ReportQpsScenarioService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + protected ReportQpsScenarioServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Report results of a QPS test benchmark scenario. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Report results of a QPS test benchmark scenario. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request); + } + /// + /// Report results of a QPS test benchmark scenario. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncUnaryCall ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Report results of a QPS test benchmark scenario. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + public virtual grpc::AsyncUnaryCall ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new ReportQpsScenarioServiceClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build(); + } + + } +} +#endregion diff --git a/src/csharp/Grpc.IntegrationTesting/Services.cs b/src/csharp/Grpc.IntegrationTesting/Services.cs deleted file mode 100644 index 4b761706ed..0000000000 --- a/src/csharp/Grpc.IntegrationTesting/Services.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: src/proto/grpc/testing/services.proto -#pragma warning disable 1591, 0612, 3021 -#region Designer generated code - -using pb = global::Google.Protobuf; -using pbc = global::Google.Protobuf.Collections; -using pbr = global::Google.Protobuf.Reflection; -using scg = global::System.Collections.Generic; -namespace Grpc.Testing { - - /// Holder for reflection information generated from src/proto/grpc/testing/services.proto - public static partial class ServicesReflection { - - #region Descriptor - /// File descriptor for src/proto/grpc/testing/services.proto - public static pbr::FileDescriptor Descriptor { - get { return descriptor; } - } - private static pbr::FileDescriptor descriptor; - - static ServicesReflection() { - byte[] descriptorData = global::System.Convert.FromBase64String( - string.Concat( - "CiVzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3NlcnZpY2VzLnByb3RvEgxncnBj", - "LnRlc3RpbmcaJXNyYy9wcm90by9ncnBjL3Rlc3RpbmcvbWVzc2FnZXMucHJv", - "dG8aJHNyYy9wcm90by9ncnBjL3Rlc3RpbmcvY29udHJvbC5wcm90bzKmAwoQ", - "QmVuY2htYXJrU2VydmljZRJGCglVbmFyeUNhbGwSGy5ncnBjLnRlc3Rpbmcu", - "U2ltcGxlUmVxdWVzdBocLmdycGMudGVzdGluZy5TaW1wbGVSZXNwb25zZRJO", - "Cg1TdHJlYW1pbmdDYWxsEhsuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlcXVlc3Qa", - "HC5ncnBjLnRlc3RpbmcuU2ltcGxlUmVzcG9uc2UoATABElIKE1N0cmVhbWlu", - "Z0Zyb21DbGllbnQSGy5ncnBjLnRlc3RpbmcuU2ltcGxlUmVxdWVzdBocLmdy", - "cGMudGVzdGluZy5TaW1wbGVSZXNwb25zZSgBElIKE1N0cmVhbWluZ0Zyb21T", - "ZXJ2ZXISGy5ncnBjLnRlc3RpbmcuU2ltcGxlUmVxdWVzdBocLmdycGMudGVz", - "dGluZy5TaW1wbGVSZXNwb25zZTABElIKEVN0cmVhbWluZ0JvdGhXYXlzEhsu", - "Z3JwYy50ZXN0aW5nLlNpbXBsZVJlcXVlc3QaHC5ncnBjLnRlc3RpbmcuU2lt", - "cGxlUmVzcG9uc2UoATABMpcCCg1Xb3JrZXJTZXJ2aWNlEkUKCVJ1blNlcnZl", - "chIYLmdycGMudGVzdGluZy5TZXJ2ZXJBcmdzGhouZ3JwYy50ZXN0aW5nLlNl", - "cnZlclN0YXR1cygBMAESRQoJUnVuQ2xpZW50EhguZ3JwYy50ZXN0aW5nLkNs", - "aWVudEFyZ3MaGi5ncnBjLnRlc3RpbmcuQ2xpZW50U3RhdHVzKAEwARJCCglD", - "b3JlQ291bnQSGS5ncnBjLnRlc3RpbmcuQ29yZVJlcXVlc3QaGi5ncnBjLnRl", - "c3RpbmcuQ29yZVJlc3BvbnNlEjQKClF1aXRXb3JrZXISEi5ncnBjLnRlc3Rp", - "bmcuVm9pZBoSLmdycGMudGVzdGluZy5Wb2lkMl4KGFJlcG9ydFFwc1NjZW5h", - "cmlvU2VydmljZRJCCg5SZXBvcnRTY2VuYXJpbxIcLmdycGMudGVzdGluZy5T", - "Y2VuYXJpb1Jlc3VsdBoSLmdycGMudGVzdGluZy5Wb2lkYgZwcm90bzM=")); - descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, global::Grpc.Testing.ControlReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(null, null)); - } - #endregion - - } -} - -#endregion Designer generated code diff --git a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs deleted file mode 100644 index 46b328a773..0000000000 --- a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs +++ /dev/null @@ -1,745 +0,0 @@ -// -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: src/proto/grpc/testing/services.proto -// -// Original file comments: -// Copyright 2015 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// An integration test service that covers all the method signature permutations -// of unary/streaming requests/responses. -#pragma warning disable 1591 -#region Designer generated code - -using grpc = global::Grpc.Core; - -namespace Grpc.Testing { - public static partial class BenchmarkService - { - static readonly string __ServiceName = "grpc.testing.BenchmarkService"; - - static readonly grpc::Marshaller __Marshaller_SimpleRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_SimpleResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom); - - static readonly grpc::Method __Method_UnaryCall = new grpc::Method( - grpc::MethodType.Unary, - __ServiceName, - "UnaryCall", - __Marshaller_SimpleRequest, - __Marshaller_SimpleResponse); - - static readonly grpc::Method __Method_StreamingCall = new grpc::Method( - grpc::MethodType.DuplexStreaming, - __ServiceName, - "StreamingCall", - __Marshaller_SimpleRequest, - __Marshaller_SimpleResponse); - - static readonly grpc::Method __Method_StreamingFromClient = new grpc::Method( - grpc::MethodType.ClientStreaming, - __ServiceName, - "StreamingFromClient", - __Marshaller_SimpleRequest, - __Marshaller_SimpleResponse); - - static readonly grpc::Method __Method_StreamingFromServer = new grpc::Method( - grpc::MethodType.ServerStreaming, - __ServiceName, - "StreamingFromServer", - __Marshaller_SimpleRequest, - __Marshaller_SimpleResponse); - - static readonly grpc::Method __Method_StreamingBothWays = new grpc::Method( - grpc::MethodType.DuplexStreaming, - __ServiceName, - "StreamingBothWays", - __Marshaller_SimpleRequest, - __Marshaller_SimpleResponse); - - /// Service descriptor - public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor - { - get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; } - } - - /// Base class for server-side implementations of BenchmarkService - public abstract partial class BenchmarkServiceBase - { - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - /// The request received from the client. - /// The context of the server-side call handler being invoked. - /// The response to send back to the client (wrapped by a task). - public virtual global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - /// - /// Repeated sequence of one request followed by one response. - /// Should be called streaming ping-pong - /// The server returns the client payload as-is on each response - /// - /// Used for reading requests from the client. - /// Used for sending responses back to the client. - /// The context of the server-side call handler being invoked. - /// A task indicating completion of the handler. - public virtual global::System.Threading.Tasks.Task StreamingCall(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - /// - /// Single-sided unbounded streaming from client to server - /// The server returns the client payload as-is once the client does WritesDone - /// - /// Used for reading requests from the client. - /// The context of the server-side call handler being invoked. - /// The response to send back to the client (wrapped by a task). - public virtual global::System.Threading.Tasks.Task StreamingFromClient(grpc::IAsyncStreamReader requestStream, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - /// - /// Single-sided unbounded streaming from server to client - /// The server repeatedly returns the client payload as-is - /// - /// The request received from the client. - /// Used for sending responses back to the client. - /// The context of the server-side call handler being invoked. - /// A task indicating completion of the handler. - public virtual global::System.Threading.Tasks.Task StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - /// - /// Two-sided unbounded streaming between server to client - /// Both sides send the content of their own choice to the other - /// - /// Used for reading requests from the client. - /// Used for sending responses back to the client. - /// The context of the server-side call handler being invoked. - /// A task indicating completion of the handler. - public virtual global::System.Threading.Tasks.Task StreamingBothWays(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - } - - /// Client for BenchmarkService - public partial class BenchmarkServiceClient : grpc::ClientBase - { - /// Creates a new client for BenchmarkService - /// The channel to use to make remote calls. - public BenchmarkServiceClient(grpc::Channel channel) : base(channel) - { - } - /// Creates a new client for BenchmarkService that uses a custom CallInvoker. - /// The callInvoker to use to make remote calls. - public BenchmarkServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) - { - } - /// Protected parameterless constructor to allow creation of test doubles. - protected BenchmarkServiceClient() : base() - { - } - /// Protected constructor to allow creation of configured clients. - /// The client configuration. - protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration) - { - } - - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The response received from the server. - public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - /// The request to send to the server. - /// The options for the call. - /// The response received from the server. - public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) - { - return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); - } - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - /// The request to send to the server. - /// The options for the call. - /// The call object. - public virtual grpc::AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) - { - return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); - } - /// - /// Repeated sequence of one request followed by one response. - /// Should be called streaming ping-pong - /// The server returns the client payload as-is on each response - /// - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall StreamingCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return StreamingCall(new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Repeated sequence of one request followed by one response. - /// Should be called streaming ping-pong - /// The server returns the client payload as-is on each response - /// - /// The options for the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall StreamingCall(grpc::CallOptions options) - { - return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options); - } - /// - /// Single-sided unbounded streaming from client to server - /// The server returns the client payload as-is once the client does WritesDone - /// - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncClientStreamingCall StreamingFromClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return StreamingFromClient(new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Single-sided unbounded streaming from client to server - /// The server returns the client payload as-is once the client does WritesDone - /// - /// The options for the call. - /// The call object. - public virtual grpc::AsyncClientStreamingCall StreamingFromClient(grpc::CallOptions options) - { - return CallInvoker.AsyncClientStreamingCall(__Method_StreamingFromClient, null, options); - } - /// - /// Single-sided unbounded streaming from server to client - /// The server repeatedly returns the client payload as-is - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncServerStreamingCall StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return StreamingFromServer(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Single-sided unbounded streaming from server to client - /// The server repeatedly returns the client payload as-is - /// - /// The request to send to the server. - /// The options for the call. - /// The call object. - public virtual grpc::AsyncServerStreamingCall StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) - { - return CallInvoker.AsyncServerStreamingCall(__Method_StreamingFromServer, null, options, request); - } - /// - /// Two-sided unbounded streaming between server to client - /// Both sides send the content of their own choice to the other - /// - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall StreamingBothWays(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return StreamingBothWays(new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Two-sided unbounded streaming between server to client - /// Both sides send the content of their own choice to the other - /// - /// The options for the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall StreamingBothWays(grpc::CallOptions options) - { - return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingBothWays, null, options); - } - /// Creates a new instance of client from given ClientBaseConfiguration. - protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration) - { - return new BenchmarkServiceClient(configuration); - } - } - - /// Creates service definition that can be registered with a server - /// An object implementing the server-side handling logic. - public static grpc::ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) - { - return grpc::ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) - .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall) - .AddMethod(__Method_StreamingFromClient, serviceImpl.StreamingFromClient) - .AddMethod(__Method_StreamingFromServer, serviceImpl.StreamingFromServer) - .AddMethod(__Method_StreamingBothWays, serviceImpl.StreamingBothWays).Build(); - } - - } - public static partial class WorkerService - { - static readonly string __ServiceName = "grpc.testing.WorkerService"; - - static readonly grpc::Marshaller __Marshaller_ServerArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerArgs.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_ServerStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_ClientArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_ClientStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_CoreRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_CoreResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom); - - static readonly grpc::Method __Method_RunServer = new grpc::Method( - grpc::MethodType.DuplexStreaming, - __ServiceName, - "RunServer", - __Marshaller_ServerArgs, - __Marshaller_ServerStatus); - - static readonly grpc::Method __Method_RunClient = new grpc::Method( - grpc::MethodType.DuplexStreaming, - __ServiceName, - "RunClient", - __Marshaller_ClientArgs, - __Marshaller_ClientStatus); - - static readonly grpc::Method __Method_CoreCount = new grpc::Method( - grpc::MethodType.Unary, - __ServiceName, - "CoreCount", - __Marshaller_CoreRequest, - __Marshaller_CoreResponse); - - static readonly grpc::Method __Method_QuitWorker = new grpc::Method( - grpc::MethodType.Unary, - __ServiceName, - "QuitWorker", - __Marshaller_Void, - __Marshaller_Void); - - /// Service descriptor - public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor - { - get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; } - } - - /// Base class for server-side implementations of WorkerService - public abstract partial class WorkerServiceBase - { - /// - /// Start server with specified workload. - /// First request sent specifies the ServerConfig followed by ServerStatus - /// response. After that, a "Mark" can be sent anytime to request the latest - /// stats. Closing the stream will initiate shutdown of the test server - /// and once the shutdown has finished, the OK status is sent to terminate - /// this RPC. - /// - /// Used for reading requests from the client. - /// Used for sending responses back to the client. - /// The context of the server-side call handler being invoked. - /// A task indicating completion of the handler. - public virtual global::System.Threading.Tasks.Task RunServer(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - /// - /// Start client with specified workload. - /// First request sent specifies the ClientConfig followed by ClientStatus - /// response. After that, a "Mark" can be sent anytime to request the latest - /// stats. Closing the stream will initiate shutdown of the test client - /// and once the shutdown has finished, the OK status is sent to terminate - /// this RPC. - /// - /// Used for reading requests from the client. - /// Used for sending responses back to the client. - /// The context of the server-side call handler being invoked. - /// A task indicating completion of the handler. - public virtual global::System.Threading.Tasks.Task RunClient(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - /// - /// Just return the core count - unary call - /// - /// The request received from the client. - /// The context of the server-side call handler being invoked. - /// The response to send back to the client (wrapped by a task). - public virtual global::System.Threading.Tasks.Task CoreCount(global::Grpc.Testing.CoreRequest request, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - /// - /// Quit this worker - /// - /// The request received from the client. - /// The context of the server-side call handler being invoked. - /// The response to send back to the client (wrapped by a task). - public virtual global::System.Threading.Tasks.Task QuitWorker(global::Grpc.Testing.Void request, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - } - - /// Client for WorkerService - public partial class WorkerServiceClient : grpc::ClientBase - { - /// Creates a new client for WorkerService - /// The channel to use to make remote calls. - public WorkerServiceClient(grpc::Channel channel) : base(channel) - { - } - /// Creates a new client for WorkerService that uses a custom CallInvoker. - /// The callInvoker to use to make remote calls. - public WorkerServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) - { - } - /// Protected parameterless constructor to allow creation of test doubles. - protected WorkerServiceClient() : base() - { - } - /// Protected constructor to allow creation of configured clients. - /// The client configuration. - protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration) - { - } - - /// - /// Start server with specified workload. - /// First request sent specifies the ServerConfig followed by ServerStatus - /// response. After that, a "Mark" can be sent anytime to request the latest - /// stats. Closing the stream will initiate shutdown of the test server - /// and once the shutdown has finished, the OK status is sent to terminate - /// this RPC. - /// - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall RunServer(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return RunServer(new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Start server with specified workload. - /// First request sent specifies the ServerConfig followed by ServerStatus - /// response. After that, a "Mark" can be sent anytime to request the latest - /// stats. Closing the stream will initiate shutdown of the test server - /// and once the shutdown has finished, the OK status is sent to terminate - /// this RPC. - /// - /// The options for the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall RunServer(grpc::CallOptions options) - { - return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options); - } - /// - /// Start client with specified workload. - /// First request sent specifies the ClientConfig followed by ClientStatus - /// response. After that, a "Mark" can be sent anytime to request the latest - /// stats. Closing the stream will initiate shutdown of the test client - /// and once the shutdown has finished, the OK status is sent to terminate - /// this RPC. - /// - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall RunClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return RunClient(new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Start client with specified workload. - /// First request sent specifies the ClientConfig followed by ClientStatus - /// response. After that, a "Mark" can be sent anytime to request the latest - /// stats. Closing the stream will initiate shutdown of the test client - /// and once the shutdown has finished, the OK status is sent to terminate - /// this RPC. - /// - /// The options for the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall RunClient(grpc::CallOptions options) - { - return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options); - } - /// - /// Just return the core count - unary call - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The response received from the server. - public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return CoreCount(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Just return the core count - unary call - /// - /// The request to send to the server. - /// The options for the call. - /// The response received from the server. - public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) - { - return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request); - } - /// - /// Just return the core count - unary call - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return CoreCountAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Just return the core count - unary call - /// - /// The request to send to the server. - /// The options for the call. - /// The call object. - public virtual grpc::AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) - { - return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request); - } - /// - /// Quit this worker - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The response received from the server. - public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return QuitWorker(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Quit this worker - /// - /// The request to send to the server. - /// The options for the call. - /// The response received from the server. - public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::CallOptions options) - { - return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request); - } - /// - /// Quit this worker - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return QuitWorkerAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Quit this worker - /// - /// The request to send to the server. - /// The options for the call. - /// The call object. - public virtual grpc::AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::CallOptions options) - { - return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request); - } - /// Creates a new instance of client from given ClientBaseConfiguration. - protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration) - { - return new WorkerServiceClient(configuration); - } - } - - /// Creates service definition that can be registered with a server - /// An object implementing the server-side handling logic. - public static grpc::ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) - { - return grpc::ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_RunServer, serviceImpl.RunServer) - .AddMethod(__Method_RunClient, serviceImpl.RunClient) - .AddMethod(__Method_CoreCount, serviceImpl.CoreCount) - .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build(); - } - - } - public static partial class ReportQpsScenarioService - { - static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService"; - - static readonly grpc::Marshaller __Marshaller_ScenarioResult = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ScenarioResult.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom); - - static readonly grpc::Method __Method_ReportScenario = new grpc::Method( - grpc::MethodType.Unary, - __ServiceName, - "ReportScenario", - __Marshaller_ScenarioResult, - __Marshaller_Void); - - /// Service descriptor - public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor - { - get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[2]; } - } - - /// Base class for server-side implementations of ReportQpsScenarioService - public abstract partial class ReportQpsScenarioServiceBase - { - /// - /// Report results of a QPS test benchmark scenario. - /// - /// The request received from the client. - /// The context of the server-side call handler being invoked. - /// The response to send back to the client (wrapped by a task). - public virtual global::System.Threading.Tasks.Task ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context) - { - throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); - } - - } - - /// Client for ReportQpsScenarioService - public partial class ReportQpsScenarioServiceClient : grpc::ClientBase - { - /// Creates a new client for ReportQpsScenarioService - /// The channel to use to make remote calls. - public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel) - { - } - /// Creates a new client for ReportQpsScenarioService that uses a custom CallInvoker. - /// The callInvoker to use to make remote calls. - public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) - { - } - /// Protected parameterless constructor to allow creation of test doubles. - protected ReportQpsScenarioServiceClient() : base() - { - } - /// Protected constructor to allow creation of configured clients. - /// The client configuration. - protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration) - { - } - - /// - /// Report results of a QPS test benchmark scenario. - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The response received from the server. - public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Report results of a QPS test benchmark scenario. - /// - /// The request to send to the server. - /// The options for the call. - /// The response received from the server. - public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) - { - return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request); - } - /// - /// Report results of a QPS test benchmark scenario. - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncUnaryCall ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Report results of a QPS test benchmark scenario. - /// - /// The request to send to the server. - /// The options for the call. - /// The call object. - public virtual grpc::AsyncUnaryCall ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) - { - return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request); - } - /// Creates a new instance of client from given ClientBaseConfiguration. - protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration) - { - return new ReportQpsScenarioServiceClient(configuration); - } - } - - /// Creates service definition that can be registered with a server - /// An object implementing the server-side handling logic. - public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl) - { - return grpc::ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build(); - } - - } -} -#endregion diff --git a/src/csharp/Grpc.IntegrationTesting/WorkerService.cs b/src/csharp/Grpc.IntegrationTesting/WorkerService.cs new file mode 100644 index 0000000000..7c829545aa --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/WorkerService.cs @@ -0,0 +1,43 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/proto/grpc/testing/worker_service.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Grpc.Testing { + + /// Holder for reflection information generated from src/proto/grpc/testing/worker_service.proto + public static partial class WorkerServiceReflection { + + #region Descriptor + /// File descriptor for src/proto/grpc/testing/worker_service.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static WorkerServiceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CitzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3dvcmtlcl9zZXJ2aWNlLnByb3Rv", + "EgxncnBjLnRlc3RpbmcaJHNyYy9wcm90by9ncnBjL3Rlc3RpbmcvY29udHJv", + "bC5wcm90bzKXAgoNV29ya2VyU2VydmljZRJFCglSdW5TZXJ2ZXISGC5ncnBj", + "LnRlc3RpbmcuU2VydmVyQXJncxoaLmdycGMudGVzdGluZy5TZXJ2ZXJTdGF0", + "dXMoATABEkUKCVJ1bkNsaWVudBIYLmdycGMudGVzdGluZy5DbGllbnRBcmdz", + "GhouZ3JwYy50ZXN0aW5nLkNsaWVudFN0YXR1cygBMAESQgoJQ29yZUNvdW50", + "EhkuZ3JwYy50ZXN0aW5nLkNvcmVSZXF1ZXN0GhouZ3JwYy50ZXN0aW5nLkNv", + "cmVSZXNwb25zZRI0CgpRdWl0V29ya2VyEhIuZ3JwYy50ZXN0aW5nLlZvaWQa", + "Ei5ncnBjLnRlc3RpbmcuVm9pZGIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Grpc.Testing.ControlReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null)); + } + #endregion + + } +} + +#endregion Designer generated code diff --git a/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs new file mode 100644 index 0000000000..ede3ace461 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs @@ -0,0 +1,326 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/proto/grpc/testing/worker_service.proto +// +// Original file comments: +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +#pragma warning disable 1591 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Grpc.Testing { + public static partial class WorkerService + { + static readonly string __ServiceName = "grpc.testing.WorkerService"; + + static readonly grpc::Marshaller __Marshaller_ServerArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerArgs.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_ServerStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_ClientArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_ClientStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_CoreRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_CoreResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom); + static readonly grpc::Marshaller __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom); + + static readonly grpc::Method __Method_RunServer = new grpc::Method( + grpc::MethodType.DuplexStreaming, + __ServiceName, + "RunServer", + __Marshaller_ServerArgs, + __Marshaller_ServerStatus); + + static readonly grpc::Method __Method_RunClient = new grpc::Method( + grpc::MethodType.DuplexStreaming, + __ServiceName, + "RunClient", + __Marshaller_ClientArgs, + __Marshaller_ClientStatus); + + static readonly grpc::Method __Method_CoreCount = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "CoreCount", + __Marshaller_CoreRequest, + __Marshaller_CoreResponse); + + static readonly grpc::Method __Method_QuitWorker = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "QuitWorker", + __Marshaller_Void, + __Marshaller_Void); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Grpc.Testing.WorkerServiceReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of WorkerService + public abstract partial class WorkerServiceBase + { + /// + /// Start server with specified workload. + /// First request sent specifies the ServerConfig followed by ServerStatus + /// response. After that, a "Mark" can be sent anytime to request the latest + /// stats. Closing the stream will initiate shutdown of the test server + /// and once the shutdown has finished, the OK status is sent to terminate + /// this RPC. + /// + /// Used for reading requests from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + public virtual global::System.Threading.Tasks.Task RunServer(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Start client with specified workload. + /// First request sent specifies the ClientConfig followed by ClientStatus + /// response. After that, a "Mark" can be sent anytime to request the latest + /// stats. Closing the stream will initiate shutdown of the test client + /// and once the shutdown has finished, the OK status is sent to terminate + /// this RPC. + /// + /// Used for reading requests from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + public virtual global::System.Threading.Tasks.Task RunClient(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Just return the core count - unary call + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + public virtual global::System.Threading.Tasks.Task CoreCount(global::Grpc.Testing.CoreRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Quit this worker + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + public virtual global::System.Threading.Tasks.Task QuitWorker(global::Grpc.Testing.Void request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for WorkerService + public partial class WorkerServiceClient : grpc::ClientBase + { + /// Creates a new client for WorkerService + /// The channel to use to make remote calls. + public WorkerServiceClient(grpc::Channel channel) : base(channel) + { + } + /// Creates a new client for WorkerService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + public WorkerServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + protected WorkerServiceClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Start server with specified workload. + /// First request sent specifies the ServerConfig followed by ServerStatus + /// response. After that, a "Mark" can be sent anytime to request the latest + /// stats. Closing the stream will initiate shutdown of the test server + /// and once the shutdown has finished, the OK status is sent to terminate + /// this RPC. + /// + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncDuplexStreamingCall RunServer(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return RunServer(new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Start server with specified workload. + /// First request sent specifies the ServerConfig followed by ServerStatus + /// response. After that, a "Mark" can be sent anytime to request the latest + /// stats. Closing the stream will initiate shutdown of the test server + /// and once the shutdown has finished, the OK status is sent to terminate + /// this RPC. + /// + /// The options for the call. + /// The call object. + public virtual grpc::AsyncDuplexStreamingCall RunServer(grpc::CallOptions options) + { + return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options); + } + /// + /// Start client with specified workload. + /// First request sent specifies the ClientConfig followed by ClientStatus + /// response. After that, a "Mark" can be sent anytime to request the latest + /// stats. Closing the stream will initiate shutdown of the test client + /// and once the shutdown has finished, the OK status is sent to terminate + /// this RPC. + /// + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncDuplexStreamingCall RunClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return RunClient(new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Start client with specified workload. + /// First request sent specifies the ClientConfig followed by ClientStatus + /// response. After that, a "Mark" can be sent anytime to request the latest + /// stats. Closing the stream will initiate shutdown of the test client + /// and once the shutdown has finished, the OK status is sent to terminate + /// this RPC. + /// + /// The options for the call. + /// The call object. + public virtual grpc::AsyncDuplexStreamingCall RunClient(grpc::CallOptions options) + { + return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options); + } + /// + /// Just return the core count - unary call + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CoreCount(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Just return the core count - unary call + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request); + } + /// + /// Just return the core count - unary call + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return CoreCountAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Just return the core count - unary call + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + public virtual grpc::AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request); + } + /// + /// Quit this worker + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return QuitWorker(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Quit this worker + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request); + } + /// + /// Quit this worker + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + public virtual grpc::AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return QuitWorkerAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Quit this worker + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + public virtual grpc::AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration) + { + return new WorkerServiceClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + public static grpc::ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_RunServer, serviceImpl.RunServer) + .AddMethod(__Method_RunClient, serviceImpl.RunClient) + .AddMethod(__Method_CoreCount, serviceImpl.CoreCount) + .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build(); + } + + } +} +#endregion diff --git a/src/csharp/generate_proto_csharp.sh b/src/csharp/generate_proto_csharp.sh index 299dc3f816..1a38f860e8 100755 --- a/src/csharp/generate_proto_csharp.sh +++ b/src/csharp/generate_proto_csharp.sh @@ -42,4 +42,4 @@ $PROTOC --plugin=$PLUGIN --csharp_out=$TESTING_DIR/CoreStats --grpc_out=$TESTING # don't match the package names. Setting -I to the correct value src/proto # breaks the code generation. $PROTOC --plugin=$PLUGIN --csharp_out=$TESTING_DIR --grpc_out=$TESTING_DIR \ - -I . src/proto/grpc/testing/{control,echo_messages,empty,messages,metrics,payloads,services,stats,test}.proto + -I . src/proto/grpc/testing/{control,echo_messages,empty,messages,metrics,payloads,benchmark_service,report_qps_scenario_service,worker_service,stats,test}.proto diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/BenchmarkService.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/BenchmarkService.php new file mode 100644 index 0000000000..906f6a2d84 --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/BenchmarkService.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile(hex2bin( + "0aef030a2e7372632f70726f746f2f677270632f74657374696e672f6265" . + "6e63686d61726b5f736572766963652e70726f746f120c677270632e7465" . + "7374696e6732a6030a1042656e63686d61726b5365727669636512460a09" . + "556e61727943616c6c121b2e677270632e74657374696e672e53696d706c" . + "65526571756573741a1c2e677270632e74657374696e672e53696d706c65" . + "526573706f6e7365124e0a0d53747265616d696e6743616c6c121b2e6772" . + "70632e74657374696e672e53696d706c65526571756573741a1c2e677270" . + "632e74657374696e672e53696d706c65526573706f6e7365280130011252" . + "0a1353747265616d696e6746726f6d436c69656e74121b2e677270632e74" . + "657374696e672e53696d706c65526571756573741a1c2e677270632e7465" . + "7374696e672e53696d706c65526573706f6e7365280112520a1353747265" . + "616d696e6746726f6d536572766572121b2e677270632e74657374696e67" . + "2e53696d706c65526571756573741a1c2e677270632e74657374696e672e" . + "53696d706c65526573706f6e7365300112520a1153747265616d696e6742" . + "6f746857617973121b2e677270632e74657374696e672e53696d706c6552" . + "6571756573741a1c2e677270632e74657374696e672e53696d706c655265" . + "73706f6e736528013001620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/CompilerTest.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/CompilerTest.php new file mode 100644 index 0000000000..2c4fe92f05 --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/CompilerTest.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0aa1030a2a7372632f70726f746f2f677270632f74657374696e672f636f" . + "6d70696c65725f746573742e70726f746f120c677270632e74657374696e" . + "6722090a0752657175657374220a0a08526573706f6e736532fe010a0853" . + "6572766963654112390a084d6574686f64413112152e677270632e746573" . + "74696e672e526571756573741a162e677270632e74657374696e672e5265" . + "73706f6e7365123b0a084d6574686f64413212152e677270632e74657374" . + "696e672e526571756573741a162e677270632e74657374696e672e526573" . + "706f6e73652801123b0a084d6574686f64413312152e677270632e746573" . + "74696e672e526571756573741a162e677270632e74657374696e672e5265" . + "73706f6e73653001123d0a084d6574686f64413412152e677270632e7465" . + "7374696e672e526571756573741a162e677270632e74657374696e672e52" . + "6573706f6e73652801300132450a08536572766963654212390a084d6574" . + "686f64423112152e677270632e74657374696e672e526571756573741a16" . + "2e677270632e74657374696e672e526573706f6e7365620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php index 9b3a7529ec..2319bcd021 100644 --- a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php @@ -17,7 +17,7 @@ class Control \GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce(); \GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce(); $pool->internalAddGeneratedFile(hex2bin( - "0aa21a0a247372632f70726f746f2f677270632f74657374696e672f636f" . + "0abc1a0a247372632f70726f746f2f677270632f74657374696e672f636f" . "6e74726f6c2e70726f746f120c677270632e74657374696e671a22737263" . "2f70726f746f2f677270632f74657374696e672f73746174732e70726f74" . "6f22250a0d506f6973736f6e506172616d7312140a0c6f6666657265645f" . @@ -31,7 +31,7 @@ class Control "6f7665727269646518022001280912110a09637265645f74797065180320" . "012809224d0a0a4368616e6e656c417267120c0a046e616d651801200128" . "0912130a097374725f76616c7565180220012809480012130a09696e745f" . - "76616c7565180320012805480042070a0576616c756522d5040a0c436c69" . + "76616c7565180320012805480042070a0576616c756522ef040a0c436c69" . "656e74436f6e66696712160a0e7365727665725f74617267657473180120" . "032809122d0a0b636c69656e745f7479706518022001280e32182e677270" . "632e74657374696e672e436c69656e745479706512350a0f736563757269" . @@ -51,85 +51,86 @@ class Control "745f617069180f20012809122e0a0c6368616e6e656c5f61726773181020" . "03280b32182e677270632e74657374696e672e4368616e6e656c41726712" . "160a0e746872656164735f7065725f6371181120012805121b0a136d6573" . - "73616765735f7065725f73747265616d18122001280522380a0c436c6965" . - "6e7453746174757312280a05737461747318012001280b32192e67727063" . - "2e74657374696e672e436c69656e74537461747322150a044d61726b120d" . - "0a05726573657418012001280822680a0a436c69656e7441726773122b0a" . - "05736574757018012001280b321a2e677270632e74657374696e672e436c" . - "69656e74436f6e666967480012220a046d61726b18022001280b32122e67" . - "7270632e74657374696e672e4d61726b480042090a076172677479706522" . - "fd020a0c536572766572436f6e666967122d0a0b7365727665725f747970" . - "6518012001280e32182e677270632e74657374696e672e53657276657254" . - "79706512350a0f73656375726974795f706172616d7318022001280b321c" . - "2e677270632e74657374696e672e5365637572697479506172616d73120c" . - "0a04706f7274180420012805121c0a146173796e635f7365727665725f74" . - "68726561647318072001280512120a0a636f72655f6c696d697418082001" . - "280512330a0e7061796c6f61645f636f6e66696718092001280b321b2e67" . - "7270632e74657374696e672e5061796c6f6164436f6e66696712110a0963" . - "6f72655f6c697374180a2003280512180a106f746865725f736572766572" . - "5f617069180b2001280912160a0e746872656164735f7065725f6371180c" . - "20012805121c0a137265736f757263655f71756f74615f73697a6518e907" . - "20012805122f0a0c6368616e6e656c5f6172677318ea072003280b32182e" . - "677270632e74657374696e672e4368616e6e656c41726722680a0a536572" . - "76657241726773122b0a05736574757018012001280b321a2e677270632e" . - "74657374696e672e536572766572436f6e666967480012220a046d61726b" . - "18022001280b32122e677270632e74657374696e672e4d61726b48004209" . - "0a076172677479706522550a0c53657276657253746174757312280a0573" . - "7461747318012001280b32192e677270632e74657374696e672e53657276" . - "65725374617473120c0a04706f7274180220012805120d0a05636f726573" . - "180320012805220d0a0b436f726552657175657374221d0a0c436f726552" . - "6573706f6e7365120d0a05636f72657318012001280522060a04566f6964" . - "22fd010a085363656e6172696f120c0a046e616d6518012001280912310a" . - "0d636c69656e745f636f6e66696718022001280b321a2e677270632e7465" . - "7374696e672e436c69656e74436f6e66696712130a0b6e756d5f636c6965" . - "6e747318032001280512310a0d7365727665725f636f6e66696718042001" . - "280b321a2e677270632e74657374696e672e536572766572436f6e666967" . - "12130a0b6e756d5f7365727665727318052001280512160a0e7761726d75" . - "705f7365636f6e647318062001280512190a1162656e63686d61726b5f73" . - "65636f6e647318072001280512200a18737061776e5f6c6f63616c5f776f" . - "726b65725f636f756e7418082001280522360a095363656e6172696f7312" . - "290a097363656e6172696f7318012003280b32162e677270632e74657374" . - "696e672e5363656e6172696f2284040a155363656e6172696f526573756c" . - "7453756d6d617279120b0a03717073180120012801121b0a137170735f70" . - "65725f7365727665725f636f7265180220012801121a0a12736572766572" . - "5f73797374656d5f74696d6518032001280112180a107365727665725f75" . - "7365725f74696d65180420012801121a0a12636c69656e745f7379737465" . - "6d5f74696d6518052001280112180a10636c69656e745f757365725f7469" . - "6d6518062001280112120a0a6c6174656e63795f35301807200128011212" . - "0a0a6c6174656e63795f393018082001280112120a0a6c6174656e63795f" . - "393518092001280112120a0a6c6174656e63795f3939180a200128011213" . - "0a0b6c6174656e63795f393939180b2001280112180a107365727665725f" . - "6370755f7573616765180c2001280112260a1e7375636365737366756c5f" . - "72657175657374735f7065725f7365636f6e64180d2001280112220a1a66" . - "61696c65645f72657175657374735f7065725f7365636f6e64180e200128" . - "0112200a18636c69656e745f706f6c6c735f7065725f7265717565737418" . - "0f2001280112200a187365727665725f706f6c6c735f7065725f72657175" . - "65737418102001280112220a1a7365727665725f717565726965735f7065" . - "725f6370755f73656318112001280112220a1a636c69656e745f71756572" . - "6965735f7065725f6370755f7365631812200128012283030a0e5363656e" . - "6172696f526573756c7412280a087363656e6172696f18012001280b3216" . - "2e677270632e74657374696e672e5363656e6172696f122e0a096c617465" . - "6e6369657318022001280b321b2e677270632e74657374696e672e486973" . - "746f6772616d44617461122f0a0c636c69656e745f737461747318032003" . - "280b32192e677270632e74657374696e672e436c69656e74537461747312" . - "2f0a0c7365727665725f737461747318042003280b32192e677270632e74" . - "657374696e672e536572766572537461747312140a0c7365727665725f63" . - "6f72657318052003280512340a0773756d6d61727918062001280b32232e" . - "677270632e74657374696e672e5363656e6172696f526573756c7453756d" . - "6d61727912160a0e636c69656e745f737563636573731807200328081216" . - "0a0e7365727665725f7375636365737318082003280812390a0f72657175" . - "6573745f726573756c747318092003280b32202e677270632e7465737469" . - "6e672e52657175657374526573756c74436f756e742a410a0a436c69656e" . - "7454797065120f0a0b53594e435f434c49454e54100012100a0c4153594e" . - "435f434c49454e54100112100a0c4f544845525f434c49454e5410022a5b" . - "0a0a53657276657254797065120f0a0b53594e435f534552564552100012" . - "100a0c4153594e435f534552564552100112180a144153594e435f47454e" . - "455249435f534552564552100212100a0c4f544845525f53455256455210" . - "032a720a075270635479706512090a05554e4152591000120d0a09535452" . - "45414d494e47100112190a1553545245414d494e475f46524f4d5f434c49" . - "454e54100212190a1553545245414d494e475f46524f4d5f534552564552" . - "100312170a1353545245414d494e475f424f54485f574159531004620670" . - "726f746f33" + "73616765735f7065725f73747265616d18122001280512180a107573655f" . + "636f616c657363655f61706918132001280822380a0c436c69656e745374" . + "6174757312280a05737461747318012001280b32192e677270632e746573" . + "74696e672e436c69656e74537461747322150a044d61726b120d0a057265" . + "73657418012001280822680a0a436c69656e7441726773122b0a05736574" . + "757018012001280b321a2e677270632e74657374696e672e436c69656e74" . + "436f6e666967480012220a046d61726b18022001280b32122e677270632e" . + "74657374696e672e4d61726b480042090a076172677479706522fd020a0c" . + "536572766572436f6e666967122d0a0b7365727665725f74797065180120" . + "01280e32182e677270632e74657374696e672e5365727665725479706512" . + "350a0f73656375726974795f706172616d7318022001280b321c2e677270" . + "632e74657374696e672e5365637572697479506172616d73120c0a04706f" . + "7274180420012805121c0a146173796e635f7365727665725f7468726561" . + "647318072001280512120a0a636f72655f6c696d69741808200128051233" . + "0a0e7061796c6f61645f636f6e66696718092001280b321b2e677270632e" . + "74657374696e672e5061796c6f6164436f6e66696712110a09636f72655f" . + "6c697374180a2003280512180a106f746865725f7365727665725f617069" . + "180b2001280912160a0e746872656164735f7065725f6371180c20012805" . + "121c0a137265736f757263655f71756f74615f73697a6518e90720012805" . + "122f0a0c6368616e6e656c5f6172677318ea072003280b32182e67727063" . + "2e74657374696e672e4368616e6e656c41726722680a0a53657276657241" . + "726773122b0a05736574757018012001280b321a2e677270632e74657374" . + "696e672e536572766572436f6e666967480012220a046d61726b18022001" . + "280b32122e677270632e74657374696e672e4d61726b480042090a076172" . + "677479706522550a0c53657276657253746174757312280a057374617473" . + "18012001280b32192e677270632e74657374696e672e5365727665725374" . + "617473120c0a04706f7274180220012805120d0a05636f72657318032001" . + "2805220d0a0b436f726552657175657374221d0a0c436f7265526573706f" . + "6e7365120d0a05636f72657318012001280522060a04566f696422fd010a" . + "085363656e6172696f120c0a046e616d6518012001280912310a0d636c69" . + "656e745f636f6e66696718022001280b321a2e677270632e74657374696e" . + "672e436c69656e74436f6e66696712130a0b6e756d5f636c69656e747318" . + "032001280512310a0d7365727665725f636f6e66696718042001280b321a" . + "2e677270632e74657374696e672e536572766572436f6e66696712130a0b" . + "6e756d5f7365727665727318052001280512160a0e7761726d75705f7365" . + "636f6e647318062001280512190a1162656e63686d61726b5f7365636f6e" . + "647318072001280512200a18737061776e5f6c6f63616c5f776f726b6572" . + "5f636f756e7418082001280522360a095363656e6172696f7312290a0973" . + "63656e6172696f7318012003280b32162e677270632e74657374696e672e" . + "5363656e6172696f2284040a155363656e6172696f526573756c7453756d" . + "6d617279120b0a03717073180120012801121b0a137170735f7065725f73" . + "65727665725f636f7265180220012801121a0a127365727665725f737973" . + "74656d5f74696d6518032001280112180a107365727665725f757365725f" . + "74696d65180420012801121a0a12636c69656e745f73797374656d5f7469" . + "6d6518052001280112180a10636c69656e745f757365725f74696d651806" . + "2001280112120a0a6c6174656e63795f353018072001280112120a0a6c61" . + "74656e63795f393018082001280112120a0a6c6174656e63795f39351809" . + "2001280112120a0a6c6174656e63795f3939180a2001280112130a0b6c61" . + "74656e63795f393939180b2001280112180a107365727665725f6370755f" . + "7573616765180c2001280112260a1e7375636365737366756c5f72657175" . + "657374735f7065725f7365636f6e64180d2001280112220a1a6661696c65" . + "645f72657175657374735f7065725f7365636f6e64180e2001280112200a" . + "18636c69656e745f706f6c6c735f7065725f72657175657374180f200128" . + "0112200a187365727665725f706f6c6c735f7065725f7265717565737418" . + "102001280112220a1a7365727665725f717565726965735f7065725f6370" . + "755f73656318112001280112220a1a636c69656e745f717565726965735f" . + "7065725f6370755f7365631812200128012283030a0e5363656e6172696f" . + "526573756c7412280a087363656e6172696f18012001280b32162e677270" . + "632e74657374696e672e5363656e6172696f122e0a096c6174656e636965" . + "7318022001280b321b2e677270632e74657374696e672e486973746f6772" . + "616d44617461122f0a0c636c69656e745f737461747318032003280b3219" . + "2e677270632e74657374696e672e436c69656e745374617473122f0a0c73" . + "65727665725f737461747318042003280b32192e677270632e7465737469" . + "6e672e536572766572537461747312140a0c7365727665725f636f726573" . + "18052003280512340a0773756d6d61727918062001280b32232e67727063" . + "2e74657374696e672e5363656e6172696f526573756c7453756d6d617279" . + "12160a0e636c69656e745f7375636365737318072003280812160a0e7365" . + "727665725f7375636365737318082003280812390a0f726571756573745f" . + "726573756c747318092003280b32202e677270632e74657374696e672e52" . + "657175657374526573756c74436f756e742a410a0a436c69656e74547970" . + "65120f0a0b53594e435f434c49454e54100012100a0c4153594e435f434c" . + "49454e54100112100a0c4f544845525f434c49454e5410022a5b0a0a5365" . + "7276657254797065120f0a0b53594e435f534552564552100012100a0c41" . + "53594e435f534552564552100112180a144153594e435f47454e45524943" . + "5f534552564552100212100a0c4f544845525f53455256455210032a720a" . + "075270635479706512090a05554e4152591000120d0a0953545245414d49" . + "4e47100112190a1553545245414d494e475f46524f4d5f434c49454e5410" . + "0212190a1553545245414d494e475f46524f4d5f53455256455210031217" . + "0a1353545245414d494e475f424f54485f574159531004620670726f746f" . + "33" )); static::$is_initialized = true; diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Echo.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Echo.php new file mode 100644 index 0000000000..77c5230f45 --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Echo.php @@ -0,0 +1,43 @@ +internalAddGeneratedFile(hex2bin( + "0aa6040a217372632f70726f746f2f677270632f74657374696e672f6563" . + "686f2e70726f746f120c677270632e74657374696e6732f6020a0f456368" . + "6f5465737453657276696365123d0a044563686f12192e677270632e7465" . + "7374696e672e4563686f526571756573741a1a2e677270632e7465737469" . + "6e672e4563686f526573706f6e736512480a0d5265717565737453747265" . + "616d12192e677270632e74657374696e672e4563686f526571756573741a" . + "1a2e677270632e74657374696e672e4563686f526573706f6e7365280112" . + "490a0e526573706f6e736553747265616d12192e677270632e7465737469" . + "6e672e4563686f526571756573741a1a2e677270632e74657374696e672e" . + "4563686f526573706f6e7365300112470a0a4269646953747265616d1219" . + "2e677270632e74657374696e672e4563686f526571756573741a1a2e6772" . + "70632e74657374696e672e4563686f526573706f6e73652801300112460a" . + "0d556e696d706c656d656e74656412192e677270632e74657374696e672e" . + "4563686f526571756573741a1a2e677270632e74657374696e672e456368" . + "6f526573706f6e736532620a18556e696d706c656d656e7465644563686f" . + "5365727669636512460a0d556e696d706c656d656e74656412192e677270" . + "632e74657374696e672e4563686f526571756573741a1a2e677270632e74" . + "657374696e672e4563686f526573706f6e7365320e0a0c4e6f5270635365" . + "7276696365620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/EchoMessages.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/EchoMessages.php new file mode 100644 index 0000000000..4bac8a2906 --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/EchoMessages.php @@ -0,0 +1,54 @@ +internalAddGeneratedFile(hex2bin( + "0a8f070a2a7372632f70726f746f2f677270632f74657374696e672f6563" . + "686f5f6d657373616765732e70726f746f120c677270632e74657374696e" . + "6722320a094465627567496e666f12150a0d737461636b5f656e74726965" . + "73180120032809120e0a0664657461696c18022001280922500a0b457272" . + "6f72537461747573120c0a04636f646518012001280512150a0d6572726f" . + "725f6d657373616765180220012809121c0a1462696e6172795f6572726f" . + "725f64657461696c7318032001280922e2030a0d52657175657374506172" . + "616d7312150a0d6563686f5f646561646c696e65180120012808121e0a16" . + "636c69656e745f63616e63656c5f61667465725f7573180220012805121e" . + "0a167365727665725f63616e63656c5f61667465725f7573180320012805" . + "12150a0d6563686f5f6d65746164617461180420012808121a0a12636865" . + "636b5f617574685f636f6e74657874180520012808121f0a17726573706f" . + "6e73655f6d6573736167655f6c656e67746818062001280512110a096563" . + "686f5f7065657218072001280812200a1865787065637465645f636c6965" . + "6e745f6964656e74697479180820012809121c0a14736b69705f63616e63" . + "656c6c65645f636865636b18092001280812280a2065787065637465645f" . + "7472616e73706f72745f73656375726974795f74797065180a2001280912" . + "2b0a0a64656275675f696e666f180b2001280b32172e677270632e746573" . + "74696e672e4465627567496e666f12120a0a7365727665725f646965180c" . + "20012808121c0a1462696e6172795f6572726f725f64657461696c73180d" . + "2001280912310a0e65787065637465645f6572726f72180e2001280b3219" . + "2e677270632e74657374696e672e4572726f7253746174757312170a0f73" . + "65727665725f736c6565705f7573180f20012805224a0a0b4563686f5265" . + "7175657374120f0a076d657373616765180120012809122a0a0570617261" . + "6d18022001280b321b2e677270632e74657374696e672e52657175657374" . + "506172616d7322460a0e526573706f6e7365506172616d7312180a107265" . + "71756573745f646561646c696e65180120012803120c0a04686f73741802" . + "20012809120c0a0470656572180320012809224c0a0c4563686f52657370" . + "6f6e7365120f0a076d657373616765180120012809122b0a05706172616d" . + "18022001280b321c2e677270632e74657374696e672e526573706f6e7365" . + "506172616d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/GPBEmpty.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/GPBEmpty.php new file mode 100644 index 0000000000..7198f7da0c --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/GPBEmpty.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile(hex2bin( + "0a430a227372632f70726f746f2f677270632f74657374696e672f656d70" . + "74792e70726f746f120c677270632e74657374696e6722070a05456d7074" . + "79620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Metrics.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Metrics.php new file mode 100644 index 0000000000..7ac739fb54 --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Metrics.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0afb020a247372632f70726f746f2f677270632f74657374696e672f6d65" . + "74726963732e70726f746f120c677270632e74657374696e67226c0a0d47" . + "61756765526573706f6e7365120c0a046e616d6518012001280912140a0a" . + "6c6f6e675f76616c7565180220012803480012160a0c646f75626c655f76" . + "616c7565180320012801480012160a0c737472696e675f76616c75651804" . + "20012809480042070a0576616c7565221c0a0c4761756765526571756573" . + "74120c0a046e616d65180120012809220e0a0c456d7074794d6573736167" . + "6532a0010a0e4d6574726963735365727669636512490a0c476574416c6c" . + "476175676573121a2e677270632e74657374696e672e456d7074794d6573" . + "736167651a1b2e677270632e74657374696e672e4761756765526573706f" . + "6e7365300112430a084765744761756765121a2e677270632e7465737469" . + "6e672e4761756765526571756573741a1b2e677270632e74657374696e67" . + "2e4761756765526573706f6e7365620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ReportQpsScenarioService.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ReportQpsScenarioService.php new file mode 100644 index 0000000000..35a1fb4acb --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ReportQpsScenarioService.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile(hex2bin( + "0ab0010a387372632f70726f746f2f677270632f74657374696e672f7265" . + "706f72745f7170735f7363656e6172696f5f736572766963652e70726f74" . + "6f120c677270632e74657374696e67325e0a185265706f72745170735363" . + "656e6172696f5365727669636512420a0e5265706f72745363656e617269" . + "6f121c2e677270632e74657374696e672e5363656e6172696f526573756c" . + "741a122e677270632e74657374696e672e566f6964620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Test.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Test.php new file mode 100644 index 0000000000..54628cfa37 --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Test.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile(hex2bin( + "0a91080a217372632f70726f746f2f677270632f74657374696e672f7465" . + "73742e70726f746f120c677270632e74657374696e671a257372632f7072" . + "6f746f2f677270632f74657374696e672f6d657373616765732e70726f74" . + "6f32cb050a0b546573745365727669636512350a09456d70747943616c6c" . + "12132e677270632e74657374696e672e456d7074791a132e677270632e74" . + "657374696e672e456d70747912460a09556e61727943616c6c121b2e6772" . + "70632e74657374696e672e53696d706c65526571756573741a1c2e677270" . + "632e74657374696e672e53696d706c65526573706f6e7365124f0a124361" . + "63686561626c65556e61727943616c6c121b2e677270632e74657374696e" . + "672e53696d706c65526571756573741a1c2e677270632e74657374696e67" . + "2e53696d706c65526573706f6e7365126c0a1353747265616d696e674f75" . + "7470757443616c6c12282e677270632e74657374696e672e53747265616d" . + "696e674f757470757443616c6c526571756573741a292e677270632e7465" . + "7374696e672e53747265616d696e674f757470757443616c6c526573706f" . + "6e7365300112690a1253747265616d696e67496e70757443616c6c12272e" . + "677270632e74657374696e672e53747265616d696e67496e70757443616c" . + "6c526571756573741a282e677270632e74657374696e672e53747265616d" . + "696e67496e70757443616c6c526573706f6e7365280112690a0e46756c6c" . + "4475706c657843616c6c12282e677270632e74657374696e672e53747265" . + "616d696e674f757470757443616c6c526571756573741a292e677270632e" . + "74657374696e672e53747265616d696e674f757470757443616c6c526573" . + "706f6e73652801300112690a0e48616c664475706c657843616c6c12282e" . + "677270632e74657374696e672e53747265616d696e674f75747075744361" . + "6c6c526571756573741a292e677270632e74657374696e672e5374726561" . + "6d696e674f757470757443616c6c526573706f6e736528013001123d0a11" . + "556e696d706c656d656e74656443616c6c12132e677270632e7465737469" . + "6e672e456d7074791a132e677270632e74657374696e672e456d70747932" . + "550a14556e696d706c656d656e74656453657276696365123d0a11556e69" . + "6d706c656d656e74656443616c6c12132e677270632e74657374696e672e" . + "456d7074791a132e677270632e74657374696e672e456d7074793289010a" . + "105265636f6e6e65637453657276696365123b0a055374617274121d2e67" . + "7270632e74657374696e672e5265636f6e6e656374506172616d731a132e" . + "677270632e74657374696e672e456d70747912380a0453746f7012132e67" . + "7270632e74657374696e672e456d7074791a1b2e677270632e7465737469" . + "6e672e5265636f6e6e656374496e666f620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/WorkerService.php b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/WorkerService.php new file mode 100644 index 0000000000..a8a863df19 --- /dev/null +++ b/src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/WorkerService.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0add020a2b7372632f70726f746f2f677270632f74657374696e672f776f" . + "726b65725f736572766963652e70726f746f120c677270632e7465737469" . + "6e673297020a0d576f726b65725365727669636512450a0952756e536572" . + "76657212182e677270632e74657374696e672e536572766572417267731a" . + "1a2e677270632e74657374696e672e536572766572537461747573280130" . + "0112450a0952756e436c69656e7412182e677270632e74657374696e672e" . + "436c69656e74417267731a1a2e677270632e74657374696e672e436c6965" . + "6e745374617475732801300112420a09436f7265436f756e7412192e6772" . + "70632e74657374696e672e436f7265526571756573741a1a2e677270632e" . + "74657374696e672e436f7265526573706f6e736512340a0a51756974576f" . + "726b657212122e677270632e74657374696e672e566f69641a122e677270" . + "632e74657374696e672e566f6964620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php b/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php index f7bc21587c..0dd3072f18 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php @@ -97,6 +97,12 @@ class ClientConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field int32 messages_per_stream = 18; */ private $messages_per_stream = 0; + /** + * Use coalescing API when possible. + * + * Generated from protobuf field bool use_coalesce_api = 19; + */ + private $use_coalesce_api = false; public function __construct() { \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); @@ -495,5 +501,31 @@ class ClientConfig extends \Google\Protobuf\Internal\Message return $this; } + /** + * Use coalescing API when possible. + * + * Generated from protobuf field bool use_coalesce_api = 19; + * @return bool + */ + public function getUseCoalesceApi() + { + return $this->use_coalesce_api; + } + + /** + * Use coalescing API when possible. + * + * Generated from protobuf field bool use_coalesce_api = 19; + * @param bool $var + * @return $this + */ + public function setUseCoalesceApi($var) + { + GPBUtil::checkBool($var); + $this->use_coalesce_api = $var; + + return $this; + } + } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/DebugInfo.php b/src/php/tests/qps/generated_code/Grpc/Testing/DebugInfo.php new file mode 100644 index 0000000000..805b629b0d --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/DebugInfo.php @@ -0,0 +1,77 @@ +grpc.testing.DebugInfo + */ +class DebugInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string stack_entries = 1; + */ + private $stack_entries; + /** + * Generated from protobuf field string detail = 2; + */ + private $detail = ''; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field repeated string stack_entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStackEntries() + { + return $this->stack_entries; + } + + /** + * Generated from protobuf field repeated string stack_entries = 1; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStackEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->stack_entries = $arr; + + return $this; + } + + /** + * Generated from protobuf field string detail = 2; + * @return string + */ + public function getDetail() + { + return $this->detail; + } + + /** + * Generated from protobuf field string detail = 2; + * @param string $var + * @return $this + */ + public function setDetail($var) + { + GPBUtil::checkString($var, True); + $this->detail = $var; + + return $this; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/EchoRequest.php b/src/php/tests/qps/generated_code/Grpc/Testing/EchoRequest.php new file mode 100644 index 0000000000..9aadfc5dee --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/EchoRequest.php @@ -0,0 +1,75 @@ +grpc.testing.EchoRequest + */ +class EchoRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string message = 1; + */ + private $message = ''; + /** + * Generated from protobuf field .grpc.testing.RequestParams param = 2; + */ + private $param = null; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Generated from protobuf field .grpc.testing.RequestParams param = 2; + * @return \Grpc\Testing\RequestParams + */ + public function getParam() + { + return $this->param; + } + + /** + * Generated from protobuf field .grpc.testing.RequestParams param = 2; + * @param \Grpc\Testing\RequestParams $var + * @return $this + */ + public function setParam($var) + { + GPBUtil::checkMessage($var, \Grpc\Testing\RequestParams::class); + $this->param = $var; + + return $this; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/EchoResponse.php b/src/php/tests/qps/generated_code/Grpc/Testing/EchoResponse.php new file mode 100644 index 0000000000..c4a9db35ab --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/EchoResponse.php @@ -0,0 +1,75 @@ +grpc.testing.EchoResponse + */ +class EchoResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string message = 1; + */ + private $message = ''; + /** + * Generated from protobuf field .grpc.testing.ResponseParams param = 2; + */ + private $param = null; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Generated from protobuf field .grpc.testing.ResponseParams param = 2; + * @return \Grpc\Testing\ResponseParams + */ + public function getParam() + { + return $this->param; + } + + /** + * Generated from protobuf field .grpc.testing.ResponseParams param = 2; + * @param \Grpc\Testing\ResponseParams $var + * @return $this + */ + public function setParam($var) + { + GPBUtil::checkMessage($var, \Grpc\Testing\ResponseParams::class); + $this->param = $var; + + return $this; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/EchoTestServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/EchoTestServiceClient.php new file mode 100644 index 0000000000..b3dcf5b7af --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/EchoTestServiceClient.php @@ -0,0 +1,93 @@ +_simpleRequest('/grpc.testing.EchoTestService/Echo', + $argument, + ['\Grpc\Testing\EchoResponse', 'decode'], + $metadata, $options); + } + + /** + * @param array $metadata metadata + * @param array $options call options + */ + public function RequestStream($metadata = [], $options = []) { + return $this->_clientStreamRequest('/grpc.testing.EchoTestService/RequestStream', + ['\Grpc\Testing\EchoResponse','decode'], + $metadata, $options); + } + + /** + * @param \Grpc\Testing\EchoRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function ResponseStream(\Grpc\Testing\EchoRequest $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/grpc.testing.EchoTestService/ResponseStream', + $argument, + ['\Grpc\Testing\EchoResponse', 'decode'], + $metadata, $options); + } + + /** + * @param array $metadata metadata + * @param array $options call options + */ + public function BidiStream($metadata = [], $options = []) { + return $this->_bidiRequest('/grpc.testing.EchoTestService/BidiStream', + ['\Grpc\Testing\EchoResponse','decode'], + $metadata, $options); + } + + /** + * @param \Grpc\Testing\EchoRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function Unimplemented(\Grpc\Testing\EchoRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grpc.testing.EchoTestService/Unimplemented', + $argument, + ['\Grpc\Testing\EchoResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/EmptyMessage.php b/src/php/tests/qps/generated_code/Grpc/Testing/EmptyMessage.php new file mode 100644 index 0000000000..3da163e7c0 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/EmptyMessage.php @@ -0,0 +1,23 @@ +grpc.testing.EmptyMessage + */ +class EmptyMessage extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ErrorStatus.php b/src/php/tests/qps/generated_code/Grpc/Testing/ErrorStatus.php new file mode 100644 index 0000000000..cc378756c7 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ErrorStatus.php @@ -0,0 +1,103 @@ +grpc.testing.ErrorStatus + */ +class ErrorStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 code = 1; + */ + private $code = 0; + /** + * Generated from protobuf field string error_message = 2; + */ + private $error_message = ''; + /** + * Generated from protobuf field string binary_error_details = 3; + */ + private $binary_error_details = ''; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field int32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Generated from protobuf field int32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt32($var); + $this->code = $var; + + return $this; + } + + /** + * Generated from protobuf field string error_message = 2; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * Generated from protobuf field string error_message = 2; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + + /** + * Generated from protobuf field string binary_error_details = 3; + * @return string + */ + public function getBinaryErrorDetails() + { + return $this->binary_error_details; + } + + /** + * Generated from protobuf field string binary_error_details = 3; + * @param string $var + * @return $this + */ + public function setBinaryErrorDetails($var) + { + GPBUtil::checkString($var, True); + $this->binary_error_details = $var; + + return $this; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/GaugeRequest.php b/src/php/tests/qps/generated_code/Grpc/Testing/GaugeRequest.php new file mode 100644 index 0000000000..3c283693c9 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/GaugeRequest.php @@ -0,0 +1,51 @@ +grpc.testing.GaugeRequest + */ +class GaugeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + private $name = ''; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/GaugeResponse.php b/src/php/tests/qps/generated_code/Grpc/Testing/GaugeResponse.php new file mode 100644 index 0000000000..da658ba198 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/GaugeResponse.php @@ -0,0 +1,126 @@ +grpc.testing.GaugeResponse + */ +class GaugeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + private $name = ''; + protected $value; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 long_value = 2; + * @return int|string + */ + public function getLongValue() + { + return $this->readOneof(2); + } + + /** + * Generated from protobuf field int64 long_value = 2; + * @param int|string $var + * @return $this + */ + public function setLongValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field double double_value = 3; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(3); + } + + /** + * Generated from protobuf field double double_value = 3; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field string string_value = 4; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(4); + } + + /** + * Generated from protobuf field string string_value = 4; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/MetricsServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/MetricsServiceClient.php new file mode 100644 index 0000000000..491ccbce72 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/MetricsServiceClient.php @@ -0,0 +1,69 @@ +_serverStreamRequest('/grpc.testing.MetricsService/GetAllGauges', + $argument, + ['\Grpc\Testing\GaugeResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns the value of one gauge + * @param \Grpc\Testing\GaugeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function GetGauge(\Grpc\Testing\GaugeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grpc.testing.MetricsService/GetGauge', + $argument, + ['\Grpc\Testing\GaugeResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/NoRpcServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/NoRpcServiceClient.php new file mode 100644 index 0000000000..1d58eaf88a --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/NoRpcServiceClient.php @@ -0,0 +1,35 @@ +grpc.testing.Empty + */ +class PBEmpty extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\GPBEmpty::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/PBVoid.php b/src/php/tests/qps/generated_code/Grpc/Testing/PBVoid.php new file mode 100644 index 0000000000..94cb6c1ecf --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/PBVoid.php @@ -0,0 +1,23 @@ +grpc.testing.Void + */ +class PBVoid extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php index 5510b57064..c0e304929d 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php @@ -32,11 +32,11 @@ class ProxyClientServiceClient extends \Grpc\BaseStub { } /** - * @param \Grpc\Testing\Void $argument input argument + * @param \Grpc\Testing\PBVoid $argument input argument * @param array $metadata metadata * @param array $options call options */ - public function GetConfig(\Grpc\Testing\Void $argument, + public function GetConfig(\Grpc\Testing\PBVoid $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/grpc.testing.ProxyClientService/GetConfig', $argument, @@ -50,7 +50,7 @@ class ProxyClientServiceClient extends \Grpc\BaseStub { */ public function ReportTime($metadata = [], $options = []) { return $this->_clientStreamRequest('/grpc.testing.ProxyClientService/ReportTime', - ['\Grpc\Testing\Void','decode'], + ['\Grpc\Testing\PBVoid','decode'], $metadata, $options); } @@ -60,7 +60,7 @@ class ProxyClientServiceClient extends \Grpc\BaseStub { */ public function ReportHist($metadata = [], $options = []) { return $this->_clientStreamRequest('/grpc.testing.ProxyClientService/ReportHist', - ['\Grpc\Testing\Void','decode'], + ['\Grpc\Testing\PBVoid','decode'], $metadata, $options); } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectServiceClient.php new file mode 100644 index 0000000000..a1802e97cd --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ReconnectServiceClient.php @@ -0,0 +1,64 @@ +_simpleRequest('/grpc.testing.ReconnectService/Start', + $argument, + ['\Grpc\Testing\PBEmpty', 'decode'], + $metadata, $options); + } + + /** + * @param \Grpc\Testing\PBEmpty $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function Stop(\Grpc\Testing\PBEmpty $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grpc.testing.ReconnectService/Stop', + $argument, + ['\Grpc\Testing\ReconnectInfo', 'decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php index 72d44ffc66..3abb5abe6d 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ReportQpsScenarioServiceClient.php @@ -43,7 +43,7 @@ class ReportQpsScenarioServiceClient extends \Grpc\BaseStub { $metadata = [], $options = []) { return $this->_simpleRequest('/grpc.testing.ReportQpsScenarioService/ReportScenario', $argument, - ['\Grpc\Testing\Void', 'decode'], + ['\Grpc\Testing\PBVoid', 'decode'], $metadata, $options); } diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/Request.php b/src/php/tests/qps/generated_code/Grpc/Testing/Request.php new file mode 100644 index 0000000000..6a20f6a897 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/Request.php @@ -0,0 +1,23 @@ +grpc.testing.Request + */ +class Request extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\CompilerTest::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/RequestParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/RequestParams.php new file mode 100644 index 0000000000..f01f50d5af --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/RequestParams.php @@ -0,0 +1,431 @@ +grpc.testing.RequestParams + */ +class RequestParams extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool echo_deadline = 1; + */ + private $echo_deadline = false; + /** + * Generated from protobuf field int32 client_cancel_after_us = 2; + */ + private $client_cancel_after_us = 0; + /** + * Generated from protobuf field int32 server_cancel_after_us = 3; + */ + private $server_cancel_after_us = 0; + /** + * Generated from protobuf field bool echo_metadata = 4; + */ + private $echo_metadata = false; + /** + * Generated from protobuf field bool check_auth_context = 5; + */ + private $check_auth_context = false; + /** + * Generated from protobuf field int32 response_message_length = 6; + */ + private $response_message_length = 0; + /** + * Generated from protobuf field bool echo_peer = 7; + */ + private $echo_peer = false; + /** + * will force check_auth_context. + * + * Generated from protobuf field string expected_client_identity = 8; + */ + private $expected_client_identity = ''; + /** + * Generated from protobuf field bool skip_cancelled_check = 9; + */ + private $skip_cancelled_check = false; + /** + * Generated from protobuf field string expected_transport_security_type = 10; + */ + private $expected_transport_security_type = ''; + /** + * Generated from protobuf field .grpc.testing.DebugInfo debug_info = 11; + */ + private $debug_info = null; + /** + * Server should not see a request with this set. + * + * Generated from protobuf field bool server_die = 12; + */ + private $server_die = false; + /** + * Generated from protobuf field string binary_error_details = 13; + */ + private $binary_error_details = ''; + /** + * Generated from protobuf field .grpc.testing.ErrorStatus expected_error = 14; + */ + private $expected_error = null; + /** + * Amount to sleep when invoking server + * + * Generated from protobuf field int32 server_sleep_us = 15; + */ + private $server_sleep_us = 0; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field bool echo_deadline = 1; + * @return bool + */ + public function getEchoDeadline() + { + return $this->echo_deadline; + } + + /** + * Generated from protobuf field bool echo_deadline = 1; + * @param bool $var + * @return $this + */ + public function setEchoDeadline($var) + { + GPBUtil::checkBool($var); + $this->echo_deadline = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 client_cancel_after_us = 2; + * @return int + */ + public function getClientCancelAfterUs() + { + return $this->client_cancel_after_us; + } + + /** + * Generated from protobuf field int32 client_cancel_after_us = 2; + * @param int $var + * @return $this + */ + public function setClientCancelAfterUs($var) + { + GPBUtil::checkInt32($var); + $this->client_cancel_after_us = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 server_cancel_after_us = 3; + * @return int + */ + public function getServerCancelAfterUs() + { + return $this->server_cancel_after_us; + } + + /** + * Generated from protobuf field int32 server_cancel_after_us = 3; + * @param int $var + * @return $this + */ + public function setServerCancelAfterUs($var) + { + GPBUtil::checkInt32($var); + $this->server_cancel_after_us = $var; + + return $this; + } + + /** + * Generated from protobuf field bool echo_metadata = 4; + * @return bool + */ + public function getEchoMetadata() + { + return $this->echo_metadata; + } + + /** + * Generated from protobuf field bool echo_metadata = 4; + * @param bool $var + * @return $this + */ + public function setEchoMetadata($var) + { + GPBUtil::checkBool($var); + $this->echo_metadata = $var; + + return $this; + } + + /** + * Generated from protobuf field bool check_auth_context = 5; + * @return bool + */ + public function getCheckAuthContext() + { + return $this->check_auth_context; + } + + /** + * Generated from protobuf field bool check_auth_context = 5; + * @param bool $var + * @return $this + */ + public function setCheckAuthContext($var) + { + GPBUtil::checkBool($var); + $this->check_auth_context = $var; + + return $this; + } + + /** + * Generated from protobuf field int32 response_message_length = 6; + * @return int + */ + public function getResponseMessageLength() + { + return $this->response_message_length; + } + + /** + * Generated from protobuf field int32 response_message_length = 6; + * @param int $var + * @return $this + */ + public function setResponseMessageLength($var) + { + GPBUtil::checkInt32($var); + $this->response_message_length = $var; + + return $this; + } + + /** + * Generated from protobuf field bool echo_peer = 7; + * @return bool + */ + public function getEchoPeer() + { + return $this->echo_peer; + } + + /** + * Generated from protobuf field bool echo_peer = 7; + * @param bool $var + * @return $this + */ + public function setEchoPeer($var) + { + GPBUtil::checkBool($var); + $this->echo_peer = $var; + + return $this; + } + + /** + * will force check_auth_context. + * + * Generated from protobuf field string expected_client_identity = 8; + * @return string + */ + public function getExpectedClientIdentity() + { + return $this->expected_client_identity; + } + + /** + * will force check_auth_context. + * + * Generated from protobuf field string expected_client_identity = 8; + * @param string $var + * @return $this + */ + public function setExpectedClientIdentity($var) + { + GPBUtil::checkString($var, True); + $this->expected_client_identity = $var; + + return $this; + } + + /** + * Generated from protobuf field bool skip_cancelled_check = 9; + * @return bool + */ + public function getSkipCancelledCheck() + { + return $this->skip_cancelled_check; + } + + /** + * Generated from protobuf field bool skip_cancelled_check = 9; + * @param bool $var + * @return $this + */ + public function setSkipCancelledCheck($var) + { + GPBUtil::checkBool($var); + $this->skip_cancelled_check = $var; + + return $this; + } + + /** + * Generated from protobuf field string expected_transport_security_type = 10; + * @return string + */ + public function getExpectedTransportSecurityType() + { + return $this->expected_transport_security_type; + } + + /** + * Generated from protobuf field string expected_transport_security_type = 10; + * @param string $var + * @return $this + */ + public function setExpectedTransportSecurityType($var) + { + GPBUtil::checkString($var, True); + $this->expected_transport_security_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .grpc.testing.DebugInfo debug_info = 11; + * @return \Grpc\Testing\DebugInfo + */ + public function getDebugInfo() + { + return $this->debug_info; + } + + /** + * Generated from protobuf field .grpc.testing.DebugInfo debug_info = 11; + * @param \Grpc\Testing\DebugInfo $var + * @return $this + */ + public function setDebugInfo($var) + { + GPBUtil::checkMessage($var, \Grpc\Testing\DebugInfo::class); + $this->debug_info = $var; + + return $this; + } + + /** + * Server should not see a request with this set. + * + * Generated from protobuf field bool server_die = 12; + * @return bool + */ + public function getServerDie() + { + return $this->server_die; + } + + /** + * Server should not see a request with this set. + * + * Generated from protobuf field bool server_die = 12; + * @param bool $var + * @return $this + */ + public function setServerDie($var) + { + GPBUtil::checkBool($var); + $this->server_die = $var; + + return $this; + } + + /** + * Generated from protobuf field string binary_error_details = 13; + * @return string + */ + public function getBinaryErrorDetails() + { + return $this->binary_error_details; + } + + /** + * Generated from protobuf field string binary_error_details = 13; + * @param string $var + * @return $this + */ + public function setBinaryErrorDetails($var) + { + GPBUtil::checkString($var, True); + $this->binary_error_details = $var; + + return $this; + } + + /** + * Generated from protobuf field .grpc.testing.ErrorStatus expected_error = 14; + * @return \Grpc\Testing\ErrorStatus + */ + public function getExpectedError() + { + return $this->expected_error; + } + + /** + * Generated from protobuf field .grpc.testing.ErrorStatus expected_error = 14; + * @param \Grpc\Testing\ErrorStatus $var + * @return $this + */ + public function setExpectedError($var) + { + GPBUtil::checkMessage($var, \Grpc\Testing\ErrorStatus::class); + $this->expected_error = $var; + + return $this; + } + + /** + * Amount to sleep when invoking server + * + * Generated from protobuf field int32 server_sleep_us = 15; + * @return int + */ + public function getServerSleepUs() + { + return $this->server_sleep_us; + } + + /** + * Amount to sleep when invoking server + * + * Generated from protobuf field int32 server_sleep_us = 15; + * @param int $var + * @return $this + */ + public function setServerSleepUs($var) + { + GPBUtil::checkInt32($var); + $this->server_sleep_us = $var; + + return $this; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/Response.php b/src/php/tests/qps/generated_code/Grpc/Testing/Response.php new file mode 100644 index 0000000000..7925a7db3d --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/Response.php @@ -0,0 +1,23 @@ +grpc.testing.Response + */ +class Response extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\CompilerTest::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ResponseParams.php b/src/php/tests/qps/generated_code/Grpc/Testing/ResponseParams.php new file mode 100644 index 0000000000..d20f92289a --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ResponseParams.php @@ -0,0 +1,101 @@ +grpc.testing.ResponseParams + */ +class ResponseParams extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 request_deadline = 1; + */ + private $request_deadline = 0; + /** + * Generated from protobuf field string host = 2; + */ + private $host = ''; + /** + * Generated from protobuf field string peer = 3; + */ + private $peer = ''; + + public function __construct() { + \GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field int64 request_deadline = 1; + * @return int|string + */ + public function getRequestDeadline() + { + return $this->request_deadline; + } + + /** + * Generated from protobuf field int64 request_deadline = 1; + * @param int|string $var + * @return $this + */ + public function setRequestDeadline($var) + { + GPBUtil::checkInt64($var); + $this->request_deadline = $var; + + return $this; + } + + /** + * Generated from protobuf field string host = 2; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Generated from protobuf field string host = 2; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Generated from protobuf field string peer = 3; + * @return string + */ + public function getPeer() + { + return $this->peer; + } + + /** + * Generated from protobuf field string peer = 3; + * @param string $var + * @return $this + */ + public function setPeer($var) + { + GPBUtil::checkString($var, True); + $this->peer = $var; + + return $this; + } + +} + diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ServiceAClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/ServiceAClient.php new file mode 100644 index 0000000000..df469cbea3 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ServiceAClient.php @@ -0,0 +1,97 @@ +_simpleRequest('/grpc.testing.ServiceA/MethodA1', + $argument, + ['\Grpc\Testing\Response', 'decode'], + $metadata, $options); + } + + /** + * MethodA2 detached leading comment 1 + * + * Method A2 leading comment 1 + * Method A2 leading comment 2 + * @param array $metadata metadata + * @param array $options call options + */ + public function MethodA2($metadata = [], $options = []) { + return $this->_clientStreamRequest('/grpc.testing.ServiceA/MethodA2', + ['\Grpc\Testing\Response','decode'], + $metadata, $options); + } + + /** + * Method A3 leading comment 1 + * @param \Grpc\Testing\Request $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MethodA3(\Grpc\Testing\Request $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/grpc.testing.ServiceA/MethodA3', + $argument, + ['\Grpc\Testing\Response', 'decode'], + $metadata, $options); + } + + /** + * Method A4 leading comment 1 + * @param array $metadata metadata + * @param array $options call options + */ + public function MethodA4($metadata = [], $options = []) { + return $this->_bidiRequest('/grpc.testing.ServiceA/MethodA4', + ['\Grpc\Testing\Response','decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/ServiceBClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/ServiceBClient.php new file mode 100644 index 0000000000..54acf6364f --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/ServiceBClient.php @@ -0,0 +1,54 @@ +_simpleRequest('/grpc.testing.ServiceB/MethodB1', + $argument, + ['\Grpc\Testing\Response', 'decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/TestServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/TestServiceClient.php new file mode 100644 index 0000000000..7da9713d65 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/TestServiceClient.php @@ -0,0 +1,152 @@ +_simpleRequest('/grpc.testing.TestService/EmptyCall', + $argument, + ['\Grpc\Testing\PBEmpty', 'decode'], + $metadata, $options); + } + + /** + * One request followed by one response. + * @param \Grpc\Testing\SimpleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function UnaryCall(\Grpc\Testing\SimpleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grpc.testing.TestService/UnaryCall', + $argument, + ['\Grpc\Testing\SimpleResponse', 'decode'], + $metadata, $options); + } + + /** + * One request followed by one response. Response has cache control + * headers set such that a caching HTTP proxy (such as GFE) can + * satisfy subsequent requests. + * @param \Grpc\Testing\SimpleRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function CacheableUnaryCall(\Grpc\Testing\SimpleRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grpc.testing.TestService/CacheableUnaryCall', + $argument, + ['\Grpc\Testing\SimpleResponse', 'decode'], + $metadata, $options); + } + + /** + * One request followed by a sequence of responses (streamed download). + * The server returns the payload with client desired type and sizes. + * @param \Grpc\Testing\StreamingOutputCallRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function StreamingOutputCall(\Grpc\Testing\StreamingOutputCallRequest $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/grpc.testing.TestService/StreamingOutputCall', + $argument, + ['\Grpc\Testing\StreamingOutputCallResponse', 'decode'], + $metadata, $options); + } + + /** + * A sequence of requests followed by one response (streamed upload). + * The server returns the aggregated size of client payload as the result. + * @param array $metadata metadata + * @param array $options call options + */ + public function StreamingInputCall($metadata = [], $options = []) { + return $this->_clientStreamRequest('/grpc.testing.TestService/StreamingInputCall', + ['\Grpc\Testing\StreamingInputCallResponse','decode'], + $metadata, $options); + } + + /** + * A sequence of requests with each request served by the server immediately. + * As one request could lead to multiple responses, this interface + * demonstrates the idea of full duplexing. + * @param array $metadata metadata + * @param array $options call options + */ + public function FullDuplexCall($metadata = [], $options = []) { + return $this->_bidiRequest('/grpc.testing.TestService/FullDuplexCall', + ['\Grpc\Testing\StreamingOutputCallResponse','decode'], + $metadata, $options); + } + + /** + * A sequence of requests followed by a sequence of responses. + * The server buffers all the client requests and then serves them in order. A + * stream of responses are returned to the client when the server starts with + * first request. + * @param array $metadata metadata + * @param array $options call options + */ + public function HalfDuplexCall($metadata = [], $options = []) { + return $this->_bidiRequest('/grpc.testing.TestService/HalfDuplexCall', + ['\Grpc\Testing\StreamingOutputCallResponse','decode'], + $metadata, $options); + } + + /** + * The test server will not implement this method. It will be used + * to test the behavior when clients call unimplemented methods. + * @param \Grpc\Testing\PBEmpty $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function UnimplementedCall(\Grpc\Testing\PBEmpty $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grpc.testing.TestService/UnimplementedCall', + $argument, + ['\Grpc\Testing\PBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/UnimplementedEchoServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/UnimplementedEchoServiceClient.php new file mode 100644 index 0000000000..fee0daa70c --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/UnimplementedEchoServiceClient.php @@ -0,0 +1,47 @@ +_simpleRequest('/grpc.testing.UnimplementedEchoService/Unimplemented', + $argument, + ['\Grpc\Testing\EchoResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/UnimplementedServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/UnimplementedServiceClient.php new file mode 100644 index 0000000000..53b2020f19 --- /dev/null +++ b/src/php/tests/qps/generated_code/Grpc/Testing/UnimplementedServiceClient.php @@ -0,0 +1,53 @@ +_simpleRequest('/grpc.testing.UnimplementedService/UnimplementedCall', + $argument, + ['\Grpc\Testing\PBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php b/src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php index 98c244ff9d..366e36529e 100644 --- a/src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php +++ b/src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php @@ -81,15 +81,15 @@ class WorkerServiceClient extends \Grpc\BaseStub { /** * Quit this worker - * @param \Grpc\Testing\Void $argument input argument + * @param \Grpc\Testing\PBVoid $argument input argument * @param array $metadata metadata * @param array $options call options */ - public function QuitWorker(\Grpc\Testing\Void $argument, + public function QuitWorker(\Grpc\Testing\PBVoid $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/grpc.testing.WorkerService/QuitWorker', $argument, - ['\Grpc\Testing\Void', 'decode'], + ['\Grpc\Testing\PBVoid', 'decode'], $metadata, $options); } diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD index 58412ed630..16721ff2ed 100644 --- a/src/proto/grpc/testing/BUILD +++ b/src/proto/grpc/testing/BUILD @@ -76,11 +76,26 @@ grpc_proto_library( ) grpc_proto_library( - name = "services_proto", - srcs = ["services.proto"], + name = "benchmark_service_proto", + srcs = ["benchmark_service.proto"], deps = [ - "control_proto", - "messages_proto", + "messages_proto", + ], +) + +grpc_proto_library( + name = "report_qps_scenario_service_proto", + srcs = ["report_qps_scenario_service.proto"], + deps = [ + "control_proto", + ], +) + +grpc_proto_library( + name = "worker_service_proto", + srcs = ["worker_service.proto"], + deps = [ + "control_proto", ], ) diff --git a/src/proto/grpc/testing/benchmark_service.proto b/src/proto/grpc/testing/benchmark_service.proto new file mode 100644 index 0000000000..63167a8cee --- /dev/null +++ b/src/proto/grpc/testing/benchmark_service.proto @@ -0,0 +1,44 @@ +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +syntax = "proto3"; + +import "src/proto/grpc/testing/messages.proto"; + +package grpc.testing; + +service BenchmarkService { + // One request followed by one response. + // The server returns the client payload as-is. + rpc UnaryCall(SimpleRequest) returns (SimpleResponse); + + // Repeated sequence of one request followed by one response. + // Should be called streaming ping-pong + // The server returns the client payload as-is on each response + rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse); + + // Single-sided unbounded streaming from client to server + // The server returns the client payload as-is once the client does WritesDone + rpc StreamingFromClient(stream SimpleRequest) returns (SimpleResponse); + + // Single-sided unbounded streaming from server to client + // The server repeatedly returns the client payload as-is + rpc StreamingFromServer(SimpleRequest) returns (stream SimpleResponse); + + // Two-sided unbounded streaming between server to client + // Both sides send the content of their own choice to the other + rpc StreamingBothWays(stream SimpleRequest) returns (stream SimpleResponse); +} diff --git a/src/proto/grpc/testing/report_qps_scenario_service.proto b/src/proto/grpc/testing/report_qps_scenario_service.proto new file mode 100644 index 0000000000..f4e5c36254 --- /dev/null +++ b/src/proto/grpc/testing/report_qps_scenario_service.proto @@ -0,0 +1,26 @@ +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +syntax = "proto3"; + +import "src/proto/grpc/testing/control.proto"; + +package grpc.testing; + +service ReportQpsScenarioService { + // Report results of a QPS test benchmark scenario. + rpc ReportScenario(ScenarioResult) returns (Void); +} diff --git a/src/proto/grpc/testing/services.proto b/src/proto/grpc/testing/services.proto deleted file mode 100644 index 93c21f42d1..0000000000 --- a/src/proto/grpc/testing/services.proto +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2015 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// An integration test service that covers all the method signature permutations -// of unary/streaming requests/responses. -syntax = "proto3"; - -import "src/proto/grpc/testing/messages.proto"; -import "src/proto/grpc/testing/control.proto"; - -package grpc.testing; - -service BenchmarkService { - // One request followed by one response. - // The server returns the client payload as-is. - rpc UnaryCall(SimpleRequest) returns (SimpleResponse); - - // Repeated sequence of one request followed by one response. - // Should be called streaming ping-pong - // The server returns the client payload as-is on each response - rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse); - - // Single-sided unbounded streaming from client to server - // The server returns the client payload as-is once the client does WritesDone - rpc StreamingFromClient(stream SimpleRequest) returns (SimpleResponse); - - // Single-sided unbounded streaming from server to client - // The server repeatedly returns the client payload as-is - rpc StreamingFromServer(SimpleRequest) returns (stream SimpleResponse); - - // Two-sided unbounded streaming between server to client - // Both sides send the content of their own choice to the other - rpc StreamingBothWays(stream SimpleRequest) returns (stream SimpleResponse); -} - -service WorkerService { - // Start server with specified workload. - // First request sent specifies the ServerConfig followed by ServerStatus - // response. After that, a "Mark" can be sent anytime to request the latest - // stats. Closing the stream will initiate shutdown of the test server - // and once the shutdown has finished, the OK status is sent to terminate - // this RPC. - rpc RunServer(stream ServerArgs) returns (stream ServerStatus); - - // Start client with specified workload. - // First request sent specifies the ClientConfig followed by ClientStatus - // response. After that, a "Mark" can be sent anytime to request the latest - // stats. Closing the stream will initiate shutdown of the test client - // and once the shutdown has finished, the OK status is sent to terminate - // this RPC. - rpc RunClient(stream ClientArgs) returns (stream ClientStatus); - - // Just return the core count - unary call - rpc CoreCount(CoreRequest) returns (CoreResponse); - - // Quit this worker - rpc QuitWorker(Void) returns (Void); -} - -service ReportQpsScenarioService { - // Report results of a QPS test benchmark scenario. - rpc ReportScenario(ScenarioResult) returns (Void); -} diff --git a/src/proto/grpc/testing/worker_service.proto b/src/proto/grpc/testing/worker_service.proto new file mode 100644 index 0000000000..a4cde944b0 --- /dev/null +++ b/src/proto/grpc/testing/worker_service.proto @@ -0,0 +1,45 @@ +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +syntax = "proto3"; + +import "src/proto/grpc/testing/control.proto"; + +package grpc.testing; + +service WorkerService { + // Start server with specified workload. + // First request sent specifies the ServerConfig followed by ServerStatus + // response. After that, a "Mark" can be sent anytime to request the latest + // stats. Closing the stream will initiate shutdown of the test server + // and once the shutdown has finished, the OK status is sent to terminate + // this RPC. + rpc RunServer(stream ServerArgs) returns (stream ServerStatus); + + // Start client with specified workload. + // First request sent specifies the ClientConfig followed by ClientStatus + // response. After that, a "Mark" can be sent anytime to request the latest + // stats. Closing the stream will initiate shutdown of the test client + // and once the shutdown has finished, the OK status is sent to terminate + // this RPC. + rpc RunClient(stream ClientArgs) returns (stream ClientStatus); + + // Just return the core count - unary call + rpc CoreCount(CoreRequest) returns (CoreResponse); + + // Quit this worker + rpc QuitWorker(Void) returns (Void); +} diff --git a/src/python/grpcio_tests/tests/qps/benchmark_client.py b/src/python/grpcio_tests/tests/qps/benchmark_client.py index e6392a8b8c..0488450740 100644 --- a/src/python/grpcio_tests/tests/qps/benchmark_client.py +++ b/src/python/grpcio_tests/tests/qps/benchmark_client.py @@ -22,7 +22,7 @@ from six.moves import queue import grpc from src.proto.grpc.testing import messages_pb2 -from src.proto.grpc.testing import services_pb2_grpc +from src.proto.grpc.testing import benchmark_service_pb2_grpc from tests.unit import resources from tests.unit import test_common @@ -58,7 +58,8 @@ class BenchmarkClient: if config.payload_config.WhichOneof('payload') == 'simple_params': self._generic = False - self._stub = services_pb2_grpc.BenchmarkServiceStub(channel) + self._stub = benchmark_service_pb2_grpc.BenchmarkServiceStub( + channel) payload = messages_pb2.Payload( body='\0' * config.payload_config.simple_params.req_size) self._request = messages_pb2.SimpleRequest( diff --git a/src/python/grpcio_tests/tests/qps/benchmark_server.py b/src/python/grpcio_tests/tests/qps/benchmark_server.py index bb07844491..2bd89cbbdf 100644 --- a/src/python/grpcio_tests/tests/qps/benchmark_server.py +++ b/src/python/grpcio_tests/tests/qps/benchmark_server.py @@ -13,10 +13,10 @@ # limitations under the License. from src.proto.grpc.testing import messages_pb2 -from src.proto.grpc.testing import services_pb2_grpc +from src.proto.grpc.testing import benchmark_service_pb2_grpc -class BenchmarkServer(services_pb2_grpc.BenchmarkServiceServicer): +class BenchmarkServer(benchmark_service_pb2_grpc.BenchmarkServiceServicer): """Synchronous Server implementation for the Benchmark service.""" def UnaryCall(self, request, context): @@ -29,7 +29,8 @@ class BenchmarkServer(services_pb2_grpc.BenchmarkServiceServicer): yield messages_pb2.SimpleResponse(payload=payload) -class GenericBenchmarkServer(services_pb2_grpc.BenchmarkServiceServicer): +class GenericBenchmarkServer( + benchmark_service_pb2_grpc.BenchmarkServiceServicer): """Generic Server implementation for the Benchmark service.""" def __init__(self, resp_size): diff --git a/src/python/grpcio_tests/tests/qps/qps_worker.py b/src/python/grpcio_tests/tests/qps/qps_worker.py index 54f69db109..c33d013882 100644 --- a/src/python/grpcio_tests/tests/qps/qps_worker.py +++ b/src/python/grpcio_tests/tests/qps/qps_worker.py @@ -17,7 +17,7 @@ import argparse import time import grpc -from src.proto.grpc.testing import services_pb2_grpc +from src.proto.grpc.testing import worker_service_pb2_grpc from tests.qps import worker_server from tests.unit import test_common @@ -26,7 +26,8 @@ from tests.unit import test_common def run_worker_server(port): server = test_common.test_server() servicer = worker_server.WorkerServer() - services_pb2_grpc.add_WorkerServiceServicer_to_server(servicer, server) + worker_service_pb2_grpc.add_WorkerServiceServicer_to_server( + servicer, server) server.add_insecure_port('[::]:{}'.format(port)) server.start() servicer.wait_for_quit() diff --git a/src/python/grpcio_tests/tests/qps/worker_server.py b/src/python/grpcio_tests/tests/qps/worker_server.py index 41e2403c8f..db145fbf64 100644 --- a/src/python/grpcio_tests/tests/qps/worker_server.py +++ b/src/python/grpcio_tests/tests/qps/worker_server.py @@ -20,7 +20,7 @@ import time from concurrent import futures import grpc from src.proto.grpc.testing import control_pb2 -from src.proto.grpc.testing import services_pb2_grpc +from src.proto.grpc.testing import worker_service_pb2_grpc from src.proto.grpc.testing import stats_pb2 from tests.qps import benchmark_client @@ -31,7 +31,7 @@ from tests.unit import resources from tests.unit import test_common -class WorkerServer(services_pb2_grpc.WorkerServiceServicer): +class WorkerServer(worker_service_pb2_grpc.WorkerServiceServicer): """Python Worker Server implementation.""" def __init__(self): @@ -72,7 +72,7 @@ class WorkerServer(services_pb2_grpc.WorkerServiceServicer): server = test_common.test_server(max_workers=server_threads) if config.server_type == control_pb2.ASYNC_SERVER: servicer = benchmark_server.BenchmarkServer() - services_pb2_grpc.add_BenchmarkServiceServicer_to_server( + worker_service_pb2_grpc.add_BenchmarkServiceServicer_to_server( servicer, server) elif config.server_type == control_pb2.ASYNC_GENERIC_SERVER: resp_size = config.payload_config.bytebuf_params.resp_size diff --git a/src/python/grpcio_tests/tests/testing/_server_test.py b/src/python/grpcio_tests/tests/testing/_server_test.py index 4f4abd7708..88e3a79ae5 100644 --- a/src/python/grpcio_tests/tests/testing/_server_test.py +++ b/src/python/grpcio_tests/tests/testing/_server_test.py @@ -21,13 +21,8 @@ import grpc_testing from tests.testing import _application_common from tests.testing import _application_testing_common from tests.testing import _server_application -from tests.testing.proto import services_pb2 -# TODO(https://github.com/google/protobuf/issues/3452): Drop this skip. -@unittest.skipIf( - services_pb2.DESCRIPTOR.services_by_name.get('FirstService') is None, - 'Fix protobuf issue 3452!') class FirstServiceServicerTest(unittest.TestCase): def setUp(self): diff --git a/src/ruby/pb/generate_proto_ruby.sh b/src/ruby/pb/generate_proto_ruby.sh index d25eff5819..ec6e2eedd1 100755 --- a/src/ruby/pb/generate_proto_ruby.sh +++ b/src/ruby/pb/generate_proto_ruby.sh @@ -32,7 +32,13 @@ $PROTOC -I . \ --plugin=$PLUGIN $PROTOC -I . \ - src/proto/grpc/testing/{messages,payloads,stats,services,control}.proto \ + src/proto/grpc/core/stats.proto \ + --grpc_out=src/ruby/qps \ + --ruby_out=src/ruby/qps \ + --plugin=$PLUGIN + +$PROTOC -I . \ + src/proto/grpc/testing/{messages,payloads,stats,benchmark_service,report_qps_scenario_service,worker_service,control}.proto \ --grpc_out=src/ruby/qps \ --ruby_out=src/ruby/qps \ --plugin=$PLUGIN diff --git a/src/ruby/qps/client.rb b/src/ruby/qps/client.rb index 0426aee7c8..d573d827b9 100644 --- a/src/ruby/qps/client.rb +++ b/src/ruby/qps/client.rb @@ -23,7 +23,7 @@ $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) require 'grpc' require 'histogram' -require 'src/proto/grpc/testing/services_services_pb' +require 'src/proto/grpc/testing/benchmark_service_services_pb' class Poisson def interarrival diff --git a/src/ruby/qps/proxy-worker.rb b/src/ruby/qps/proxy-worker.rb index 4c7c510fdb..5f23d896cc 100755 --- a/src/ruby/qps/proxy-worker.rb +++ b/src/ruby/qps/proxy-worker.rb @@ -27,7 +27,7 @@ require 'histogram' require 'etc' require 'facter' require 'qps-common' -require 'src/proto/grpc/testing/services_services_pb' +require 'src/proto/grpc/testing/worker_service_services_pb' require 'src/proto/grpc/testing/proxy-service_services_pb' class ProxyBenchmarkClientServiceImpl < Grpc::Testing::ProxyClientService::Service diff --git a/src/ruby/qps/server.rb b/src/ruby/qps/server.rb index 90218ea5d2..dccc64e300 100644 --- a/src/ruby/qps/server.rb +++ b/src/ruby/qps/server.rb @@ -24,7 +24,7 @@ $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) require 'grpc' require 'qps-common' require 'src/proto/grpc/testing/messages_pb' -require 'src/proto/grpc/testing/services_services_pb' +require 'src/proto/grpc/testing/benchmark_service_services_pb' require 'src/proto/grpc/testing/stats_pb' class BenchmarkServiceImpl < Grpc::Testing::BenchmarkService::Service diff --git a/src/ruby/qps/src/proto/grpc/core/stats_pb.rb b/src/ruby/qps/src/proto/grpc/core/stats_pb.rb new file mode 100644 index 0000000000..59c057820b --- /dev/null +++ b/src/ruby/qps/src/proto/grpc/core/stats_pb.rb @@ -0,0 +1,33 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/proto/grpc/core/stats.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "grpc.core.Bucket" do + optional :start, :double, 1 + optional :count, :uint64, 2 + end + add_message "grpc.core.Histogram" do + repeated :buckets, :message, 1, "grpc.core.Bucket" + end + add_message "grpc.core.Metric" do + optional :name, :string, 1 + oneof :value do + optional :count, :uint64, 10 + optional :histogram, :message, 11, "grpc.core.Histogram" + end + end + add_message "grpc.core.Stats" do + repeated :metrics, :message, 1, "grpc.core.Metric" + end +end + +module Grpc + module Core + Bucket = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Bucket").msgclass + Histogram = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Histogram").msgclass + Metric = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Metric").msgclass + Stats = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Stats").msgclass + end +end diff --git a/src/ruby/qps/src/proto/grpc/testing/benchmark_service_pb.rb b/src/ruby/qps/src/proto/grpc/testing/benchmark_service_pb.rb new file mode 100644 index 0000000000..0bd3625f3d --- /dev/null +++ b/src/ruby/qps/src/proto/grpc/testing/benchmark_service_pb.rb @@ -0,0 +1,13 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/proto/grpc/testing/benchmark_service.proto + +require 'google/protobuf' + +require 'src/proto/grpc/testing/messages_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do +end + +module Grpc + module Testing + end +end diff --git a/src/ruby/qps/src/proto/grpc/testing/benchmark_service_services_pb.rb b/src/ruby/qps/src/proto/grpc/testing/benchmark_service_services_pb.rb new file mode 100644 index 0000000000..65e5a75c4d --- /dev/null +++ b/src/ruby/qps/src/proto/grpc/testing/benchmark_service_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: src/proto/grpc/testing/benchmark_service.proto for package 'grpc.testing' +# Original file comments: +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# An integration test service that covers all the method signature permutations +# of unary/streaming requests/responses. + +require 'grpc' +require 'src/proto/grpc/testing/benchmark_service_pb' + +module Grpc + module Testing + module BenchmarkService + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'grpc.testing.BenchmarkService' + + # One request followed by one response. + # The server returns the client payload as-is. + rpc :UnaryCall, SimpleRequest, SimpleResponse + # Repeated sequence of one request followed by one response. + # Should be called streaming ping-pong + # The server returns the client payload as-is on each response + rpc :StreamingCall, stream(SimpleRequest), stream(SimpleResponse) + # Single-sided unbounded streaming from client to server + # The server returns the client payload as-is once the client does WritesDone + rpc :StreamingFromClient, stream(SimpleRequest), SimpleResponse + # Single-sided unbounded streaming from server to client + # The server repeatedly returns the client payload as-is + rpc :StreamingFromServer, SimpleRequest, stream(SimpleResponse) + # Two-sided unbounded streaming between server to client + # Both sides send the content of their own choice to the other + rpc :StreamingBothWays, stream(SimpleRequest), stream(SimpleResponse) + end + + Stub = Service.rpc_stub_class + end + end +end diff --git a/src/ruby/qps/src/proto/grpc/testing/control_pb.rb b/src/ruby/qps/src/proto/grpc/testing/control_pb.rb index 02207a2b5d..5acc7fc0c6 100644 --- a/src/ruby/qps/src/proto/grpc/testing/control_pb.rb +++ b/src/ruby/qps/src/proto/grpc/testing/control_pb.rb @@ -20,6 +20,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "grpc.testing.SecurityParams" do optional :use_test_ca, :bool, 1 optional :server_host_override, :string, 2 + optional :cred_type, :string, 3 + end + add_message "grpc.testing.ChannelArg" do + optional :name, :string, 1 + oneof :value do + optional :str_value, :string, 2 + optional :int_value, :int32, 3 + end end add_message "grpc.testing.ClientConfig" do repeated :server_targets, :string, 1 @@ -35,6 +43,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do repeated :core_list, :int32, 13 optional :core_limit, :int32, 14 optional :other_client_api, :string, 15 + repeated :channel_args, :message, 16, "grpc.testing.ChannelArg" + optional :threads_per_cq, :int32, 17 + optional :messages_per_stream, :int32, 18 + optional :use_coalesce_api, :bool, 19 end add_message "grpc.testing.ClientStatus" do optional :stats, :message, 1, "grpc.testing.ClientStats" @@ -57,6 +69,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :payload_config, :message, 9, "grpc.testing.PayloadConfig" repeated :core_list, :int32, 10 optional :other_server_api, :string, 11 + optional :threads_per_cq, :int32, 12 + optional :resource_quota_size, :int32, 1001 + repeated :channel_args, :message, 1002, "grpc.testing.ChannelArg" end add_message "grpc.testing.ServerArgs" do oneof :argtype do @@ -101,6 +116,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :latency_95, :double, 9 optional :latency_99, :double, 10 optional :latency_999, :double, 11 + optional :server_cpu_usage, :double, 12 + optional :successful_requests_per_second, :double, 13 + optional :failed_requests_per_second, :double, 14 + optional :client_polls_per_request, :double, 15 + optional :server_polls_per_request, :double, 16 + optional :server_queries_per_cpu_sec, :double, 17 + optional :client_queries_per_cpu_sec, :double, 18 end add_message "grpc.testing.ScenarioResult" do optional :scenario, :message, 1, "grpc.testing.Scenario" @@ -111,6 +133,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :summary, :message, 6, "grpc.testing.ScenarioResultSummary" repeated :client_success, :bool, 7 repeated :server_success, :bool, 8 + repeated :request_results, :message, 9, "grpc.testing.RequestResultCount" end add_enum "grpc.testing.ClientType" do value :SYNC_CLIENT, 0 @@ -126,6 +149,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_enum "grpc.testing.RpcType" do value :UNARY, 0 value :STREAMING, 1 + value :STREAMING_FROM_CLIENT, 2 + value :STREAMING_FROM_SERVER, 3 + value :STREAMING_BOTH_WAYS, 4 end end @@ -135,6 +161,7 @@ module Grpc 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 + ChannelArg = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ChannelArg").msgclass ClientConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientConfig").msgclass ClientStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientStatus").msgclass Mark = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Mark").msgclass diff --git a/src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_pb.rb b/src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_pb.rb new file mode 100644 index 0000000000..1b43e37299 --- /dev/null +++ b/src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_pb.rb @@ -0,0 +1,13 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/proto/grpc/testing/report_qps_scenario_service.proto + +require 'google/protobuf' + +require 'src/proto/grpc/testing/control_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do +end + +module Grpc + module Testing + end +end diff --git a/src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_services_pb.rb b/src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_services_pb.rb new file mode 100644 index 0000000000..ddc81bed3d --- /dev/null +++ b/src/ruby/qps/src/proto/grpc/testing/report_qps_scenario_service_services_pb.rb @@ -0,0 +1,42 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: src/proto/grpc/testing/report_qps_scenario_service.proto for package 'grpc.testing' +# Original file comments: +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# An integration test service that covers all the method signature permutations +# of unary/streaming requests/responses. + +require 'grpc' +require 'src/proto/grpc/testing/report_qps_scenario_service_pb' + +module Grpc + module Testing + module ReportQpsScenarioService + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'grpc.testing.ReportQpsScenarioService' + + # Report results of a QPS test benchmark scenario. + rpc :ReportScenario, ScenarioResult, Void + end + + Stub = Service.rpc_stub_class + end + end +end diff --git a/src/ruby/qps/src/proto/grpc/testing/services_pb.rb b/src/ruby/qps/src/proto/grpc/testing/services_pb.rb deleted file mode 100644 index 5ce13bf8b0..0000000000 --- a/src/ruby/qps/src/proto/grpc/testing/services_pb.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: src/proto/grpc/testing/services.proto - -require 'google/protobuf' - -require 'src/proto/grpc/testing/messages_pb' -require 'src/proto/grpc/testing/control_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do -end - -module Grpc - module Testing - end -end diff --git a/src/ruby/qps/src/proto/grpc/testing/services_services_pb.rb b/src/ruby/qps/src/proto/grpc/testing/services_services_pb.rb deleted file mode 100644 index 1d8b619d30..0000000000 --- a/src/ruby/qps/src/proto/grpc/testing/services_services_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: src/proto/grpc/testing/services.proto for package 'grpc.testing' -# Original file comments: -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# An integration test service that covers all the method signature permutations -# of unary/streaming requests/responses. - -require 'grpc' -require 'src/proto/grpc/testing/services_pb' - -module Grpc - module Testing - module BenchmarkService - class Service - - include GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'grpc.testing.BenchmarkService' - - # One request followed by one response. - # The server returns the client payload as-is. - rpc :UnaryCall, SimpleRequest, SimpleResponse - # One request followed by one response. - # The server returns the client payload as-is. - rpc :StreamingCall, stream(SimpleRequest), stream(SimpleResponse) - end - - Stub = Service.rpc_stub_class - end - module WorkerService - class Service - - include GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'grpc.testing.WorkerService' - - # Start server with specified workload. - # First request sent specifies the ServerConfig followed by ServerStatus - # response. After that, a "Mark" can be sent anytime to request the latest - # stats. Closing the stream will initiate shutdown of the test server - # and once the shutdown has finished, the OK status is sent to terminate - # this RPC. - rpc :RunServer, stream(ServerArgs), stream(ServerStatus) - # Start client with specified workload. - # First request sent specifies the ClientConfig followed by ClientStatus - # response. After that, a "Mark" can be sent anytime to request the latest - # stats. Closing the stream will initiate shutdown of the test client - # and once the shutdown has finished, the OK status is sent to terminate - # this RPC. - rpc :RunClient, stream(ClientArgs), stream(ClientStatus) - # Just return the core count - unary call - rpc :CoreCount, CoreRequest, CoreResponse - # Quit this worker - rpc :QuitWorker, Void, Void - end - - Stub = Service.rpc_stub_class - end - end -end diff --git a/src/ruby/qps/src/proto/grpc/testing/stats_pb.rb b/src/ruby/qps/src/proto/grpc/testing/stats_pb.rb index 41f75bedf0..2069840168 100644 --- a/src/ruby/qps/src/proto/grpc/testing/stats_pb.rb +++ b/src/ruby/qps/src/proto/grpc/testing/stats_pb.rb @@ -3,11 +3,16 @@ require 'google/protobuf' +require 'src/proto/grpc/core/stats_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_message "grpc.testing.ServerStats" do optional :time_elapsed, :double, 1 optional :time_user, :double, 2 optional :time_system, :double, 3 + optional :total_cpu_time, :uint64, 4 + optional :idle_cpu_time, :uint64, 5 + optional :cq_poll_count, :uint64, 6 + optional :core_stats, :message, 7, "grpc.core.Stats" end add_message "grpc.testing.HistogramParams" do optional :resolution, :double, 1 @@ -21,11 +26,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :sum_of_squares, :double, 5 optional :count, :double, 6 end + add_message "grpc.testing.RequestResultCount" do + optional :status_code, :int32, 1 + optional :count, :int64, 2 + end add_message "grpc.testing.ClientStats" do optional :latencies, :message, 1, "grpc.testing.HistogramData" optional :time_elapsed, :double, 2 optional :time_user, :double, 3 optional :time_system, :double, 4 + repeated :request_results, :message, 5, "grpc.testing.RequestResultCount" + optional :cq_poll_count, :uint64, 6 + optional :core_stats, :message, 7, "grpc.core.Stats" end end @@ -34,6 +46,7 @@ module Grpc ServerStats = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ServerStats").msgclass HistogramParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.HistogramParams").msgclass HistogramData = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.HistogramData").msgclass + RequestResultCount = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.RequestResultCount").msgclass ClientStats = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientStats").msgclass end end diff --git a/src/ruby/qps/src/proto/grpc/testing/worker_service_pb.rb b/src/ruby/qps/src/proto/grpc/testing/worker_service_pb.rb new file mode 100644 index 0000000000..18b63452b6 --- /dev/null +++ b/src/ruby/qps/src/proto/grpc/testing/worker_service_pb.rb @@ -0,0 +1,13 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: src/proto/grpc/testing/worker_service.proto + +require 'google/protobuf' + +require 'src/proto/grpc/testing/control_pb' +Google::Protobuf::DescriptorPool.generated_pool.build do +end + +module Grpc + module Testing + end +end diff --git a/src/ruby/qps/src/proto/grpc/testing/worker_service_services_pb.rb b/src/ruby/qps/src/proto/grpc/testing/worker_service_services_pb.rb new file mode 100644 index 0000000000..a7ecc95757 --- /dev/null +++ b/src/ruby/qps/src/proto/grpc/testing/worker_service_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: src/proto/grpc/testing/worker_service.proto for package 'grpc.testing' +# Original file comments: +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# An integration test service that covers all the method signature permutations +# of unary/streaming requests/responses. + +require 'grpc' +require 'src/proto/grpc/testing/worker_service_pb' + +module Grpc + module Testing + module WorkerService + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'grpc.testing.WorkerService' + + # Start server with specified workload. + # First request sent specifies the ServerConfig followed by ServerStatus + # response. After that, a "Mark" can be sent anytime to request the latest + # stats. Closing the stream will initiate shutdown of the test server + # and once the shutdown has finished, the OK status is sent to terminate + # this RPC. + rpc :RunServer, stream(ServerArgs), stream(ServerStatus) + # Start client with specified workload. + # First request sent specifies the ClientConfig followed by ClientStatus + # response. After that, a "Mark" can be sent anytime to request the latest + # stats. Closing the stream will initiate shutdown of the test client + # and once the shutdown has finished, the OK status is sent to terminate + # this RPC. + rpc :RunClient, stream(ClientArgs), stream(ClientStatus) + # Just return the core count - unary call + rpc :CoreCount, CoreRequest, CoreResponse + # Quit this worker + rpc :QuitWorker, Void, Void + end + + Stub = Service.rpc_stub_class + end + end +end diff --git a/src/ruby/qps/worker.rb b/src/ruby/qps/worker.rb index 8258487418..633ff13c35 100755 --- a/src/ruby/qps/worker.rb +++ b/src/ruby/qps/worker.rb @@ -29,7 +29,7 @@ require 'facter' require 'client' require 'qps-common' require 'server' -require 'src/proto/grpc/testing/services_services_pb' +require 'src/proto/grpc/testing/worker_service_services_pb' class WorkerServiceImpl < Grpc::Testing::WorkerService::Service def cpu_cores diff --git a/test/cpp/qps/BUILD b/test/cpp/qps/BUILD index f1abb19e64..a348b88079 100644 --- a/test/cpp/qps/BUILD +++ b/test/cpp/qps/BUILD @@ -47,9 +47,10 @@ grpc_cc_library( "//:grpc", "//:grpc++", "//:grpc++_core_stats", + "//src/proto/grpc/testing:benchmark_service_proto", "//src/proto/grpc/testing:control_proto", "//src/proto/grpc/testing:payloads_proto", - "//src/proto/grpc/testing:services_proto", + "//src/proto/grpc/testing:worker_service_proto", "//test/core/end2end:ssl_test_data", "//test/core/util:gpr_test_util", "//test/core/util:grpc_test_util", @@ -74,7 +75,8 @@ grpc_cc_library( "//:grpc++", "//src/proto/grpc/testing:control_proto", "//src/proto/grpc/testing:messages_proto", - "//src/proto/grpc/testing:services_proto", + "//src/proto/grpc/testing:report_qps_scenario_service_proto", + "//src/proto/grpc/testing:worker_service_proto", "//test/core/util:gpr_test_util", "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 77743a1dee..31ae6ca1fb 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -31,8 +31,8 @@ #include #include +#include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "src/proto/grpc/testing/payloads.pb.h" -#include "src/proto/grpc/testing/services.grpc.pb.h" #include "src/cpp/util/core_stats.h" #include "test/cpp/qps/histogram.h" diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index f9bef91da0..c79a10d1b4 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -35,7 +35,7 @@ #include #include "src/core/lib/surface/completion_queue.h" -#include "src/proto/grpc/testing/services.grpc.pb.h" +#include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/usage_timer.h" #include "test/cpp/util/create_test_channel.h" diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 5185eef710..e65e3b43f3 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -35,7 +35,7 @@ #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/profiling/timers.h" -#include "src/proto/grpc/testing/services.grpc.pb.h" +#include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/usage_timer.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 361ee4346f..34f1291576 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -33,6 +33,7 @@ #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/profiling/timers.h" +#include "src/proto/grpc/testing/worker_service.grpc.pb.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" #include "test/cpp/qps/client.h" diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index aaffb1d93e..d3f0380474 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -35,7 +35,7 @@ #include #include "src/core/lib/gpr/host_port.h" -#include "src/proto/grpc/testing/services.pb.h" +#include "src/proto/grpc/testing/worker_service.grpc.pb.h" #include "test/core/util/grpc_profiler.h" #include "test/core/util/histogram.h" #include "test/cpp/qps/client.h" diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 0a2565d463..607f4e579b 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -27,7 +27,7 @@ #include #include "src/cpp/util/core_stats.h" -#include "src/proto/grpc/testing/services.grpc.pb.h" +#include "src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index c5dd138353..8e62f4f449 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -28,7 +28,7 @@ #include "test/cpp/qps/driver.h" #include -#include "src/proto/grpc/testing/services.grpc.pb.h" +#include "src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 9cb05cd1d1..1dfef6cfc1 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -36,7 +36,7 @@ #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/surface/completion_queue.h" -#include "src/proto/grpc/testing/services.grpc.pb.h" +#include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/core/util/test_config.h" #include "test/cpp/qps/server.h" diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 9dfd362055..82a9186989 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -26,7 +26,7 @@ #include #include "src/core/lib/gpr/host_port.h" -#include "src/proto/grpc/testing/services.grpc.pb.h" +#include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/server.h" #include "test/cpp/qps/usage_timer.h" diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 8b13e767c7..1e4d401cae 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -3194,6 +3194,9 @@ "grpc++_core_stats" ], "headers": [ + "src/proto/grpc/testing/benchmark_service.grpc.pb.h", + "src/proto/grpc/testing/benchmark_service.pb.h", + "src/proto/grpc/testing/benchmark_service_mock.grpc.pb.h", "src/proto/grpc/testing/control.grpc.pb.h", "src/proto/grpc/testing/control.pb.h", "src/proto/grpc/testing/control_mock.grpc.pb.h", @@ -3203,12 +3206,15 @@ "src/proto/grpc/testing/payloads.grpc.pb.h", "src/proto/grpc/testing/payloads.pb.h", "src/proto/grpc/testing/payloads_mock.grpc.pb.h", - "src/proto/grpc/testing/services.grpc.pb.h", - "src/proto/grpc/testing/services.pb.h", - "src/proto/grpc/testing/services_mock.grpc.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service_mock.grpc.pb.h", "src/proto/grpc/testing/stats.grpc.pb.h", "src/proto/grpc/testing/stats.pb.h", - "src/proto/grpc/testing/stats_mock.grpc.pb.h" + "src/proto/grpc/testing/stats_mock.grpc.pb.h", + "src/proto/grpc/testing/worker_service.grpc.pb.h", + "src/proto/grpc/testing/worker_service.pb.h", + "src/proto/grpc/testing/worker_service_mock.grpc.pb.h" ], "is_filegroup": false, "language": "c++", @@ -3228,6 +3234,9 @@ "grpc++_core_stats" ], "headers": [ + "src/proto/grpc/testing/benchmark_service.grpc.pb.h", + "src/proto/grpc/testing/benchmark_service.pb.h", + "src/proto/grpc/testing/benchmark_service_mock.grpc.pb.h", "src/proto/grpc/testing/control.grpc.pb.h", "src/proto/grpc/testing/control.pb.h", "src/proto/grpc/testing/control_mock.grpc.pb.h", @@ -3237,12 +3246,15 @@ "src/proto/grpc/testing/payloads.grpc.pb.h", "src/proto/grpc/testing/payloads.pb.h", "src/proto/grpc/testing/payloads_mock.grpc.pb.h", - "src/proto/grpc/testing/services.grpc.pb.h", - "src/proto/grpc/testing/services.pb.h", - "src/proto/grpc/testing/services_mock.grpc.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service_mock.grpc.pb.h", "src/proto/grpc/testing/stats.grpc.pb.h", "src/proto/grpc/testing/stats.pb.h", - "src/proto/grpc/testing/stats_mock.grpc.pb.h" + "src/proto/grpc/testing/stats_mock.grpc.pb.h", + "src/proto/grpc/testing/worker_service.grpc.pb.h", + "src/proto/grpc/testing/worker_service.pb.h", + "src/proto/grpc/testing/worker_service_mock.grpc.pb.h" ], "is_filegroup": false, "language": "c++", @@ -7451,6 +7463,9 @@ "grpc_test_util" ], "headers": [ + "src/proto/grpc/testing/benchmark_service.grpc.pb.h", + "src/proto/grpc/testing/benchmark_service.pb.h", + "src/proto/grpc/testing/benchmark_service_mock.grpc.pb.h", "src/proto/grpc/testing/control.grpc.pb.h", "src/proto/grpc/testing/control.pb.h", "src/proto/grpc/testing/control_mock.grpc.pb.h", @@ -7460,12 +7475,15 @@ "src/proto/grpc/testing/payloads.grpc.pb.h", "src/proto/grpc/testing/payloads.pb.h", "src/proto/grpc/testing/payloads_mock.grpc.pb.h", - "src/proto/grpc/testing/services.grpc.pb.h", - "src/proto/grpc/testing/services.pb.h", - "src/proto/grpc/testing/services_mock.grpc.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service.pb.h", + "src/proto/grpc/testing/report_qps_scenario_service_mock.grpc.pb.h", "src/proto/grpc/testing/stats.grpc.pb.h", "src/proto/grpc/testing/stats.pb.h", "src/proto/grpc/testing/stats_mock.grpc.pb.h", + "src/proto/grpc/testing/worker_service.grpc.pb.h", + "src/proto/grpc/testing/worker_service.pb.h", + "src/proto/grpc/testing/worker_service_mock.grpc.pb.h", "test/cpp/qps/benchmark_config.h", "test/cpp/qps/client.h", "test/cpp/qps/driver.h", -- cgit v1.2.3 From 701e70da071ef91152c30aad813e2ed405c05c59 Mon Sep 17 00:00:00 2001 From: kpayson64 Date: Mon, 30 Apr 2018 17:40:00 -0700 Subject: c++ify --- BUILD | 4 +- CMakeLists.txt | 4 +- Makefile | 6 +- build.yaml | 6 +- config.m4 | 2 +- config.w32 | 2 +- gRPC-C++.podspec | 4 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- grpc.gyp | 2 +- package.xml | 4 +- src/core/lib/gpr/fork.cc | 239 -------------------- src/core/lib/gpr/fork.h | 82 ------- src/core/lib/gprpp/fork.cc | 240 +++++++++++++++++++++ src/core/lib/gprpp/fork.h | 79 +++++++ src/core/lib/gprpp/thd_posix.cc | 8 +- src/core/lib/iomgr/exec_ctx.h | 8 +- src/core/lib/iomgr/fork_posix.cc | 14 +- src/core/lib/surface/init.cc | 7 +- src/python/grpcio/grpc_core_dependencies.py | 2 +- test/core/gpr/fork_test.cc | 136 ------------ test/core/gprpp/fork_test.cc | 136 ++++++++++++ tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/generated/sources_and_headers.json | 8 +- 25 files changed, 503 insertions(+), 506 deletions(-) delete mode 100644 src/core/lib/gpr/fork.cc delete mode 100644 src/core/lib/gpr/fork.h create mode 100644 src/core/lib/gprpp/fork.cc create mode 100644 src/core/lib/gprpp/fork.h delete mode 100644 test/core/gpr/fork_test.cc create mode 100644 test/core/gprpp/fork_test.cc (limited to 'grpc.gyp') diff --git a/BUILD b/BUILD index 9c99f95fcd..45c8f40692 100644 --- a/BUILD +++ b/BUILD @@ -511,7 +511,6 @@ grpc_cc_library( "src/core/lib/gpr/env_linux.cc", "src/core/lib/gpr/env_posix.cc", "src/core/lib/gpr/env_windows.cc", - "src/core/lib/gpr/fork.cc", "src/core/lib/gpr/host_port.cc", "src/core/lib/gpr/log.cc", "src/core/lib/gpr/log_android.cc", @@ -536,6 +535,7 @@ grpc_cc_library( "src/core/lib/gpr/tmpfile_posix.cc", "src/core/lib/gpr/tmpfile_windows.cc", "src/core/lib/gpr/wrap_memcpy.cc", + "src/core/lib/gprpp/fork.cc", "src/core/lib/gprpp/thd_posix.cc", "src/core/lib/gprpp/thd_windows.cc", "src/core/lib/profiling/basic_timers.cc", @@ -544,7 +544,6 @@ grpc_cc_library( hdrs = [ "src/core/lib/gpr/arena.h", "src/core/lib/gpr/env.h", - "src/core/lib/gpr/fork.h", "src/core/lib/gpr/host_port.h", "src/core/lib/gpr/mpscq.h", "src/core/lib/gpr/murmur_hash.h", @@ -559,6 +558,7 @@ grpc_cc_library( "src/core/lib/gpr/tmpfile.h", "src/core/lib/gpr/useful.h", "src/core/lib/gprpp/abstract.h", + "src/core/lib/gprpp/fork.h", "src/core/lib/gprpp/manual_constructor.h", "src/core/lib/gprpp/memory.h", "src/core/lib/gprpp/thd.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index aa4dbb4f9b..b58065b111 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -703,7 +703,6 @@ add_library(gpr src/core/lib/gpr/env_linux.cc src/core/lib/gpr/env_posix.cc src/core/lib/gpr/env_windows.cc - src/core/lib/gpr/fork.cc src/core/lib/gpr/host_port.cc src/core/lib/gpr/log.cc src/core/lib/gpr/log_android.cc @@ -728,6 +727,7 @@ add_library(gpr src/core/lib/gpr/tmpfile_posix.cc src/core/lib/gpr/tmpfile_windows.cc src/core/lib/gpr/wrap_memcpy.cc + src/core/lib/gprpp/fork.cc src/core/lib/gprpp/thd_posix.cc src/core/lib/gprpp/thd_windows.cc src/core/lib/profiling/basic_timers.cc @@ -6161,7 +6161,7 @@ if (gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC) add_executable(fork_test - test/core/gpr/fork_test.cc + test/core/gprpp/fork_test.cc ) diff --git a/Makefile b/Makefile index 631ecf9f96..8394102269 100644 --- a/Makefile +++ b/Makefile @@ -3035,7 +3035,6 @@ LIBGPR_SRC = \ src/core/lib/gpr/env_linux.cc \ src/core/lib/gpr/env_posix.cc \ src/core/lib/gpr/env_windows.cc \ - src/core/lib/gpr/fork.cc \ src/core/lib/gpr/host_port.cc \ src/core/lib/gpr/log.cc \ src/core/lib/gpr/log_android.cc \ @@ -3060,6 +3059,7 @@ LIBGPR_SRC = \ src/core/lib/gpr/tmpfile_posix.cc \ src/core/lib/gpr/tmpfile_windows.cc \ src/core/lib/gpr/wrap_memcpy.cc \ + src/core/lib/gprpp/fork.cc \ src/core/lib/gprpp/thd_posix.cc \ src/core/lib/gprpp/thd_windows.cc \ src/core/lib/profiling/basic_timers.cc \ @@ -10959,7 +10959,7 @@ endif FORK_TEST_SRC = \ - test/core/gpr/fork_test.cc \ + test/core/gprpp/fork_test.cc \ FORK_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(FORK_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -10979,7 +10979,7 @@ $(BINDIR)/$(CONFIG)/fork_test: $(FORK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test endif -$(OBJDIR)/$(CONFIG)/test/core/gpr/fork_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/gprpp/fork_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_fork_test: $(FORK_TEST_OBJS:.o=.dep) diff --git a/build.yaml b/build.yaml index 0d8846bcd1..890ebb06c4 100644 --- a/build.yaml +++ b/build.yaml @@ -121,7 +121,6 @@ filegroups: - src/core/lib/gpr/env_linux.cc - src/core/lib/gpr/env_posix.cc - src/core/lib/gpr/env_windows.cc - - src/core/lib/gpr/fork.cc - src/core/lib/gpr/host_port.cc - src/core/lib/gpr/log.cc - src/core/lib/gpr/log_android.cc @@ -146,6 +145,7 @@ filegroups: - src/core/lib/gpr/tmpfile_posix.cc - src/core/lib/gpr/tmpfile_windows.cc - src/core/lib/gpr/wrap_memcpy.cc + - src/core/lib/gprpp/fork.cc - src/core/lib/gprpp/thd_posix.cc - src/core/lib/gprpp/thd_windows.cc - src/core/lib/profiling/basic_timers.cc @@ -174,7 +174,6 @@ filegroups: headers: - src/core/lib/gpr/arena.h - src/core/lib/gpr/env.h - - src/core/lib/gpr/fork.h - src/core/lib/gpr/host_port.h - src/core/lib/gpr/mpscq.h - src/core/lib/gpr/murmur_hash.h @@ -192,6 +191,7 @@ filegroups: - src/core/lib/gprpp/atomic.h - src/core/lib/gprpp/atomic_with_atm.h - src/core/lib/gprpp/atomic_with_std.h + - src/core/lib/gprpp/fork.h - src/core/lib/gprpp/manual_constructor.h - src/core/lib/gprpp/memory.h - src/core/lib/gprpp/thd.h @@ -2320,7 +2320,7 @@ targets: build: test language: c src: - - test/core/gpr/fork_test.cc + - test/core/gprpp/fork_test.cc deps: - gpr_test_util - gpr diff --git a/config.m4 b/config.m4 index 57fc2dbab9..17d2f9c1a6 100644 --- a/config.m4 +++ b/config.m4 @@ -49,7 +49,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/gpr/env_linux.cc \ src/core/lib/gpr/env_posix.cc \ src/core/lib/gpr/env_windows.cc \ - src/core/lib/gpr/fork.cc \ src/core/lib/gpr/host_port.cc \ src/core/lib/gpr/log.cc \ src/core/lib/gpr/log_android.cc \ @@ -74,6 +73,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/gpr/tmpfile_posix.cc \ src/core/lib/gpr/tmpfile_windows.cc \ src/core/lib/gpr/wrap_memcpy.cc \ + src/core/lib/gprpp/fork.cc \ src/core/lib/gprpp/thd_posix.cc \ src/core/lib/gprpp/thd_windows.cc \ src/core/lib/profiling/basic_timers.cc \ diff --git a/config.w32 b/config.w32 index 580607dd3d..7c5a76acef 100644 --- a/config.w32 +++ b/config.w32 @@ -26,7 +26,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\gpr\\env_linux.cc " + "src\\core\\lib\\gpr\\env_posix.cc " + "src\\core\\lib\\gpr\\env_windows.cc " + - "src\\core\\lib\\gpr\\fork.cc " + "src\\core\\lib\\gpr\\host_port.cc " + "src\\core\\lib\\gpr\\log.cc " + "src\\core\\lib\\gpr\\log_android.cc " + @@ -51,6 +50,7 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\gpr\\tmpfile_posix.cc " + "src\\core\\lib\\gpr\\tmpfile_windows.cc " + "src\\core\\lib\\gpr\\wrap_memcpy.cc " + + "src\\core\\lib\\gprpp\\fork.cc " + "src\\core\\lib\\gprpp\\thd_posix.cc " + "src\\core\\lib\\gprpp\\thd_windows.cc " + "src\\core\\lib\\profiling\\basic_timers.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 65a5dc66b4..22428cc03d 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -213,7 +213,6 @@ Pod::Spec.new do |s| 'src/cpp/codegen/codegen_init.cc', 'src/core/lib/gpr/arena.h', 'src/core/lib/gpr/env.h', - 'src/core/lib/gpr/fork.h', 'src/core/lib/gpr/host_port.h', 'src/core/lib/gpr/mpscq.h', 'src/core/lib/gpr/murmur_hash.h', @@ -231,6 +230,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/atomic.h', 'src/core/lib/gprpp/atomic_with_atm.h', 'src/core/lib/gprpp/atomic_with_std.h', + 'src/core/lib/gprpp/fork.h', 'src/core/lib/gprpp/manual_constructor.h', 'src/core/lib/gprpp/memory.h', 'src/core/lib/gprpp/thd.h', @@ -495,7 +495,6 @@ Pod::Spec.new do |s| 'src/cpp/thread_manager/thread_manager.h', 'src/core/lib/gpr/arena.h', 'src/core/lib/gpr/env.h', - 'src/core/lib/gpr/fork.h', 'src/core/lib/gpr/host_port.h', 'src/core/lib/gpr/mpscq.h', 'src/core/lib/gpr/murmur_hash.h', @@ -513,6 +512,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/atomic.h', 'src/core/lib/gprpp/atomic_with_atm.h', 'src/core/lib/gprpp/atomic_with_std.h', + 'src/core/lib/gprpp/fork.h', 'src/core/lib/gprpp/manual_constructor.h', 'src/core/lib/gprpp/memory.h', 'src/core/lib/gprpp/thd.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 7f61719cb1..631dfed013 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -185,7 +185,6 @@ Pod::Spec.new do |s| # To save you from scrolling, this is the last part of the podspec. ss.source_files = 'src/core/lib/gpr/arena.h', 'src/core/lib/gpr/env.h', - 'src/core/lib/gpr/fork.h', 'src/core/lib/gpr/host_port.h', 'src/core/lib/gpr/mpscq.h', 'src/core/lib/gpr/murmur_hash.h', @@ -203,6 +202,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/atomic.h', 'src/core/lib/gprpp/atomic_with_atm.h', 'src/core/lib/gprpp/atomic_with_std.h', + 'src/core/lib/gprpp/fork.h', 'src/core/lib/gprpp/manual_constructor.h', 'src/core/lib/gprpp/memory.h', 'src/core/lib/gprpp/thd.h', @@ -217,7 +217,6 @@ Pod::Spec.new do |s| 'src/core/lib/gpr/env_linux.cc', 'src/core/lib/gpr/env_posix.cc', 'src/core/lib/gpr/env_windows.cc', - 'src/core/lib/gpr/fork.cc', 'src/core/lib/gpr/host_port.cc', 'src/core/lib/gpr/log.cc', 'src/core/lib/gpr/log_android.cc', @@ -242,6 +241,7 @@ Pod::Spec.new do |s| 'src/core/lib/gpr/tmpfile_posix.cc', 'src/core/lib/gpr/tmpfile_windows.cc', 'src/core/lib/gpr/wrap_memcpy.cc', + 'src/core/lib/gprpp/fork.cc', 'src/core/lib/gprpp/thd_posix.cc', 'src/core/lib/gprpp/thd_windows.cc', 'src/core/lib/profiling/basic_timers.cc', @@ -778,7 +778,6 @@ Pod::Spec.new do |s| ss.private_header_files = 'src/core/lib/gpr/arena.h', 'src/core/lib/gpr/env.h', - 'src/core/lib/gpr/fork.h', 'src/core/lib/gpr/host_port.h', 'src/core/lib/gpr/mpscq.h', 'src/core/lib/gpr/murmur_hash.h', @@ -796,6 +795,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/atomic.h', 'src/core/lib/gprpp/atomic_with_atm.h', 'src/core/lib/gprpp/atomic_with_std.h', + 'src/core/lib/gprpp/fork.h', 'src/core/lib/gprpp/manual_constructor.h', 'src/core/lib/gprpp/memory.h', 'src/core/lib/gprpp/thd.h', diff --git a/grpc.gemspec b/grpc.gemspec index 3df7cea33f..d85d7af4eb 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -76,7 +76,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/sync_windows.h ) s.files += %w( src/core/lib/gpr/arena.h ) s.files += %w( src/core/lib/gpr/env.h ) - s.files += %w( src/core/lib/gpr/fork.h ) s.files += %w( src/core/lib/gpr/host_port.h ) s.files += %w( src/core/lib/gpr/mpscq.h ) s.files += %w( src/core/lib/gpr/murmur_hash.h ) @@ -94,6 +93,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gprpp/atomic.h ) s.files += %w( src/core/lib/gprpp/atomic_with_atm.h ) s.files += %w( src/core/lib/gprpp/atomic_with_std.h ) + s.files += %w( src/core/lib/gprpp/fork.h ) s.files += %w( src/core/lib/gprpp/manual_constructor.h ) s.files += %w( src/core/lib/gprpp/memory.h ) s.files += %w( src/core/lib/gprpp/thd.h ) @@ -108,7 +108,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gpr/env_linux.cc ) s.files += %w( src/core/lib/gpr/env_posix.cc ) s.files += %w( src/core/lib/gpr/env_windows.cc ) - s.files += %w( src/core/lib/gpr/fork.cc ) s.files += %w( src/core/lib/gpr/host_port.cc ) s.files += %w( src/core/lib/gpr/log.cc ) s.files += %w( src/core/lib/gpr/log_android.cc ) @@ -133,6 +132,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gpr/tmpfile_posix.cc ) s.files += %w( src/core/lib/gpr/tmpfile_windows.cc ) s.files += %w( src/core/lib/gpr/wrap_memcpy.cc ) + s.files += %w( src/core/lib/gprpp/fork.cc ) s.files += %w( src/core/lib/gprpp/thd_posix.cc ) s.files += %w( src/core/lib/gprpp/thd_windows.cc ) s.files += %w( src/core/lib/profiling/basic_timers.cc ) diff --git a/grpc.gyp b/grpc.gyp index 38597a5b4f..d1acde001b 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -182,7 +182,6 @@ 'src/core/lib/gpr/env_linux.cc', 'src/core/lib/gpr/env_posix.cc', 'src/core/lib/gpr/env_windows.cc', - 'src/core/lib/gpr/fork.cc', 'src/core/lib/gpr/host_port.cc', 'src/core/lib/gpr/log.cc', 'src/core/lib/gpr/log_android.cc', @@ -207,6 +206,7 @@ 'src/core/lib/gpr/tmpfile_posix.cc', 'src/core/lib/gpr/tmpfile_windows.cc', 'src/core/lib/gpr/wrap_memcpy.cc', + 'src/core/lib/gprpp/fork.cc', 'src/core/lib/gprpp/thd_posix.cc', 'src/core/lib/gprpp/thd_windows.cc', 'src/core/lib/profiling/basic_timers.cc', diff --git a/package.xml b/package.xml index c4a6f6fc92..83ad34ee66 100644 --- a/package.xml +++ b/package.xml @@ -83,7 +83,6 @@ - @@ -101,6 +100,7 @@ + @@ -115,7 +115,6 @@ - @@ -140,6 +139,7 @@ + diff --git a/src/core/lib/gpr/fork.cc b/src/core/lib/gpr/fork.cc deleted file mode 100644 index ec25848bd0..0000000000 --- a/src/core/lib/gpr/fork.cc +++ /dev/null @@ -1,239 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include - -#include "src/core/lib/gpr/fork.h" - -#include - -#include -#include -#include - -#include "src/core/lib/gpr/env.h" -#include "src/core/lib/gpr/useful.h" - -/* - * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK - * AROUND VERY SPECIFIC USE CASES. - */ - -// The exec_ctx_count has 2 modes, blocked and unblocked. -// When unblocked, the count is 2-indexed; exec_ctx_count=2 indicates -// 0 active ExecCtxs, exex_ctx_count=3 indicates 1 active ExecCtxs... - -// When blocked, the exec_ctx_count is 0-indexed. Note that ExecCtx -// creation can only be blocked if there is exactly 1 outstanding ExecCtx, -// meaning that BLOCKED and UNBLOCKED counts partition the integers -#define UNBLOCKED(n) (n + 2) -#define BLOCKED(n) (n) - -class ExecCtxState { - public: - ExecCtxState() : fork_complete_(true) { - gpr_mu_init(&mu_); - gpr_cv_init(&cv_); - gpr_atm_no_barrier_store(&count_, UNBLOCKED(0)); - } - - void IncExecCtxCount() { - intptr_t count = static_cast( - gpr_atm_no_barrier_load(&count_)); - while (true) { - if (count <= BLOCKED(1)) { - // This only occurs if we are trying to fork. Wait until the fork() - // operation completes before allowing new ExecCtxs. - gpr_mu_lock(&mu_); - if (gpr_atm_no_barrier_load(&count_) <= BLOCKED(1)) { - while (!fork_complete_) { - gpr_cv_wait(&cv_, &mu_, - gpr_inf_future(GPR_CLOCK_REALTIME)); - } - } - gpr_mu_unlock(&mu_); - } else if (gpr_atm_no_barrier_cas(&count_, count, - count + 1)) { - break; - } - count = gpr_atm_no_barrier_load(&count_); - } - } - - void DecExecCtxCount() { - gpr_atm_no_barrier_fetch_add(&count_, -1); - } - - bool BlockExecCtx() { - // Assumes there is an active ExecCtx when this function is called - if (gpr_atm_no_barrier_cas(&count_, UNBLOCKED(1), - BLOCKED(1))) { - fork_complete_ = false; - return true; - } - return false; - } - - void AllowExecCtx() { - gpr_mu_lock(&mu_); - gpr_atm_no_barrier_store(&count_, UNBLOCKED(0)); - fork_complete_ = true; - gpr_cv_broadcast(&cv_); - gpr_mu_unlock(&g_mu); - } - - void ~ExecCtxState() { - gpr_mu_destroy(&mu_); - gpr_cv_destroy(&cv_); - } -} - -class ThreadState { - public: - ThreadState() : awaiting_threads_(false), threads_done_(false), count_(0) { - gpr_mu_init(&mu_); - gpr_cv_init(&cv_); - } - - void IncThreadCount() { - gpr_mu_lock(&mu_); - count_++; - gpr_mu_unlock(&mu_); - } - - void DecThreadCount() { - gpr_mu_lock(&mu_); - count_--; - if (awaiting_threads_ && count_ == 0) { - threads_done = true; - gpr_cv_signal(&cv_); - } - gpr_mu_unlock(&mu_); - } - void AwaitThreads() { - gpr_mu_lock(&mu_); - awaiting_threads_ = true; - threads_done_ = (count_ == 0); - while (!threads_done_) { - gpr_cv_wait(&cv_, &mu_, - gpr_inf_future(GPR_CLOCK_REALTIME)); - } - awaiting_threads_ = true; - gpr_mu_unlock(&mu_); - } - - ~ThreadState() { - gpr_mu_destroy(&mu_); - gpr_cv_destroy(&cv_); - } -} - -static void Fork::GlobalInit() { -#ifdef GRPC_ENABLE_FORK_SUPPORT - bool supportEnabled_ = true; -#else - bool supportEnabled_ = false; -#endif - bool env_var_set = false; - char* env = gpr_getenv("GRPC_ENABLE_FORK_SUPPORT"); - if (env != nullptr) { - static const char* truthy[] = {"yes", "Yes", "YES", "true", - "True", "TRUE", "1"}; - static const char* falsey[] = {"no", "No", "NO", "false", - "False", "FALSE", "0"}; - for (size_t i = 0; i < GPR_ARRAY_SIZE(truthy); i++) { - if (0 == strcmp(env, truthy[i])) { - supportEnabled_ = true; - env_var_set = true; - break; - } - } - if (!env_var_set) { - for (size_t i = 0; i < GPR_ARRAY_SIZE(falsey); i++) { - if (0 == strcmp(env, falsey[i])) { - supportEnabled_ = false; - env_var_set = true; - break; - } - } - } - gpr_free(env); - } - if (overrideEnabled_ != -1) { - supportEnabled_ = (overrideEnabled_ == 1); - } - if (supportEnabled_) { - execCtxState_ = grpc_core::New(); - threadState_ = grpc_core::New(); - } -} - - static void Fork::GlobalShutdown() { - if (supportEnabled_) { - grpc_core::Delete(execCtxState_); - grpc_core::Delete(threadState_); - } - } - - static bool Fork::Enabled() { - return supportEnabled_; - } - - // Testing Only - static void Fork::Enable(bool enable) { - overrideEnabled_ = enable ? 1 : 0; - } - - static void Fork::IncExecCtxCount() { - if(supportEnabled_) { - execCtxState->IncExecCtxCount(); - } - } - - static void Fork::DecExecCtxCount() { - if(supportEnabled_) { - execCtxState->DecExecCtxCount(); - } - } - - static bool Fork::BlockExecCtx() { - if(supportEnabled_) { - return execCtxState->BlockExecCtx(); - } - return false; - } - - static void Fork::AllowExecCtx() { - execCtxState->AllowExecCtx(); - } - - static void Fork::IncThreadCount() { - threadState->IncThreadCount(); - } - - static void Fork::DecThreadCount() { - threadState_->DecThreadCount(); - } - static void Fork::AwaitThreads() { - threadState_->AwaitThreads(); - } - -private: - ExecCtxState* execCtxState_; - ThreadState* threadState_; -} diff --git a/src/core/lib/gpr/fork.h b/src/core/lib/gpr/fork.h deleted file mode 100644 index bf5acc3292..0000000000 --- a/src/core/lib/gpr/fork.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPC_CORE_LIB_GPR_FORK_H -#define GRPC_CORE_LIB_GPR_FORK_H - -/* - * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK - * AROUND VERY SPECIFIC USE CASES. - */ - -namespace grpc_core { - -namespace { - class ExecCtxState; - class ThreadState; -} - -namespace internal { - -class ForkSupport { - public: - static void GlobalInit(); - static void GlobalShutdown(); - - // Returns true if fork suppport is enabled, false otherwise - static bool Enabled(); - - // Increment the count of active ExecCtxs. - // Will block until a pending fork is complete if one is in progress. - void IncExecCtxCount(); - - // Decrement the count of active ExecCtxs - void DecExecCtxCount(); - - // Check if there is a single active ExecCtx - // (the one used to invoke this function). If there are more, - // return false. Otherwise, return true and block creation of - // more ExecCtx s until AlloWExecCtx() is called - // - bool BlockExecCtx(); - void AllowExecCtx(); - - // Increment the count of active threads. - void IncThreadCount(); - - // Decrement the count of active threads. - void DecThreadCount(); - - // Await all core threads to be joined. - void AwaitThreads(); - - // Test only: overrides environment variables/compile flags - // Must be called before grpc_init() - void Enable(bool enable); - - private: - static ExecCtxState* execCtxState_ = nullptr; - static ThreadState* threadState_ = nullptr; - static bool supportEnabled_ = false; - static int overrideEnabled_ = -1; -} - -} // namespace internal -} // namespace grpc_core - -#endif /* GRPC_CORE_LIB_GPR_FORK_H */ diff --git a/src/core/lib/gprpp/fork.cc b/src/core/lib/gprpp/fork.cc new file mode 100644 index 0000000000..78f6a2fa0d --- /dev/null +++ b/src/core/lib/gprpp/fork.cc @@ -0,0 +1,240 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include "src/core/lib/gprpp/fork.h" + +#include + +#include +#include +#include + +#include "src/core/lib/gpr/env.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/memory.h" + +/* + * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK + * AROUND VERY SPECIFIC USE CASES. + */ + +namespace grpc_core { +namespace internal { +// The exec_ctx_count has 2 modes, blocked and unblocked. +// When unblocked, the count is 2-indexed; exec_ctx_count=2 indicates +// 0 active ExecCtxs, exex_ctx_count=3 indicates 1 active ExecCtxs... + +// When blocked, the exec_ctx_count is 0-indexed. Note that ExecCtx +// creation can only be blocked if there is exactly 1 outstanding ExecCtx, +// meaning that BLOCKED and UNBLOCKED counts partition the integers +#define UNBLOCKED(n) (n + 2) +#define BLOCKED(n) (n) + +class ExecCtxState { + public: + ExecCtxState() : fork_complete_(true) { + gpr_mu_init(&mu_); + gpr_cv_init(&cv_); + gpr_atm_no_barrier_store(&count_, UNBLOCKED(0)); + } + + void IncExecCtxCount() { + intptr_t count = static_cast(gpr_atm_no_barrier_load(&count_)); + while (true) { + if (count <= BLOCKED(1)) { + // This only occurs if we are trying to fork. Wait until the fork() + // operation completes before allowing new ExecCtxs. + gpr_mu_lock(&mu_); + if (gpr_atm_no_barrier_load(&count_) <= BLOCKED(1)) { + while (!fork_complete_) { + gpr_cv_wait(&cv_, &mu_, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + } + gpr_mu_unlock(&mu_); + } else if (gpr_atm_no_barrier_cas(&count_, count, count + 1)) { + break; + } + count = gpr_atm_no_barrier_load(&count_); + } + } + + void DecExecCtxCount() { gpr_atm_no_barrier_fetch_add(&count_, -1); } + + bool BlockExecCtx() { + // Assumes there is an active ExecCtx when this function is called + if (gpr_atm_no_barrier_cas(&count_, UNBLOCKED(1), BLOCKED(1))) { + fork_complete_ = false; + return true; + } + return false; + } + + void AllowExecCtx() { + gpr_mu_lock(&mu_); + gpr_atm_no_barrier_store(&count_, UNBLOCKED(0)); + fork_complete_ = true; + gpr_cv_broadcast(&cv_); + gpr_mu_unlock(&mu_); + } + + ~ExecCtxState() { + gpr_mu_destroy(&mu_); + gpr_cv_destroy(&cv_); + } + + private: + bool fork_complete_; + gpr_mu mu_; + gpr_cv cv_; + gpr_atm count_; +}; + +class ThreadState { + public: + ThreadState() : awaiting_threads_(false), threads_done_(false), count_(0) { + gpr_mu_init(&mu_); + gpr_cv_init(&cv_); + } + + void IncThreadCount() { + gpr_mu_lock(&mu_); + count_++; + gpr_mu_unlock(&mu_); + } + + void DecThreadCount() { + gpr_mu_lock(&mu_); + count_--; + if (awaiting_threads_ && count_ == 0) { + threads_done_ = true; + gpr_cv_signal(&cv_); + } + gpr_mu_unlock(&mu_); + } + void AwaitThreads() { + gpr_mu_lock(&mu_); + awaiting_threads_ = true; + threads_done_ = (count_ == 0); + while (!threads_done_) { + gpr_cv_wait(&cv_, &mu_, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + awaiting_threads_ = true; + gpr_mu_unlock(&mu_); + } + + ~ThreadState() { + gpr_mu_destroy(&mu_); + gpr_cv_destroy(&cv_); + } + + private: + bool awaiting_threads_; + bool threads_done_; + gpr_mu mu_; + gpr_cv cv_; + int count_; +}; + +} // namespace + +void Fork::GlobalInit() { +#ifdef GRPC_ENABLE_FORK_SUPPORT + supportEnabled_ = true; +#else + supportEnabled_ = false; +#endif + bool env_var_set = false; + char* env = gpr_getenv("GRPC_ENABLE_FORK_SUPPORT"); + if (env != nullptr) { + static const char* truthy[] = {"yes", "Yes", "YES", "true", + "True", "TRUE", "1"}; + static const char* falsey[] = {"no", "No", "NO", "false", + "False", "FALSE", "0"}; + for (size_t i = 0; i < GPR_ARRAY_SIZE(truthy); i++) { + if (0 == strcmp(env, truthy[i])) { + supportEnabled_ = true; + env_var_set = true; + break; + } + } + if (!env_var_set) { + for (size_t i = 0; i < GPR_ARRAY_SIZE(falsey); i++) { + if (0 == strcmp(env, falsey[i])) { + supportEnabled_ = false; + env_var_set = true; + break; + } + } + } + gpr_free(env); + } + if (overrideEnabled_ != -1) { + supportEnabled_ = (overrideEnabled_ == 1); + } + if (supportEnabled_) { + execCtxState_ = grpc_core::New(); + threadState_ = grpc_core::New(); + } +} + +void Fork::GlobalShutdown() { + if (supportEnabled_) { + grpc_core::Delete(execCtxState_); + grpc_core::Delete(threadState_); + } +} + +bool Fork::Enabled() { return supportEnabled_; } + +// Testing Only +void Fork::Enable(bool enable) { overrideEnabled_ = enable ? 1 : 0; } + +void Fork::IncExecCtxCount() { + if (supportEnabled_) { + execCtxState_->IncExecCtxCount(); + } +} + +void Fork::DecExecCtxCount() { + if (supportEnabled_) { + execCtxState_->DecExecCtxCount(); + } +} + +bool Fork::BlockExecCtx() { + if (supportEnabled_) { + return execCtxState_->BlockExecCtx(); + } + return false; +} + +void Fork::AllowExecCtx() { execCtxState_->AllowExecCtx(); } + +void Fork::IncThreadCount() { threadState_->IncThreadCount(); } + +void Fork::DecThreadCount() { threadState_->DecThreadCount(); } +void Fork::AwaitThreads() { threadState_->AwaitThreads(); } + +internal::ExecCtxState* Fork::execCtxState_ = nullptr; +internal::ThreadState* Fork::threadState_ = nullptr; +bool Fork::supportEnabled_ = false; +int Fork::overrideEnabled_ = -1; + +} // namespace grpc_core diff --git a/src/core/lib/gprpp/fork.h b/src/core/lib/gprpp/fork.h new file mode 100644 index 0000000000..830bb6b505 --- /dev/null +++ b/src/core/lib/gprpp/fork.h @@ -0,0 +1,79 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_LIB_GPR_FORK_H +#define GRPC_CORE_LIB_GPR_FORK_H + +/* + * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK + * AROUND VERY SPECIFIC USE CASES. + */ + +namespace grpc_core { + +namespace internal { +class ExecCtxState; +class ThreadState; +} // namespace internal + +class Fork { + public: + static void GlobalInit(); + static void GlobalShutdown(); + + // Returns true if fork suppport is enabled, false otherwise + static bool Enabled(); + + // Increment the count of active ExecCtxs. + // Will block until a pending fork is complete if one is in progress. + static void IncExecCtxCount(); + + // Decrement the count of active ExecCtxs + static void DecExecCtxCount(); + + // Check if there is a single active ExecCtx + // (the one used to invoke this function). If there are more, + // return false. Otherwise, return true and block creation of + // more ExecCtx s until AlloWExecCtx() is called + // + static bool BlockExecCtx(); + static void AllowExecCtx(); + + // Increment the count of active threads. + static void IncThreadCount(); + + // Decrement the count of active threads. + static void DecThreadCount(); + + // Await all core threads to be joined. + static void AwaitThreads(); + + // Test only: overrides environment variables/compile flags + // Must be called before grpc_init() + static void Enable(bool enable); + + private: + static internal::ExecCtxState* execCtxState_; + static internal::ThreadState* threadState_; + static bool supportEnabled_; + static int overrideEnabled_; +}; + +} // namespace grpc_core + +#endif /* GRPC_CORE_LIB_GPR_FORK_H */ diff --git a/src/core/lib/gprpp/thd_posix.cc b/src/core/lib/gprpp/thd_posix.cc index 1a20a0bbc3..533c07e7d8 100644 --- a/src/core/lib/gprpp/thd_posix.cc +++ b/src/core/lib/gprpp/thd_posix.cc @@ -32,8 +32,8 @@ #include #include -#include "src/core/lib/gpr/fork.h" #include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/fork.h" #include "src/core/lib/gprpp/memory.h" namespace grpc_core { @@ -63,7 +63,7 @@ class ThreadInternalsPosix info->body = thd_body; info->arg = arg; info->name = thd_name; - grpc_fork_inc_thd_count(); + grpc_core::Fork::IncThreadCount(); GPR_ASSERT(pthread_attr_init(&attr) == 0); GPR_ASSERT(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE) == @@ -98,7 +98,7 @@ class ThreadInternalsPosix gpr_mu_unlock(&arg.thread->mu_); (*arg.body)(arg.arg); - grpc_fork_dec_thd_count(); + grpc_core::Fork::DecThreadCount(); return nullptr; }, info) == 0); @@ -108,7 +108,7 @@ class ThreadInternalsPosix if (!success) { /* don't use gpr_free, as this was allocated using malloc (see above) */ free(info); - grpc_fork_dec_thd_count(); + grpc_core::Fork::DecThreadCount(); } }; diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index b5b59621f9..5eb4faaea3 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -25,8 +25,8 @@ #include #include -#include "src/core/lib/gpr/fork.h" #include "src/core/lib/gpr/tls.h" +#include "src/core/lib/gprpp/fork.h" #include "src/core/lib/iomgr/closure.h" typedef gpr_atm grpc_millis; @@ -78,13 +78,13 @@ class ExecCtx { /** Default Constructor */ ExecCtx() : flags_(GRPC_EXEC_CTX_FLAG_IS_FINISHED) { - grpc_fork_inc_exec_ctx_count(); + grpc_core::Fork::IncExecCtxCount(); Set(this); } /** Parameterised Constructor */ ExecCtx(uintptr_t fl) : flags_(fl) { - grpc_fork_inc_exec_ctx_count(); + grpc_core::Fork::IncExecCtxCount(); Set(this); } @@ -93,7 +93,7 @@ class ExecCtx { flags_ |= GRPC_EXEC_CTX_FLAG_IS_FINISHED; Flush(); Set(last_exec_ctx_); - grpc_fork_dec_exec_ctx_count(); + grpc_core::Fork::DecExecCtxCount(); } /** Disallow copy and assignment operators */ diff --git a/src/core/lib/iomgr/fork_posix.cc b/src/core/lib/iomgr/fork_posix.cc index dd0f9f612f..b37384b8db 100644 --- a/src/core/lib/iomgr/fork_posix.cc +++ b/src/core/lib/iomgr/fork_posix.cc @@ -28,7 +28,7 @@ #include #include "src/core/lib/gpr/env.h" -#include "src/core/lib/gpr/fork.h" +#include "src/core/lib/gprpp/fork.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/executor.h" @@ -52,13 +52,13 @@ void grpc_prefork() { if (!grpc_is_initialized()) { return; } - if (!grpc_fork_support_enabled()) { + if (!grpc_core::Fork::Enabled()) { gpr_log(GPR_ERROR, "Fork support not enabled; try running with the " "environment variable GRPC_ENABLE_FORK_SUPPORT=1"); return; } - if (!grpc_fork_block_exec_ctx()) { + if (!grpc_core::Fork::BlockExecCtx()) { gpr_log(GPR_INFO, "Other threads are currently calling into gRPC, skipping fork() " "handlers"); @@ -67,13 +67,13 @@ void grpc_prefork() { grpc_timer_manager_set_threading(false); grpc_executor_set_threading(false); grpc_core::ExecCtx::Get()->Flush(); - grpc_fork_await_thds(); + grpc_core::Fork::AwaitThreads(); skipped_handler = false; } void grpc_postfork_parent() { if (!skipped_handler) { - grpc_fork_allow_exec_ctx(); + grpc_core::Fork::AllowExecCtx(); grpc_core::ExecCtx exec_ctx; grpc_timer_manager_set_threading(true); grpc_executor_set_threading(true); @@ -82,7 +82,7 @@ void grpc_postfork_parent() { void grpc_postfork_child() { if (!skipped_handler) { - grpc_fork_allow_exec_ctx(); + grpc_core::Fork::AllowExecCtx(); grpc_core::ExecCtx exec_ctx; grpc_timer_manager_set_threading(true); grpc_executor_set_threading(true); @@ -90,7 +90,7 @@ void grpc_postfork_child() { } void grpc_fork_handlers_auto_register() { - if (grpc_fork_support_enabled() & !registered_handlers) { + if (grpc_core::Fork::Enabled() & !registered_handlers) { #ifdef GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK pthread_atfork(grpc_prefork, grpc_postfork_parent, grpc_postfork_child); registered_handlers = true; diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc index 285e6f7ddc..8bbcef467a 100644 --- a/src/core/lib/surface/init.cc +++ b/src/core/lib/surface/init.cc @@ -31,8 +31,7 @@ #include "src/core/lib/channel/handshaker_registry.h" #include "src/core/lib/debug/stats.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gpr/fork.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/lib/gprpp/fork.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/combiner.h" @@ -120,7 +119,7 @@ void grpc_init(void) { gpr_mu_lock(&g_init_mu); if (++g_initializations == 1) { - grpc_fork_support_init(); + grpc_core::Fork::GlobalInit(); grpc_fork_handlers_auto_register(); gpr_time_init(); grpc_stats_init(); @@ -176,7 +175,7 @@ void grpc_shutdown(void) { grpc_handshaker_factory_registry_shutdown(); grpc_slice_intern_shutdown(); grpc_stats_shutdown(); - grpc_fork_support_destroy(); + grpc_core::Fork::GlobalShutdown(); } grpc_core::ExecCtx::GlobalShutdown(); } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index dd3a8f963f..c1654358a3 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -25,7 +25,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/gpr/env_linux.cc', 'src/core/lib/gpr/env_posix.cc', 'src/core/lib/gpr/env_windows.cc', - 'src/core/lib/gpr/fork.cc', 'src/core/lib/gpr/host_port.cc', 'src/core/lib/gpr/log.cc', 'src/core/lib/gpr/log_android.cc', @@ -50,6 +49,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/gpr/tmpfile_posix.cc', 'src/core/lib/gpr/tmpfile_windows.cc', 'src/core/lib/gpr/wrap_memcpy.cc', + 'src/core/lib/gprpp/fork.cc', 'src/core/lib/gprpp/thd_posix.cc', 'src/core/lib/gprpp/thd_windows.cc', 'src/core/lib/profiling/basic_timers.cc', diff --git a/test/core/gpr/fork_test.cc b/test/core/gpr/fork_test.cc deleted file mode 100644 index bc388c4a77..0000000000 --- a/test/core/gpr/fork_test.cc +++ /dev/null @@ -1,136 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "src/core/lib/gpr/fork.h" - -#include "src/core/lib/gprpp/thd.h" -#include "test/core/util/test_config.h" - -static void test_init() { - GPR_ASSERT(!grpc_fork_support_enabled()); - - // Default fork support (disabled) - grpc_fork_support_init(); - GPR_ASSERT(!grpc_fork_support_enabled()); - grpc_fork_support_destroy(); - - // Explicitly disabled fork support - grpc_enable_fork_support(false); - grpc_fork_support_init(); - GPR_ASSERT(!grpc_fork_support_enabled()); - grpc_fork_support_destroy(); - - // Explicitly enabled fork support - grpc_enable_fork_support(true); - grpc_fork_support_init(); - GPR_ASSERT(grpc_fork_support_enabled()); - grpc_fork_support_destroy(); -} - -#define THREAD_DELAY_MS 3000 -#define THREAD_DELAY_EPSILON 500 -#define CONCURRENT_TEST_THREADS 100 - -static void sleeping_thd(void* arg) { - int64_t sleep_ms = (int64_t)arg; - gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_millis(sleep_ms, GPR_TIMESPAN))); -} - -static void test_thd_count() { - // Test no active threads - grpc_enable_fork_support(true); - grpc_fork_support_init(); - grpc_fork_await_thds(); - grpc_fork_support_destroy(); - - grpc_enable_fork_support(true); - grpc_fork_support_init(); - grpc_core::Thread thds[CONCURRENT_TEST_THREADS]; - gpr_timespec est_end_time = - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_millis(THREAD_DELAY_MS, GPR_TIMESPAN)); - gpr_timespec tolerance = - gpr_time_from_millis(THREAD_DELAY_EPSILON, GPR_TIMESPAN); - for (int i = 0; i < CONCURRENT_TEST_THREADS; i++) { - intptr_t sleep_time_ms = - (i * THREAD_DELAY_MS) / (CONCURRENT_TEST_THREADS - 1); - thds[i] = - grpc_core::Thread("grpc_fork_test", sleeping_thd, (void*)sleep_time_ms); - thds[i].Start(); - } - grpc_fork_await_thds(); - gpr_timespec end_time = gpr_now(GPR_CLOCK_REALTIME); - for (auto& thd : thds) { - thd.Join(); - } - GPR_ASSERT(gpr_time_similar(end_time, est_end_time, tolerance)); - grpc_fork_support_destroy(); -} - -static void exec_ctx_thread(void* arg) { - bool* exec_ctx_created = (bool*)arg; - grpc_fork_inc_exec_ctx_count(); - *exec_ctx_created = true; -} - -static void test_exec_count() { - grpc_fork_inc_exec_ctx_count(); - grpc_enable_fork_support(true); - grpc_fork_support_init(); - - grpc_fork_inc_exec_ctx_count(); - GPR_ASSERT(grpc_fork_block_exec_ctx()); - grpc_fork_dec_exec_ctx_count(); - grpc_fork_allow_exec_ctx(); - - grpc_fork_inc_exec_ctx_count(); - grpc_fork_inc_exec_ctx_count(); - GPR_ASSERT(!grpc_fork_block_exec_ctx()); - grpc_fork_dec_exec_ctx_count(); - grpc_fork_dec_exec_ctx_count(); - - grpc_fork_inc_exec_ctx_count(); - GPR_ASSERT(grpc_fork_block_exec_ctx()); - grpc_fork_dec_exec_ctx_count(); - grpc_fork_allow_exec_ctx(); - - // Test that block_exec_ctx() blocks grpc_fork_inc_exec_ctx_count - bool exec_ctx_created = false; - grpc_core::Thread thd = - grpc_core::Thread("grpc_fork_test", exec_ctx_thread, &exec_ctx_created); - grpc_fork_inc_exec_ctx_count(); - GPR_ASSERT(grpc_fork_block_exec_ctx()); - grpc_fork_dec_exec_ctx_count(); - thd.Start(); - gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(1, GPR_TIMESPAN))); - GPR_ASSERT(!exec_ctx_created); - grpc_fork_allow_exec_ctx(); - thd.Join(); // This ensure that the call got un-blocked - grpc_fork_support_destroy(); -} - -int main(int argc, char* argv[]) { - grpc_test_init(argc, argv); - test_init(); - test_thd_count(); - test_exec_count(); - - return 0; -} diff --git a/test/core/gprpp/fork_test.cc b/test/core/gprpp/fork_test.cc new file mode 100644 index 0000000000..c4a8a4e5f5 --- /dev/null +++ b/test/core/gprpp/fork_test.cc @@ -0,0 +1,136 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "src/core/lib/gprpp/fork.h" + +#include "src/core/lib/gprpp/thd.h" +#include "test/core/util/test_config.h" + +static void test_init() { + GPR_ASSERT(!grpc_core::Fork::Enabled()); + + // Default fork support (disabled) + grpc_core::Fork::GlobalInit(); + GPR_ASSERT(!grpc_core::Fork::Enabled()); + grpc_core::Fork::GlobalShutdown(); + + // Explicitly disabled fork support + grpc_core::Fork::Enable(false); + grpc_core::Fork::GlobalInit(); + GPR_ASSERT(!grpc_core::Fork::Enabled()); + grpc_core::Fork::GlobalShutdown(); + + // Explicitly enabled fork support + grpc_core::Fork::Enable(true); + grpc_core::Fork::GlobalInit(); + GPR_ASSERT(grpc_core::Fork::Enabled()); + grpc_core::Fork::GlobalShutdown(); +} + +#define THREAD_DELAY_MS 3000 +#define THREAD_DELAY_EPSILON 500 +#define CONCURRENT_TEST_THREADS 100 + +static void sleeping_thd(void* arg) { + int64_t sleep_ms = (int64_t)arg; + gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_millis(sleep_ms, GPR_TIMESPAN))); +} + +static void test_thd_count() { + // Test no active threads + grpc_core::Fork::Enable(true); + grpc_core::Fork::GlobalInit(); + grpc_core::Fork::AwaitThreads(); + grpc_core::Fork::GlobalShutdown(); + + grpc_core::Fork::Enable(true); + grpc_core::Fork::GlobalInit(); + grpc_core::Thread thds[CONCURRENT_TEST_THREADS]; + gpr_timespec est_end_time = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_millis(THREAD_DELAY_MS, GPR_TIMESPAN)); + gpr_timespec tolerance = + gpr_time_from_millis(THREAD_DELAY_EPSILON, GPR_TIMESPAN); + for (int i = 0; i < CONCURRENT_TEST_THREADS; i++) { + intptr_t sleep_time_ms = + (i * THREAD_DELAY_MS) / (CONCURRENT_TEST_THREADS - 1); + thds[i] = + grpc_core::Thread("grpc_fork_test", sleeping_thd, (void*)sleep_time_ms); + thds[i].Start(); + } + grpc_core::Fork::AwaitThreads(); + gpr_timespec end_time = gpr_now(GPR_CLOCK_REALTIME); + for (auto& thd : thds) { + thd.Join(); + } + GPR_ASSERT(gpr_time_similar(end_time, est_end_time, tolerance)); + grpc_core::Fork::GlobalShutdown(); +} + +static void exec_ctx_thread(void* arg) { + bool* exec_ctx_created = (bool*)arg; + grpc_core::Fork::IncExecCtxCount(); + *exec_ctx_created = true; +} + +static void test_exec_count() { + grpc_core::Fork::IncExecCtxCount(); + grpc_core::Fork::Enable(true); + grpc_core::Fork::GlobalInit(); + + grpc_core::Fork::IncExecCtxCount(); + GPR_ASSERT(grpc_core::Fork::BlockExecCtx()); + grpc_core::Fork::DecExecCtxCount(); + grpc_core::Fork::AllowExecCtx(); + + grpc_core::Fork::IncExecCtxCount(); + grpc_core::Fork::IncExecCtxCount(); + GPR_ASSERT(!grpc_core::Fork::BlockExecCtx()); + grpc_core::Fork::DecExecCtxCount(); + grpc_core::Fork::DecExecCtxCount(); + + grpc_core::Fork::IncExecCtxCount(); + GPR_ASSERT(grpc_core::Fork::BlockExecCtx()); + grpc_core::Fork::DecExecCtxCount(); + grpc_core::Fork::AllowExecCtx(); + + // Test that block_exec_ctx() blocks grpc_core::Fork::IncExecCtxCount + bool exec_ctx_created = false; + grpc_core::Thread thd = + grpc_core::Thread("grpc_fork_test", exec_ctx_thread, &exec_ctx_created); + grpc_core::Fork::IncExecCtxCount(); + GPR_ASSERT(grpc_core::Fork::BlockExecCtx()); + grpc_core::Fork::DecExecCtxCount(); + thd.Start(); + gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(1, GPR_TIMESPAN))); + GPR_ASSERT(!exec_ctx_created); + grpc_core::Fork::AllowExecCtx(); + thd.Join(); // This ensure that the call got un-blocked + grpc_core::Fork::GlobalShutdown(); +} + +int main(int argc, char* argv[]) { + grpc_test_init(argc, argv); + test_init(); + test_thd_count(); + test_exec_count(); + + return 0; +} diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index ff5abc679d..095c3c3dcb 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1023,7 +1023,6 @@ src/core/lib/debug/stats_data.h \ src/core/lib/debug/trace.h \ src/core/lib/gpr/arena.h \ src/core/lib/gpr/env.h \ -src/core/lib/gpr/fork.h \ src/core/lib/gpr/host_port.h \ src/core/lib/gpr/mpscq.h \ src/core/lib/gpr/murmur_hash.h \ @@ -1042,6 +1041,7 @@ src/core/lib/gprpp/atomic.h \ src/core/lib/gprpp/atomic_with_atm.h \ src/core/lib/gprpp/atomic_with_std.h \ src/core/lib/gprpp/debug_location.h \ +src/core/lib/gprpp/fork.h \ src/core/lib/gprpp/inlined_vector.h \ src/core/lib/gprpp/manual_constructor.h \ src/core/lib/gprpp/memory.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e7e9e04979..688ec34abf 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1074,8 +1074,6 @@ src/core/lib/gpr/env.h \ src/core/lib/gpr/env_linux.cc \ src/core/lib/gpr/env_posix.cc \ src/core/lib/gpr/env_windows.cc \ -src/core/lib/gpr/fork.cc \ -src/core/lib/gpr/fork.h \ src/core/lib/gpr/host_port.cc \ src/core/lib/gpr/host_port.h \ src/core/lib/gpr/log.cc \ @@ -1119,6 +1117,8 @@ src/core/lib/gprpp/atomic.h \ src/core/lib/gprpp/atomic_with_atm.h \ src/core/lib/gprpp/atomic_with_std.h \ src/core/lib/gprpp/debug_location.h \ +src/core/lib/gprpp/fork.cc \ +src/core/lib/gprpp/fork.h \ src/core/lib/gprpp/inlined_vector.h \ src/core/lib/gprpp/manual_constructor.h \ src/core/lib/gprpp/memory.h \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 0ddecffa5f..f609f8de7c 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -612,7 +612,7 @@ "language": "c", "name": "fork_test", "src": [ - "test/core/gpr/fork_test.cc" + "test/core/gprpp/fork_test.cc" ], "third_party": false, "type": "target" @@ -8779,7 +8779,6 @@ "src/core/lib/gpr/env_linux.cc", "src/core/lib/gpr/env_posix.cc", "src/core/lib/gpr/env_windows.cc", - "src/core/lib/gpr/fork.cc", "src/core/lib/gpr/host_port.cc", "src/core/lib/gpr/log.cc", "src/core/lib/gpr/log_android.cc", @@ -8804,6 +8803,7 @@ "src/core/lib/gpr/tmpfile_posix.cc", "src/core/lib/gpr/tmpfile_windows.cc", "src/core/lib/gpr/wrap_memcpy.cc", + "src/core/lib/gprpp/fork.cc", "src/core/lib/gprpp/thd_posix.cc", "src/core/lib/gprpp/thd_windows.cc", "src/core/lib/profiling/basic_timers.cc", @@ -8836,7 +8836,6 @@ "include/grpc/support/time.h", "src/core/lib/gpr/arena.h", "src/core/lib/gpr/env.h", - "src/core/lib/gpr/fork.h", "src/core/lib/gpr/host_port.h", "src/core/lib/gpr/mpscq.h", "src/core/lib/gpr/murmur_hash.h", @@ -8854,6 +8853,7 @@ "src/core/lib/gprpp/atomic.h", "src/core/lib/gprpp/atomic_with_atm.h", "src/core/lib/gprpp/atomic_with_std.h", + "src/core/lib/gprpp/fork.h", "src/core/lib/gprpp/manual_constructor.h", "src/core/lib/gprpp/memory.h", "src/core/lib/gprpp/thd.h", @@ -8882,7 +8882,6 @@ "include/grpc/support/time.h", "src/core/lib/gpr/arena.h", "src/core/lib/gpr/env.h", - "src/core/lib/gpr/fork.h", "src/core/lib/gpr/host_port.h", "src/core/lib/gpr/mpscq.h", "src/core/lib/gpr/murmur_hash.h", @@ -8900,6 +8899,7 @@ "src/core/lib/gprpp/atomic.h", "src/core/lib/gprpp/atomic_with_atm.h", "src/core/lib/gprpp/atomic_with_std.h", + "src/core/lib/gprpp/fork.h", "src/core/lib/gprpp/manual_constructor.h", "src/core/lib/gprpp/memory.h", "src/core/lib/gprpp/thd.h", -- cgit v1.2.3 From a0aab7ebcc4e3af28f9dde745bf1800094b085a7 Mon Sep 17 00:00:00 2001 From: Juanli Shen Date: Tue, 1 May 2018 10:30:54 -0700 Subject: Add load data store --- BUILD | 14 + CMakeLists.txt | 84 ++++ Makefile | 102 ++++- build.yaml | 23 + grpc.gyp | 10 + src/cpp/server/load_reporter/load_data_store.cc | 273 ++++++++++++ src/cpp/server/load_reporter/load_data_store.h | 339 +++++++++++++++ test/cpp/server/load_reporter/BUILD | 31 ++ .../server/load_reporter/load_data_store_test.cc | 481 +++++++++++++++++++++ tools/run_tests/generated/sources_and_headers.json | 37 ++ tools/run_tests/generated/tests.json | 24 + 11 files changed, 1416 insertions(+), 2 deletions(-) create mode 100644 src/cpp/server/load_reporter/load_data_store.cc create mode 100644 src/cpp/server/load_reporter/load_data_store.h create mode 100644 test/cpp/server/load_reporter/BUILD create mode 100644 test/cpp/server/load_reporter/load_data_store_test.cc (limited to 'grpc.gyp') diff --git a/BUILD b/BUILD index e04d0df1a2..f899632a1b 100644 --- a/BUILD +++ b/BUILD @@ -1285,6 +1285,20 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "lb_load_data_store", + srcs = [ + "src/cpp/server/load_reporter/load_data_store.cc", + ], + hdrs = [ + "src/cpp/server/load_reporter/load_data_store.h", + ], + language = "c++", + deps = [ + "grpc++", + ], +) + grpc_cc_library( name = "grpc_resolver_dns_native", srcs = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e0a93aff6..d638dbfc6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -584,6 +584,7 @@ endif() if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx json_run_localhost) endif() +add_dependencies(buildtests_cxx lb_load_data_store_test) add_dependencies(buildtests_cxx memory_test) add_dependencies(buildtests_cxx metrics_client) add_dependencies(buildtests_cxx mock_test) @@ -4972,6 +4973,49 @@ target_link_libraries(interop_server_main ) +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + +add_library(lb_load_data_store + src/cpp/server/load_reporter/load_data_store.cc +) + +if(WIN32 AND MSVC) + set_target_properties(lb_load_data_store PROPERTIES COMPILE_PDB_NAME "lb_load_data_store" + COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) + if (gRPC_INSTALL) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lb_load_data_store.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL + ) + endif() +endif() + + +target_include_directories(lb_load_data_store + PUBLIC $ $ + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE third_party/googletest/googletest/include + PRIVATE third_party/googletest/googletest + PRIVATE third_party/googletest/googlemock/include + PRIVATE third_party/googletest/googlemock + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(lb_load_data_store + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc++ +) + + endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -12271,6 +12315,46 @@ endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) +add_executable(lb_load_data_store_test + test/cpp/server/load_reporter/load_data_store_test.cc + third_party/googletest/googletest/src/gtest-all.cc + third_party/googletest/googlemock/src/gmock-all.cc +) + + +target_include_directories(lb_load_data_store_test + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE third_party/googletest/googletest/include + PRIVATE third_party/googletest/googletest + PRIVATE third_party/googletest/googlemock/include + PRIVATE third_party/googletest/googlemock + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(lb_load_data_store_test + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + lb_load_data_store + grpc++_test_util + grpc_test_util + grpc++ + grpc + gpr_test_util + gpr + ${_gRPC_GFLAGS_LIBRARIES} +) + +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + add_executable(memory_test test/core/gprpp/memory_test.cc third_party/googletest/googletest/src/gtest-all.cc diff --git a/Makefile b/Makefile index c646826339..4e9b7c4dea 100644 --- a/Makefile +++ b/Makefile @@ -1178,6 +1178,7 @@ interop_client: $(BINDIR)/$(CONFIG)/interop_client interop_server: $(BINDIR)/$(CONFIG)/interop_server interop_test: $(BINDIR)/$(CONFIG)/interop_test json_run_localhost: $(BINDIR)/$(CONFIG)/json_run_localhost +lb_load_data_store_test: $(BINDIR)/$(CONFIG)/lb_load_data_store_test memory_test: $(BINDIR)/$(CONFIG)/memory_test metrics_client: $(BINDIR)/$(CONFIG)/metrics_client mock_test: $(BINDIR)/$(CONFIG)/mock_test @@ -1390,9 +1391,9 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc ifeq ($(EMBED_OPENSSL),true) -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_crypto_test_data_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_buf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_chacha_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_compiler_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_constant_time_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_spake25519_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_dsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdh_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_scrypt_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_p256-x86_64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ctrdrbg_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_lhash_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_obj_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs7_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_pool_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_refcount_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_file_test_gtest_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_gtest_main_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_thread_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_tab_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_v3name_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_span_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a $(LIBDIR)/$(CONFIG)/libbenchmark.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/liblb_load_data_store.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_crypto_test_data_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_buf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_chacha_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_compiler_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_constant_time_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_spake25519_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_dsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdh_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_scrypt_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_p256-x86_64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ctrdrbg_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_lhash_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_obj_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs7_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_pool_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_refcount_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_file_test_gtest_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_gtest_main_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_thread_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_tab_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_v3name_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_span_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a $(LIBDIR)/$(CONFIG)/libbenchmark.a else -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libbenchmark.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_core_stats.a $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/liblb_load_data_store.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libbenchmark.a endif @@ -1660,6 +1661,7 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/interop_server \ $(BINDIR)/$(CONFIG)/interop_test \ $(BINDIR)/$(CONFIG)/json_run_localhost \ + $(BINDIR)/$(CONFIG)/lb_load_data_store_test \ $(BINDIR)/$(CONFIG)/memory_test \ $(BINDIR)/$(CONFIG)/metrics_client \ $(BINDIR)/$(CONFIG)/mock_test \ @@ -1831,6 +1833,7 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/interop_server \ $(BINDIR)/$(CONFIG)/interop_test \ $(BINDIR)/$(CONFIG)/json_run_localhost \ + $(BINDIR)/$(CONFIG)/lb_load_data_store_test \ $(BINDIR)/$(CONFIG)/memory_test \ $(BINDIR)/$(CONFIG)/metrics_client \ $(BINDIR)/$(CONFIG)/mock_test \ @@ -2283,6 +2286,8 @@ test_cxx: buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/inproc_sync_unary_ping_pong_test || ( echo test inproc_sync_unary_ping_pong_test failed ; exit 1 ) $(E) "[RUN] Testing interop_test" $(Q) $(BINDIR)/$(CONFIG)/interop_test || ( echo test interop_test failed ; exit 1 ) + $(E) "[RUN] Testing lb_load_data_store_test" + $(Q) $(BINDIR)/$(CONFIG)/lb_load_data_store_test || ( echo test lb_load_data_store_test failed ; exit 1 ) $(E) "[RUN] Testing memory_test" $(Q) $(BINDIR)/$(CONFIG)/memory_test || ( echo test memory_test failed ; exit 1 ) $(E) "[RUN] Testing mock_test" @@ -7207,6 +7212,55 @@ endif endif +LIBLB_LOAD_DATA_STORE_SRC = \ + src/cpp/server/load_reporter/load_data_store.cc \ + +PUBLIC_HEADERS_CXX += \ + +LIBLB_LOAD_DATA_STORE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBLB_LOAD_DATA_STORE_SRC)))) + + +ifeq ($(NO_SECURE),true) + +# You can't build secure libraries if you don't have OpenSSL. + +$(LIBDIR)/$(CONFIG)/liblb_load_data_store.a: openssl_dep_error + + +else + +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)/liblb_load_data_store.a: protobuf_dep_error + + +else + +$(LIBDIR)/$(CONFIG)/liblb_load_data_store.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(PROTOBUF_DEP) $(LIBLB_LOAD_DATA_STORE_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/liblb_load_data_store.a + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/liblb_load_data_store.a $(LIBLB_LOAD_DATA_STORE_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/liblb_load_data_store.a +endif + + + + +endif + +endif + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LIBLB_LOAD_DATA_STORE_OBJS:.o=.dep) +endif +endif + + LIBQPS_SRC = \ $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \ @@ -18027,6 +18081,49 @@ endif endif +LB_LOAD_DATA_STORE_TEST_SRC = \ + test/cpp/server/load_reporter/load_data_store_test.cc \ + +LB_LOAD_DATA_STORE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LB_LOAD_DATA_STORE_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/lb_load_data_store_test: 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.5.0+. + +$(BINDIR)/$(CONFIG)/lb_load_data_store_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/lb_load_data_store_test: $(PROTOBUF_DEP) $(LB_LOAD_DATA_STORE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/liblb_load_data_store.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 + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(LB_LOAD_DATA_STORE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/liblb_load_data_store.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 $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/lb_load_data_store_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/server/load_reporter/load_data_store_test.o: $(LIBDIR)/$(CONFIG)/liblb_load_data_store.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 + +deps_lb_load_data_store_test: $(LB_LOAD_DATA_STORE_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LB_LOAD_DATA_STORE_TEST_OBJS:.o=.dep) +endif +endif + + MEMORY_TEST_SRC = \ test/core/gprpp/memory_test.cc \ @@ -23895,6 +23992,7 @@ src/cpp/common/secure_channel_arguments.cc: $(OPENSSL_DEP) src/cpp/common/secure_create_auth_context.cc: $(OPENSSL_DEP) src/cpp/ext/proto_server_reflection.cc: $(OPENSSL_DEP) src/cpp/ext/proto_server_reflection_plugin.cc: $(OPENSSL_DEP) +src/cpp/server/load_reporter/load_data_store.cc: $(OPENSSL_DEP) src/cpp/server/secure_server_credentials.cc: $(OPENSSL_DEP) src/cpp/util/core_stats.cc: $(OPENSSL_DEP) src/cpp/util/error_details.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 374d5a0324..5f356174ca 100644 --- a/build.yaml +++ b/build.yaml @@ -1890,6 +1890,15 @@ libs: - test/cpp/interop/interop_server_bootstrap.cc deps: - interop_server_lib +- name: lb_load_data_store + build: private + language: c++ + headers: + - src/cpp/server/load_reporter/load_data_store.h + src: + - src/cpp/server/load_reporter/load_data_store.cc + deps: + - grpc++ - name: qps build: private language: c++ @@ -4766,6 +4775,20 @@ targets: - mac - linux - posix +- name: lb_load_data_store_test + gtest: true + build: test + language: c++ + src: + - test/cpp/server/load_reporter/load_data_store_test.cc + deps: + - lb_load_data_store + - grpc++_test_util + - grpc_test_util + - grpc++ + - grpc + - gpr_test_util + - gpr - name: memory_test gtest: true build: test diff --git a/grpc.gyp b/grpc.gyp index b36b166175..c5e10edf7f 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -1637,6 +1637,16 @@ 'test/cpp/interop/interop_server_bootstrap.cc', ], }, + { + 'target_name': 'lb_load_data_store', + 'type': 'static_library', + 'dependencies': [ + 'grpc++', + ], + 'sources': [ + 'src/cpp/server/load_reporter/load_data_store.cc', + ], + }, { 'target_name': 'qps', 'type': 'static_library', diff --git a/src/cpp/server/load_reporter/load_data_store.cc b/src/cpp/server/load_reporter/load_data_store.cc new file mode 100644 index 0000000000..70f12c1102 --- /dev/null +++ b/src/cpp/server/load_reporter/load_data_store.cc @@ -0,0 +1,273 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include + +#include "src/cpp/server/load_reporter/load_data_store.h" + +namespace grpc { +namespace load_reporter { + +// Some helper functions. +namespace { + +// Given a map from type K to a set of value type V, finds the set associated +// with the given key and erases the value from the set. If the set becomes +// empty, also erases the key-set pair. Returns true if the value is erased +// successfully. +template +bool UnorderedMapOfSetEraseKeyValue(std::unordered_map>& map, + const K& key, const V& value) { + auto it = map.find(key); + if (it != map.end()) { + size_t erased = it->second.erase(value); + if (it->second.size() == 0) { + map.erase(it); + } + return erased; + } + return false; +}; + +// Given a map from type K to a set of value type V, removes the given key and +// the associated set, and returns the set. Returns an empty set if the key is +// not found. +template +std::set UnorderedMapOfSetExtract(std::unordered_map>& map, + const K& key) { + auto it = map.find(key); + if (it != map.end()) { + auto set = std::move(it->second); + map.erase(it); + return set; + } + return {}; +}; + +// From a non-empty container, returns a pointer to a random element. +template +const typename C::value_type* RandomElement(const C& container) { + GPR_ASSERT(!container.empty()); + auto it = container.begin(); + std::advance(it, std::rand() % container.size()); + return &(*it); +} + +} // namespace + +void PerBalancerStore::MergeRow(const LoadRecordKey& key, + const LoadRecordValue& value) { + // During suspension, the load data received will be dropped. + if (!suspended_) { + load_record_map_[key].MergeFrom(value); + gpr_log(GPR_DEBUG, + "[PerBalancerStore %p] Load data merged (Key: %s, Value: %s).", + this, key.ToString().c_str(), value.ToString().c_str()); + } else { + gpr_log(GPR_DEBUG, + "[PerBalancerStore %p] Load data dropped (Key: %s, Value: %s).", + this, key.ToString().c_str(), value.ToString().c_str()); + } + // We always keep track of num_calls_in_progress_, so that when this + // store is resumed, we still have a correct value of + // num_calls_in_progress_. + GPR_ASSERT(static_cast(num_calls_in_progress_) + + value.GetNumCallsInProgressDelta() >= + 0); + num_calls_in_progress_ += value.GetNumCallsInProgressDelta(); +} + +void PerBalancerStore::Suspend() { + suspended_ = true; + load_record_map_.clear(); + gpr_log(GPR_DEBUG, "[PerBalancerStore %p] Suspended.", this); +} + +void PerBalancerStore::Resume() { + suspended_ = false; + gpr_log(GPR_DEBUG, "[PerBalancerStore %p] Resumed.", this); +} + +uint64_t PerBalancerStore::GetNumCallsInProgressForReport() { + GPR_ASSERT(!suspended_); + last_reported_num_calls_in_progress_ = num_calls_in_progress_; + return num_calls_in_progress_; +} + +void PerHostStore::ReportStreamCreated(const grpc::string& lb_id, + const grpc::string& load_key) { + GPR_ASSERT(lb_id != kInvalidLbId); + SetUpForNewLbId(lb_id, load_key); + // Prior to this one, there was no load balancer receiving report, so we may + // have unassigned orphaned stores to assign to this new balancer. + // TODO(juanlishen): If the load key of this new stream is the same with + // some previously adopted orphan store, we may want to take the orphan to + // this stream. Need to discuss with LB team. + if (assigned_stores_.size() == 1) { + for (const auto& p : per_balancer_stores_) { + const grpc::string& other_lb_id = p.first; + const std::unique_ptr& orphaned_store = p.second; + if (other_lb_id != lb_id) { + orphaned_store->Resume(); + AssignOrphanedStore(orphaned_store.get(), lb_id); + } + } + } + // The first connected balancer will adopt the kInvalidLbId. + if (per_balancer_stores_.size() == 1) { + SetUpForNewLbId(kInvalidLbId, ""); + ReportStreamClosed(kInvalidLbId); + } +} + +void PerHostStore::ReportStreamClosed(const grpc::string& lb_id) { + auto it_store_for_gone_lb = per_balancer_stores_.find(lb_id); + GPR_ASSERT(it_store_for_gone_lb != per_balancer_stores_.end()); + // Remove this closed stream from our records. + GPR_ASSERT(UnorderedMapOfSetEraseKeyValue( + load_key_to_receiving_lb_ids_, it_store_for_gone_lb->second->load_key(), + lb_id)); + std::set orphaned_stores = + UnorderedMapOfSetExtract(assigned_stores_, lb_id); + // The stores that were assigned to this balancer are orphaned now. They + // should be re-assigned to other balancers which are still receiving reports. + for (PerBalancerStore* orphaned_store : orphaned_stores) { + const grpc::string* new_receiver = nullptr; + auto it = load_key_to_receiving_lb_ids_.find(orphaned_store->load_key()); + if (it != load_key_to_receiving_lb_ids_.end()) { + // First, try to pick from the active balancers with the same load key. + new_receiver = RandomElement(it->second); + } else if (!assigned_stores_.empty()) { + // If failed, pick from all the remaining active balancers. + new_receiver = &(RandomElement(assigned_stores_)->first); + } + if (new_receiver != nullptr) { + AssignOrphanedStore(orphaned_store, *new_receiver); + } else { + // Load data for an LB ID that can't be assigned to any stream should + // be dropped. + orphaned_store->Suspend(); + } + } +} + +PerBalancerStore* PerHostStore::FindPerBalancerStore( + const grpc::string& lb_id) const { + return per_balancer_stores_.find(lb_id) != per_balancer_stores_.end() + ? per_balancer_stores_.find(lb_id)->second.get() + : nullptr; +} + +const std::set* PerHostStore::GetAssignedStores( + const grpc::string& lb_id) const { + auto it = assigned_stores_.find(lb_id); + if (it == assigned_stores_.end()) return nullptr; + return &(it->second); +} + +void PerHostStore::AssignOrphanedStore(PerBalancerStore* orphaned_store, + const grpc::string& new_receiver) { + auto it = assigned_stores_.find(new_receiver); + GPR_ASSERT(it != assigned_stores_.end()); + it->second.insert(orphaned_store); + gpr_log(GPR_INFO, + "[PerHostStore %p] Re-assigned orphaned store (%p) with original LB" + " ID of %s to new receiver %s", + this, orphaned_store, orphaned_store->lb_id().c_str(), + new_receiver.c_str()); +} + +void PerHostStore::SetUpForNewLbId(const grpc::string& lb_id, + const grpc::string& load_key) { + // The top-level caller (i.e., LoadReportService) should guarantee the + // lb_id is unique for each reporting stream. + GPR_ASSERT(per_balancer_stores_.find(lb_id) == per_balancer_stores_.end()); + GPR_ASSERT(assigned_stores_.find(lb_id) == assigned_stores_.end()); + load_key_to_receiving_lb_ids_[load_key].insert(lb_id); + std::unique_ptr per_balancer_store( + new PerBalancerStore(lb_id, load_key)); + assigned_stores_[lb_id] = {per_balancer_store.get()}; + per_balancer_stores_[lb_id] = std::move(per_balancer_store); +} + +PerBalancerStore* LoadDataStore::FindPerBalancerStore( + const string& hostname, const string& lb_id) const { + auto it = per_host_stores_.find(hostname); + if (it != per_host_stores_.end()) { + const PerHostStore& per_host_store = it->second; + return per_host_store.FindPerBalancerStore(lb_id); + } else { + return nullptr; + } +} + +void LoadDataStore::MergeRow(const grpc::string& hostname, + const LoadRecordKey& key, + const LoadRecordValue& value) { + PerBalancerStore* per_balancer_store = + FindPerBalancerStore(hostname, key.lb_id()); + if (per_balancer_store != nullptr) { + per_balancer_store->MergeRow(key, value); + return; + } + // Unknown LB ID. Track it until its number of in-progress calls drops to + // zero. + int64_t in_progress_delta = value.GetNumCallsInProgressDelta(); + if (in_progress_delta != 0) { + auto it_tracker = unknown_balancer_id_trackers_.find(key.lb_id()); + if (it_tracker == unknown_balancer_id_trackers_.end()) { + gpr_log( + GPR_DEBUG, + "[LoadDataStore %p] Start tracking unknown balancer (lb_id_: %s).", + this, key.lb_id().c_str()); + unknown_balancer_id_trackers_.insert( + {key.lb_id(), static_cast(in_progress_delta)}); + } else if ((it_tracker->second += in_progress_delta) == 0) { + unknown_balancer_id_trackers_.erase(it_tracker); + gpr_log(GPR_DEBUG, + "[LoadDataStore %p] Stop tracking unknown balancer (lb_id_: %s).", + this, key.lb_id().c_str()); + } + } +} + +const std::set* LoadDataStore::GetAssignedStores( + const grpc::string& hostname, const grpc::string& lb_id) { + auto it = per_host_stores_.find(hostname); + if (it == per_host_stores_.end()) return nullptr; + return it->second.GetAssignedStores(lb_id); +} + +void LoadDataStore::ReportStreamCreated(const grpc::string& hostname, + const grpc::string& lb_id, + const grpc::string& load_key) { + per_host_stores_[hostname].ReportStreamCreated(lb_id, load_key); +} + +void LoadDataStore::ReportStreamClosed(const grpc::string& hostname, + const grpc::string& lb_id) { + auto it_per_host_store = per_host_stores_.find(hostname); + GPR_ASSERT(it_per_host_store != per_host_stores_.end()); + it_per_host_store->second.ReportStreamClosed(lb_id); +} + +} // namespace load_reporter +} // namespace grpc diff --git a/src/cpp/server/load_reporter/load_data_store.h b/src/cpp/server/load_reporter/load_data_store.h new file mode 100644 index 0000000000..feb8b2fd59 --- /dev/null +++ b/src/cpp/server/load_reporter/load_data_store.h @@ -0,0 +1,339 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H +#define GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H + +#include + +#include +#include +#include + +#include +#include + +namespace grpc { +namespace load_reporter { + +constexpr char kInvalidLbId[] = ""; +constexpr uint8_t kLbIdLen = 8; + +// The load data storage is organized in hierarchy. The LoadDataStore is the +// top-level data store. In LoadDataStore, for each host we keep a +// PerHostStore, in which for each balancer we keep a PerBalancerStore. Each +// PerBalancerStore maintains a map of load records, mapping from LoadRecordKey +// to LoadRecordValue. The LoadRecordValue contains a map of customized call +// metrics, mapping from a call metric name to the CallMetricValue. + +// The value of a customized call metric. +class CallMetricValue { + public: + explicit CallMetricValue(uint64_t num_calls = 0, + double total_metric_value = 0) + : num_calls_(num_calls), total_metric_value_(total_metric_value) {} + + void MergeFrom(CallMetricValue other) { + num_calls_ += other.num_calls_; + total_metric_value_ += other.total_metric_value_; + } + + // Getters. + uint64_t num_calls() const { return num_calls_; } + double total_metric_value() const { return total_metric_value_; } + + private: + // The number of calls that finished with this metric. + uint64_t num_calls_ = 0; + // The sum of metric values across all the calls that finished with this + // metric. + double total_metric_value_ = 0; +}; + +// The key of a load record. +class LoadRecordKey { + public: + explicit LoadRecordKey(grpc::string lb_id, grpc::string lb_tag, + grpc::string user_id, grpc::string client_ip_hex) + : lb_id_(std::move(lb_id)), + lb_tag_(std::move(lb_tag)), + user_id_(std::move(user_id)), + client_ip_hex_(std::move(client_ip_hex)) {} + + grpc::string ToString() const { + return "[lb_id_=" + lb_id_ + ", lb_tag_=" + lb_tag_ + + ", user_id_=" + user_id_ + ", client_ip_hex_=" + client_ip_hex_ + + "]"; + } + + bool operator==(const LoadRecordKey& other) const { + return lb_id_ == other.lb_id_ && lb_tag_ == other.lb_tag_ && + user_id_ == other.user_id_ && client_ip_hex_ == other.client_ip_hex_; + } + + // Getters. + const grpc::string& lb_id() const { return lb_id_; } + const grpc::string& lb_tag() const { return lb_tag_; } + const grpc::string& user_id() const { return user_id_; } + const grpc::string& client_ip_hex() const { return client_ip_hex_; } + + struct Hasher { + void hash_combine(size_t* seed, const grpc::string& k) const { + *seed ^= std::hash()(k) + 0x9e3779b9 + (*seed << 6) + + (*seed >> 2); + } + + size_t operator()(const LoadRecordKey& k) const { + size_t h = 0; + hash_combine(&h, k.lb_id_); + hash_combine(&h, k.lb_tag_); + hash_combine(&h, k.user_id_); + hash_combine(&h, k.client_ip_hex_); + return h; + } + }; + + private: + grpc::string lb_id_; + grpc::string lb_tag_; + grpc::string user_id_; + grpc::string client_ip_hex_; +}; + +// The value of a load record. +class LoadRecordValue { + public: + explicit LoadRecordValue(uint64_t start_count = 0, uint64_t ok_count = 0, + uint64_t error_count = 0, double bytes_sent = 0, + double bytes_recv = 0, double latency_ms = 0) + : start_count_(start_count), + ok_count_(ok_count), + error_count_(error_count), + bytes_sent_(bytes_sent), + bytes_recv_(bytes_recv), + latency_ms_(latency_ms) {} + + void MergeFrom(const LoadRecordValue& other) { + start_count_ += other.start_count_; + ok_count_ += other.ok_count_; + error_count_ += other.error_count_; + bytes_sent_ += other.bytes_sent_; + bytes_recv_ += other.bytes_recv_; + latency_ms_ += other.latency_ms_; + for (const auto& p : other.call_metrics_) { + const grpc::string& key = p.first; + const CallMetricValue& value = p.second; + call_metrics_[key].MergeFrom(value); + } + } + + int64_t GetNumCallsInProgressDelta() const { + return static_cast(start_count_ - ok_count_ - error_count_); + } + + grpc::string ToString() const { + return "[start_count_=" + grpc::to_string(start_count_) + + ", ok_count_=" + grpc::to_string(ok_count_) + + ", error_count_=" + grpc::to_string(error_count_) + + ", bytes_sent_=" + grpc::to_string(bytes_sent_) + + ", bytes_recv_=" + grpc::to_string(bytes_recv_) + + ", latency_ms_=" + grpc::to_string(latency_ms_) + "]"; + } + + bool InsertCallMetric(const grpc::string& metric_name, + const CallMetricValue& metric_value) { + return call_metrics_.insert({metric_name, metric_value}).second; + } + + // Getters. + uint64_t start_count() const { return start_count_; } + uint64_t ok_count() const { return ok_count_; } + uint64_t error_count() const { return error_count_; } + double bytes_sent() const { return bytes_sent_; } + double bytes_recv() const { return bytes_recv_; } + double latency_ms() const { return latency_ms_; } + const std::unordered_map& call_metrics() + const { + return call_metrics_; + } + + private: + uint64_t start_count_ = 0; + uint64_t ok_count_ = 0; + uint64_t error_count_ = 0; + double bytes_sent_ = 0; + double bytes_recv_ = 0; + double latency_ms_ = 0; + std::unordered_map call_metrics_; +}; + +// Stores the data associated with a particular LB ID. +class PerBalancerStore { + public: + using LoadRecordMap = + std::unordered_map; + + PerBalancerStore(grpc::string lb_id, grpc::string load_key) + : lb_id_(std::move(lb_id)), load_key_(std::move(load_key)) {} + + // Merge a load record with the given key and value if the store is not + // suspended. + void MergeRow(const LoadRecordKey& key, const LoadRecordValue& value); + + // Suspend this store, so that no detailed load data will be recorded. + void Suspend(); + // Resume this store from suspension. + void Resume(); + // Is this store suspended or not? + bool IsSuspended() const { return suspended_; } + + bool IsNumCallsInProgressChangedSinceLastReport() const { + return num_calls_in_progress_ != last_reported_num_calls_in_progress_; + } + + uint64_t GetNumCallsInProgressForReport(); + + grpc::string ToString() { + return "[PerBalancerStore lb_id_=" + lb_id_ + " load_key_=" + load_key_ + + "]"; + } + + void ClearLoadRecordMap() { load_record_map_.clear(); } + + // Getters. + const grpc::string& lb_id() const { return lb_id_; } + const grpc::string& load_key() const { return load_key_; } + const LoadRecordMap& load_record_map() const { return load_record_map_; } + + private: + grpc::string lb_id_; + // TODO(juanlishen): Use bytestring protobuf type? + grpc::string load_key_; + LoadRecordMap load_record_map_; + uint64_t num_calls_in_progress_ = 0; + uint64_t last_reported_num_calls_in_progress_ = 0; + bool suspended_ = false; +}; + +// Stores the data associated with a particular host. +class PerHostStore { + public: + // When a report stream is created, a PerBalancerStore is created for the + // LB ID (guaranteed unique) associated with that stream. If it is the only + // active store, adopt all the orphaned stores. If it is the first created + // store, adopt the store of kInvalidLbId. + void ReportStreamCreated(const grpc::string& lb_id, + const grpc::string& load_key); + + // When a report stream is closed, the PerBalancerStores assigned to the + // associate LB ID need to be re-assigned to other active balancers, + // ideally with the same load key. If there is no active balancer, we have + // to suspend those stores and drop the incoming load data until they are + // resumed. + void ReportStreamClosed(const grpc::string& lb_id); + + // Returns null if not found. Caller doesn't own the returned store. + PerBalancerStore* FindPerBalancerStore(const grpc::string& lb_id) const; + + // Returns null if lb_id is not found. The returned pointer points to the + // underlying data structure, which is not owned by the caller. + const std::set* GetAssignedStores( + const grpc::string& lb_id) const; + + private: + // Creates a PerBalancerStore for the given LB ID, assigns the store to + // itself, and records the LB ID to the load key. + void SetUpForNewLbId(const grpc::string& lb_id, const grpc::string& load_key); + + void AssignOrphanedStore(PerBalancerStore* orphaned_store, + const grpc::string& new_receiver); + + std::unordered_map> + load_key_to_receiving_lb_ids_; + + // Key: LB ID. The key set includes all the LB IDs that have been + // allocated for reporting streams so far. + // Value: the unique pointer to the PerBalancerStore of the LB ID. + std::unordered_map> + per_balancer_stores_; + + // Key: LB ID. The key set includes the LB IDs of the balancers that are + // currently receiving report. + // Value: the set of raw pointers to the PerBalancerStores assigned to the LB + // ID. Note that the sets in assigned_stores_ form a division of the value set + // of per_balancer_stores_. + std::unordered_map> + assigned_stores_; +}; + +// Thread-unsafe two-level bookkeeper of all the load data. +// Note: We never remove any store objects from this class, as per the +// current spec. That's because premature removal of the store objects +// may lead to loss of critical information, e.g., mapping from lb_id to +// load_key, and the number of in-progress calls. Such loss will cause +// information inconsistency when the balancer is re-connected. Keeping +// all the stores should be fine for PerHostStore, since we assume there +// should only be a few hostnames. But it's a potential problem for +// PerBalancerStore. +class LoadDataStore { + public: + // Returns null if not found. Caller doesn't own the returned store. + PerBalancerStore* FindPerBalancerStore(const grpc::string& hostname, + const grpc::string& lb_id) const; + + // Returns null if hostname or lb_id is not found. The returned pointer points + // to the underlying data structure, which is not owned by the caller. + const std::set* GetAssignedStores(const string& hostname, + const string& lb_id); + + // If a PerBalancerStore can be found by the hostname and LB ID in + // LoadRecordKey, the load data will be merged to that store. Otherwise, + // only track the number of the in-progress calls for this unknown LB ID. + void MergeRow(const grpc::string& hostname, const LoadRecordKey& key, + const LoadRecordValue& value); + + // Is the given lb_id a tracked unknown LB ID (i.e., the LB ID was associated + // with some received load data but unknown to this load data store)? + bool IsTrackedUnknownBalancerId(const grpc::string& lb_id) const { + return unknown_balancer_id_trackers_.find(lb_id) != + unknown_balancer_id_trackers_.end(); + } + + // Wrapper around PerHostStore::ReportStreamCreated. + void ReportStreamCreated(const grpc::string& hostname, + const grpc::string& lb_id, + const grpc::string& load_key); + + // Wrapper around PerHostStore::ReportStreamClosed. + void ReportStreamClosed(const grpc::string& hostname, + const grpc::string& lb_id); + + private: + // Buffered data that was fetched from Census but hasn't been sent to + // balancer. We need to keep this data ourselves because Census will + // delete the data once it's returned. + std::unordered_map per_host_stores_; + + // Tracks the number of in-progress calls for each unknown LB ID. + std::unordered_map unknown_balancer_id_trackers_; +}; + +} // namespace load_reporter +} // namespace grpc + +#endif // GRPC_SRC_CPP_SERVER_LOAD_REPORTER_LOAD_DATA_STORE_H diff --git a/test/cpp/server/load_reporter/BUILD b/test/cpp/server/load_reporter/BUILD new file mode 100644 index 0000000000..5cb3a00f82 --- /dev/null +++ b/test/cpp/server/load_reporter/BUILD @@ -0,0 +1,31 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +licenses(["notice"]) # Apache v2 + +load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary", "grpc_package") + +grpc_package(name = "test/cpp/server/load_reporter") + +grpc_cc_test( + name = "lb_load_data_store_test", + srcs = ["load_data_store_test.cc"], + external_deps = [ + "gtest", + ], + deps = [ + "//:lb_load_data_store", + "//test/core/util:grpc_test_util", + ], +) diff --git a/test/cpp/server/load_reporter/load_data_store_test.cc b/test/cpp/server/load_reporter/load_data_store_test.cc new file mode 100644 index 0000000000..8280dee6a4 --- /dev/null +++ b/test/cpp/server/load_reporter/load_data_store_test.cc @@ -0,0 +1,481 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include +#include + +#include +#include + +#include "src/cpp/server/load_reporter/load_data_store.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +namespace grpc { +namespace testing { +namespace { + +using ::grpc::load_reporter::CallMetricValue; +using ::grpc::load_reporter::LoadDataStore; +using ::grpc::load_reporter::LoadRecordKey; +using ::grpc::load_reporter::LoadRecordValue; +using ::grpc::load_reporter::PerBalancerStore; +using ::grpc::load_reporter::kInvalidLbId; + +class LoadDataStoreTest : public ::testing::Test { + public: + LoadDataStoreTest() + : kKey1(kLbId1, kLbTag1, kUser1, kClientIp1), + kKey2(kLbId2, kLbTag2, kUser2, kClientIp2) {} + + // Check whether per_balancer_stores contains a store which was originally + // created for . + bool PerBalancerStoresContains( + const LoadDataStore& load_data_store, + const std::set* per_balancer_stores, + const grpc::string hostname, const grpc::string lb_id, + const grpc::string load_key) { + auto original_per_balancer_store = + load_data_store.FindPerBalancerStore(hostname, lb_id); + EXPECT_NE(original_per_balancer_store, nullptr); + EXPECT_EQ(original_per_balancer_store->lb_id(), lb_id); + EXPECT_EQ(original_per_balancer_store->load_key(), load_key); + for (auto per_balancer_store : *per_balancer_stores) { + if (per_balancer_store == original_per_balancer_store) { + return true; + } + } + return false; + } + + grpc::string FormatLbId(size_t index) { + return "kLbId" + std::to_string(index); + } + + const grpc::string kHostname1 = "kHostname1"; + const grpc::string kHostname2 = "kHostname2"; + const grpc::string kLbId1 = "kLbId1"; + const grpc::string kLbId2 = "kLbId2"; + const grpc::string kLbId3 = "kLbId3"; + const grpc::string kLbId4 = "kLbId4"; + const grpc::string kLoadKey1 = "kLoadKey1"; + const grpc::string kLoadKey2 = "kLoadKey2"; + const grpc::string kLbTag1 = "kLbTag1"; + const grpc::string kLbTag2 = "kLbTag2"; + const grpc::string kUser1 = "kUser1"; + const grpc::string kUser2 = "kUser2"; + const grpc::string kClientIp1 = "00"; + const grpc::string kClientIp2 = "02"; + const grpc::string kMetric1 = "kMetric1"; + const grpc::string kMetric2 = "kMetric2"; + const LoadRecordKey kKey1; + const LoadRecordKey kKey2; +}; + +using PerBalancerStoreTest = LoadDataStoreTest; + +TEST_F(LoadDataStoreTest, AssignToSelf) { + LoadDataStore load_data_store; + load_data_store.ReportStreamCreated(kHostname1, kLbId1, kLoadKey1); + auto assigned_stores = load_data_store.GetAssignedStores(kHostname1, kLbId1); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_stores, + kHostname1, kLbId1, kLoadKey1)); +} + +TEST_F(LoadDataStoreTest, ReassignOrphanStores) { + LoadDataStore load_data_store; + load_data_store.ReportStreamCreated(kHostname1, kLbId1, kLoadKey1); + load_data_store.ReportStreamCreated(kHostname1, kLbId2, kLoadKey1); + load_data_store.ReportStreamCreated(kHostname1, kLbId3, kLoadKey2); + load_data_store.ReportStreamCreated(kHostname2, kLbId4, kLoadKey1); + // 1. Close the second stream. + load_data_store.ReportStreamClosed(kHostname1, kLbId2); + auto assigned_to_lb_id_1 = + load_data_store.GetAssignedStores(kHostname1, kLbId1); + // The orphaned store is re-assigned to kLbId1 with the same load key. + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_1, + kHostname1, kLbId1, kLoadKey1)); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_1, + kHostname1, kLbId2, kLoadKey1)); + // 2. Close the first stream. + load_data_store.ReportStreamClosed(kHostname1, kLbId1); + auto assigned_to_lb_id_3 = + load_data_store.GetAssignedStores(kHostname1, kLbId3); + // The orphaned stores are re-assigned to kLbId3 with the same host, + // because there isn't any LB with the same load key. + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_3, + kHostname1, kLbId1, kLoadKey1)); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_3, + kHostname1, kLbId2, kLoadKey1)); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_3, + kHostname1, kLbId3, kLoadKey2)); + // 3. Close the third stream. + load_data_store.ReportStreamClosed(kHostname1, kLbId3); + auto assigned_to_lb_id_4 = + load_data_store.GetAssignedStores(kHostname2, kLbId4); + // There is no active LB for the first host now. kLbId4 is active but + // it's for the second host, so it wll NOT adopt the orphaned stores. + EXPECT_FALSE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_4, + kHostname1, kLbId1, kLoadKey1)); + EXPECT_FALSE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_4, + kHostname1, kLbId2, kLoadKey1)); + EXPECT_FALSE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_4, + kHostname1, kLbId3, kLoadKey2)); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_4, + kHostname2, kLbId4, kLoadKey1)); +} + +TEST_F(LoadDataStoreTest, OrphanAssignmentIsSticky) { + LoadDataStore load_data_store; + std::set active_lb_ids; + size_t num_lb_ids = 1000; + for (size_t i = 0; i < num_lb_ids; ++i) { + load_data_store.ReportStreamCreated(kHostname1, FormatLbId(i), kLoadKey1); + active_lb_ids.insert(FormatLbId(i)); + } + grpc::string orphaned_lb_id = FormatLbId(std::rand() % num_lb_ids); + load_data_store.ReportStreamClosed(kHostname1, orphaned_lb_id); + active_lb_ids.erase(orphaned_lb_id); + // Find which LB is assigned the orphaned store. + grpc::string assigned_lb_id = ""; + for (auto lb_id : active_lb_ids) { + if (PerBalancerStoresContains( + load_data_store, + load_data_store.GetAssignedStores(kHostname1, lb_id), kHostname1, + orphaned_lb_id, kLoadKey1)) { + assigned_lb_id = lb_id; + break; + } + } + EXPECT_STRNE(assigned_lb_id.c_str(), ""); + // Close 10 more stream, skipping the assigned_lb_id. The assignment of + // orphaned_lb_id shouldn't change. + for (size_t _ = 0; _ < 10; ++_) { + grpc::string lb_id_to_close = ""; + for (auto lb_id : active_lb_ids) { + if (lb_id != assigned_lb_id) { + lb_id_to_close = lb_id; + break; + } + } + EXPECT_STRNE(lb_id_to_close.c_str(), ""); + load_data_store.ReportStreamClosed(kHostname1, lb_id_to_close); + active_lb_ids.erase(lb_id_to_close); + EXPECT_TRUE(PerBalancerStoresContains( + load_data_store, + load_data_store.GetAssignedStores(kHostname1, assigned_lb_id), + kHostname1, orphaned_lb_id, kLoadKey1)); + } + // Close the assigned_lb_id, orphaned_lb_id will be re-assigned again. + load_data_store.ReportStreamClosed(kHostname1, assigned_lb_id); + active_lb_ids.erase(assigned_lb_id); + size_t orphaned_lb_id_occurences = 0; + for (auto lb_id : active_lb_ids) { + if (PerBalancerStoresContains( + load_data_store, + load_data_store.GetAssignedStores(kHostname1, lb_id), kHostname1, + orphaned_lb_id, kLoadKey1)) { + orphaned_lb_id_occurences++; + } + } + EXPECT_EQ(orphaned_lb_id_occurences, 1U); +} + +TEST_F(LoadDataStoreTest, HostTemporarilyLoseAllStreams) { + LoadDataStore load_data_store; + load_data_store.ReportStreamCreated(kHostname1, kLbId1, kLoadKey1); + load_data_store.ReportStreamCreated(kHostname2, kLbId2, kLoadKey1); + auto store_lb_id_1 = load_data_store.FindPerBalancerStore(kHostname1, kLbId1); + auto store_invalid_lb_id_1 = + load_data_store.FindPerBalancerStore(kHostname1, kInvalidLbId); + EXPECT_FALSE(store_lb_id_1->IsSuspended()); + EXPECT_FALSE(store_invalid_lb_id_1->IsSuspended()); + // Disconnect all the streams of the first host. + load_data_store.ReportStreamClosed(kHostname1, kLbId1); + // All the streams of that host are suspended. + EXPECT_TRUE(store_lb_id_1->IsSuspended()); + EXPECT_TRUE(store_invalid_lb_id_1->IsSuspended()); + // Detailed load data won't be kept when the PerBalancerStore is suspended. + store_lb_id_1->MergeRow(kKey1, LoadRecordValue()); + store_invalid_lb_id_1->MergeRow(kKey1, LoadRecordValue()); + EXPECT_EQ(store_lb_id_1->load_record_map().size(), 0U); + EXPECT_EQ(store_invalid_lb_id_1->load_record_map().size(), 0U); + // The stores for different hosts won't mix, even if the load key is the same. + auto assigned_to_lb_id_2 = + load_data_store.GetAssignedStores(kHostname2, kLbId2); + EXPECT_EQ(assigned_to_lb_id_2->size(), 2U); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_2, + kHostname2, kLbId2, kLoadKey1)); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_2, + kHostname2, kInvalidLbId, "")); + // A new stream is created for the first host. + load_data_store.ReportStreamCreated(kHostname1, kLbId3, kLoadKey2); + // The stores for the first host are resumed. + EXPECT_FALSE(store_lb_id_1->IsSuspended()); + EXPECT_FALSE(store_invalid_lb_id_1->IsSuspended()); + store_lb_id_1->MergeRow(kKey1, LoadRecordValue()); + store_invalid_lb_id_1->MergeRow(kKey1, LoadRecordValue()); + EXPECT_EQ(store_lb_id_1->load_record_map().size(), 1U); + EXPECT_EQ(store_invalid_lb_id_1->load_record_map().size(), 1U); + // The resumed stores are assigned to the new LB. + auto assigned_to_lb_id_3 = + load_data_store.GetAssignedStores(kHostname1, kLbId3); + EXPECT_EQ(assigned_to_lb_id_3->size(), 3U); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_3, + kHostname1, kLbId1, kLoadKey1)); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_3, + kHostname1, kInvalidLbId, "")); + EXPECT_TRUE(PerBalancerStoresContains(load_data_store, assigned_to_lb_id_3, + kHostname1, kLbId3, kLoadKey2)); +} + +TEST_F(LoadDataStoreTest, OneStorePerLbId) { + LoadDataStore load_data_store; + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname1, kLbId1), nullptr); + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname1, kInvalidLbId), + nullptr); + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname2, kLbId2), nullptr); + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname2, kLbId3), nullptr); + // Create The first stream. + load_data_store.ReportStreamCreated(kHostname1, kLbId1, kLoadKey1); + auto store_lb_id_1 = load_data_store.FindPerBalancerStore(kHostname1, kLbId1); + auto store_invalid_lb_id_1 = + load_data_store.FindPerBalancerStore(kHostname1, kInvalidLbId); + // Two stores will be created: one is for the stream; the other one is for + // kInvalidLbId. + EXPECT_NE(store_lb_id_1, nullptr); + EXPECT_NE(store_invalid_lb_id_1, nullptr); + EXPECT_NE(store_lb_id_1, store_invalid_lb_id_1); + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname2, kLbId2), nullptr); + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname2, kLbId3), nullptr); + // Create the second stream. + load_data_store.ReportStreamCreated(kHostname2, kLbId3, kLoadKey1); + auto store_lb_id_3 = load_data_store.FindPerBalancerStore(kHostname2, kLbId3); + auto store_invalid_lb_id_2 = + load_data_store.FindPerBalancerStore(kHostname2, kInvalidLbId); + EXPECT_NE(store_lb_id_3, nullptr); + EXPECT_NE(store_invalid_lb_id_2, nullptr); + EXPECT_NE(store_lb_id_3, store_invalid_lb_id_2); + // The PerBalancerStores created for different hosts are independent. + EXPECT_NE(store_lb_id_3, store_invalid_lb_id_1); + EXPECT_NE(store_invalid_lb_id_2, store_invalid_lb_id_1); + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname2, kLbId2), nullptr); +} + +TEST_F(LoadDataStoreTest, ExactlyOnceAssignment) { + LoadDataStore load_data_store; + size_t num_create = 100; + size_t num_close = 50; + for (size_t i = 0; i < num_create; ++i) { + load_data_store.ReportStreamCreated(kHostname1, FormatLbId(i), kLoadKey1); + } + for (size_t i = 0; i < num_close; ++i) { + load_data_store.ReportStreamClosed(kHostname1, FormatLbId(i)); + } + std::set reported_lb_ids; + for (size_t i = num_close; i < num_create; ++i) { + for (auto assigned_store : + *load_data_store.GetAssignedStores(kHostname1, FormatLbId(i))) { + EXPECT_TRUE(reported_lb_ids.insert(assigned_store->lb_id()).second); + } + } + // Add one for kInvalidLbId. + EXPECT_EQ(reported_lb_ids.size(), (num_create + 1)); + EXPECT_NE(reported_lb_ids.find(kInvalidLbId), reported_lb_ids.end()); +} + +TEST_F(LoadDataStoreTest, UnknownBalancerIdTracking) { + LoadDataStore load_data_store; + load_data_store.ReportStreamCreated(kHostname1, kLbId1, kLoadKey1); + // Merge data for a known LB ID. + LoadRecordValue v1(192); + load_data_store.MergeRow(kHostname1, kKey1, v1); + // Merge data for unknown LB ID. + LoadRecordValue v2(23); + EXPECT_FALSE(load_data_store.IsTrackedUnknownBalancerId(kLbId2)); + load_data_store.MergeRow( + kHostname1, LoadRecordKey(kLbId2, kLbTag1, kUser1, kClientIp1), v2); + EXPECT_TRUE(load_data_store.IsTrackedUnknownBalancerId(kLbId2)); + LoadRecordValue v3(952); + load_data_store.MergeRow( + kHostname2, LoadRecordKey(kLbId3, kLbTag1, kUser1, kClientIp1), v3); + EXPECT_TRUE(load_data_store.IsTrackedUnknownBalancerId(kLbId3)); + // The data kept for a known LB ID is correct. + auto store_lb_id_1 = load_data_store.FindPerBalancerStore(kHostname1, kLbId1); + EXPECT_EQ(store_lb_id_1->load_record_map().size(), 1U); + EXPECT_EQ(store_lb_id_1->load_record_map().find(kKey1)->second.start_count(), + v1.start_count()); + EXPECT_EQ(store_lb_id_1->GetNumCallsInProgressForReport(), v1.start_count()); + // No PerBalancerStore created for Unknown LB ID. + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname1, kLbId2), nullptr); + EXPECT_EQ(load_data_store.FindPerBalancerStore(kHostname2, kLbId3), nullptr); + // End all the started RPCs for kLbId1. + LoadRecordValue v4(0, v1.start_count()); + load_data_store.MergeRow(kHostname1, kKey1, v4); + EXPECT_EQ(store_lb_id_1->load_record_map().size(), 1U); + EXPECT_EQ(store_lb_id_1->load_record_map().find(kKey1)->second.start_count(), + v1.start_count()); + EXPECT_EQ(store_lb_id_1->load_record_map().find(kKey1)->second.ok_count(), + v4.ok_count()); + EXPECT_EQ(store_lb_id_1->GetNumCallsInProgressForReport(), 0U); + EXPECT_FALSE(load_data_store.IsTrackedUnknownBalancerId(kLbId1)); + // End all the started RPCs for kLbId2. + LoadRecordValue v5(0, v2.start_count()); + load_data_store.MergeRow( + kHostname1, LoadRecordKey(kLbId2, kLbTag1, kUser1, kClientIp1), v5); + EXPECT_FALSE(load_data_store.IsTrackedUnknownBalancerId(kLbId2)); + // End some of the started RPCs for kLbId3. + LoadRecordValue v6(0, v3.start_count() / 2); + load_data_store.MergeRow( + kHostname2, LoadRecordKey(kLbId3, kLbTag1, kUser1, kClientIp1), v6); + EXPECT_TRUE(load_data_store.IsTrackedUnknownBalancerId(kLbId3)); +} + +TEST_F(PerBalancerStoreTest, Suspend) { + PerBalancerStore per_balancer_store(kLbId1, kLoadKey1); + EXPECT_FALSE(per_balancer_store.IsSuspended()); + // Suspend the store. + per_balancer_store.Suspend(); + EXPECT_TRUE(per_balancer_store.IsSuspended()); + EXPECT_EQ(0U, per_balancer_store.load_record_map().size()); + // Data merged when the store is suspended won't be kept. + LoadRecordValue v1(139, 19); + per_balancer_store.MergeRow(kKey1, v1); + EXPECT_EQ(0U, per_balancer_store.load_record_map().size()); + // Resume the store. + per_balancer_store.Resume(); + EXPECT_FALSE(per_balancer_store.IsSuspended()); + EXPECT_EQ(0U, per_balancer_store.load_record_map().size()); + // Data merged after the store is resumed will be kept. + LoadRecordValue v2(23, 0, 51); + per_balancer_store.MergeRow(kKey1, v2); + EXPECT_EQ(1U, per_balancer_store.load_record_map().size()); + // Suspend the store. + per_balancer_store.Suspend(); + EXPECT_TRUE(per_balancer_store.IsSuspended()); + EXPECT_EQ(0U, per_balancer_store.load_record_map().size()); + // Data merged when the store is suspended won't be kept. + LoadRecordValue v3(62, 11); + per_balancer_store.MergeRow(kKey1, v3); + EXPECT_EQ(0U, per_balancer_store.load_record_map().size()); + // Resume the store. + per_balancer_store.Resume(); + EXPECT_FALSE(per_balancer_store.IsSuspended()); + EXPECT_EQ(0U, per_balancer_store.load_record_map().size()); + // Data merged after the store is resumed will be kept. + LoadRecordValue v4(225, 98); + per_balancer_store.MergeRow(kKey1, v4); + EXPECT_EQ(1U, per_balancer_store.load_record_map().size()); + // In-progress count is always kept. + EXPECT_EQ(per_balancer_store.GetNumCallsInProgressForReport(), + v1.start_count() - v1.ok_count() + v2.start_count() - + v2.error_count() + v3.start_count() - v3.ok_count() + + v4.start_count() - v4.ok_count()); +} + +TEST_F(PerBalancerStoreTest, DataAggregation) { + PerBalancerStore per_balancer_store(kLbId1, kLoadKey1); + // Construct some Values. + LoadRecordValue v1(992, 34, 13, 234.0, 164.0, 173467.38); + v1.InsertCallMetric(kMetric1, CallMetricValue(3, 2773.2)); + LoadRecordValue v2(4842, 213, 9, 393.0, 974.0, 1345.2398); + v2.InsertCallMetric(kMetric1, CallMetricValue(7, 25.234)); + v2.InsertCallMetric(kMetric2, CallMetricValue(2, 387.08)); + // v3 doesn't change the number of in-progress RPCs. + LoadRecordValue v3(293, 55, 293 - 55, 28764, 5284, 5772); + v3.InsertCallMetric(kMetric1, CallMetricValue(61, 3465.0)); + v3.InsertCallMetric(kMetric2, CallMetricValue(13, 672.0)); + // The initial state of the store. + uint64_t num_calls_in_progress = 0; + EXPECT_FALSE(per_balancer_store.IsNumCallsInProgressChangedSinceLastReport()); + EXPECT_EQ(per_balancer_store.GetNumCallsInProgressForReport(), + num_calls_in_progress); + // Merge v1 and get report of the number of in-progress calls. + per_balancer_store.MergeRow(kKey1, v1); + EXPECT_TRUE(per_balancer_store.IsNumCallsInProgressChangedSinceLastReport()); + EXPECT_EQ(per_balancer_store.GetNumCallsInProgressForReport(), + num_calls_in_progress += + (v1.start_count() - v1.ok_count() - v1.error_count())); + EXPECT_FALSE(per_balancer_store.IsNumCallsInProgressChangedSinceLastReport()); + // Merge v2 and get report of the number of in-progress calls. + per_balancer_store.MergeRow(kKey2, v2); + EXPECT_TRUE(per_balancer_store.IsNumCallsInProgressChangedSinceLastReport()); + EXPECT_EQ(per_balancer_store.GetNumCallsInProgressForReport(), + num_calls_in_progress += + (v2.start_count() - v2.ok_count() - v2.error_count())); + EXPECT_FALSE(per_balancer_store.IsNumCallsInProgressChangedSinceLastReport()); + // Merge v3 and get report of the number of in-progress calls. + per_balancer_store.MergeRow(kKey1, v3); + EXPECT_FALSE(per_balancer_store.IsNumCallsInProgressChangedSinceLastReport()); + EXPECT_EQ(per_balancer_store.GetNumCallsInProgressForReport(), + num_calls_in_progress); + // LoadRecordValue for kKey1 is aggregated correctly. + LoadRecordValue value_for_key1 = + per_balancer_store.load_record_map().find(kKey1)->second; + EXPECT_EQ(value_for_key1.start_count(), v1.start_count() + v3.start_count()); + EXPECT_EQ(value_for_key1.ok_count(), v1.ok_count() + v3.ok_count()); + EXPECT_EQ(value_for_key1.error_count(), v1.error_count() + v3.error_count()); + EXPECT_EQ(value_for_key1.bytes_sent(), v1.bytes_sent() + v3.bytes_sent()); + EXPECT_EQ(value_for_key1.bytes_recv(), v1.bytes_recv() + v3.bytes_recv()); + EXPECT_EQ(value_for_key1.latency_ms(), v1.latency_ms() + v3.latency_ms()); + EXPECT_EQ(value_for_key1.call_metrics().size(), 2U); + EXPECT_EQ(value_for_key1.call_metrics().find(kMetric1)->second.num_calls(), + v1.call_metrics().find(kMetric1)->second.num_calls() + + v3.call_metrics().find(kMetric1)->second.num_calls()); + EXPECT_EQ( + value_for_key1.call_metrics().find(kMetric1)->second.total_metric_value(), + v1.call_metrics().find(kMetric1)->second.total_metric_value() + + v3.call_metrics().find(kMetric1)->second.total_metric_value()); + EXPECT_EQ(value_for_key1.call_metrics().find(kMetric2)->second.num_calls(), + v3.call_metrics().find(kMetric2)->second.num_calls()); + EXPECT_EQ( + value_for_key1.call_metrics().find(kMetric2)->second.total_metric_value(), + v3.call_metrics().find(kMetric2)->second.total_metric_value()); + // LoadRecordValue for kKey2 is aggregated (trivially) correctly. + LoadRecordValue value_for_key2 = + per_balancer_store.load_record_map().find(kKey2)->second; + EXPECT_EQ(value_for_key2.start_count(), v2.start_count()); + EXPECT_EQ(value_for_key2.ok_count(), v2.ok_count()); + EXPECT_EQ(value_for_key2.error_count(), v2.error_count()); + EXPECT_EQ(value_for_key2.bytes_sent(), v2.bytes_sent()); + EXPECT_EQ(value_for_key2.bytes_recv(), v2.bytes_recv()); + EXPECT_EQ(value_for_key2.latency_ms(), v2.latency_ms()); + EXPECT_EQ(value_for_key2.call_metrics().size(), 2U); + EXPECT_EQ(value_for_key2.call_metrics().find(kMetric1)->second.num_calls(), + v2.call_metrics().find(kMetric1)->second.num_calls()); + EXPECT_EQ( + value_for_key2.call_metrics().find(kMetric1)->second.total_metric_value(), + v2.call_metrics().find(kMetric1)->second.total_metric_value()); + EXPECT_EQ(value_for_key2.call_metrics().find(kMetric2)->second.num_calls(), + v2.call_metrics().find(kMetric2)->second.num_calls()); + EXPECT_EQ( + value_for_key2.call_metrics().find(kMetric2)->second.total_metric_value(), + v2.call_metrics().find(kMetric2)->second.total_metric_value()); +} + +} // namespace +} // namespace testing +} // namespace grpc + +int main(int argc, char** argv) { + grpc_test_init(argc, argv); + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 41722e063d..9092125a54 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -3903,6 +3903,26 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util", + "lb_load_data_store" + ], + "headers": [], + "is_filegroup": false, + "language": "c++", + "name": "lb_load_data_store_test", + "src": [ + "test/cpp/server/load_reporter/load_data_store_test.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -7467,6 +7487,23 @@ "third_party": false, "type": "lib" }, + { + "deps": [ + "grpc++" + ], + "headers": [ + "src/cpp/server/load_reporter/load_data_store.h" + ], + "is_filegroup": false, + "language": "c++", + "name": "lb_load_data_store", + "src": [ + "src/cpp/server/load_reporter/load_data_store.cc", + "src/cpp/server/load_reporter/load_data_store.h" + ], + "third_party": false, + "type": "lib" + }, { "deps": [ "grpc", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 067d9b300d..8eb5303e82 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -4389,6 +4389,30 @@ ], "uses_polling": true }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "lb_load_data_store_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": true + }, { "args": [], "benchmark": false, -- cgit v1.2.3 From cc93663910cd17f6d1faeef020ec0b3fc27df263 Mon Sep 17 00:00:00 2001 From: Yihua Zhang Date: Tue, 8 May 2018 10:15:03 -0700 Subject: Add ALTS fuzzer --- CMakeLists.txt | 32 + Makefile | 72 + build.yaml | 15 + gRPC-Core.podspec | 2 + grpc.gyp | 2 + test/core/end2end/fuzzers/api_fuzzer.cc | 139 +- test/core/security/BUILD | 12 + test/core/security/alts_credentials_fuzzer.cc | 120 + .../0149b46b88d583e05be0fb1423d10f2a14d36c48 | Bin 0 -> 9 bytes .../047fc351e73f760d329d5a8845944720be9ce773 | Bin 0 -> 685 bytes .../04ef96c66d8222d1a2c07e6b2a6548e6a527042b | Bin 0 -> 12 bytes .../05a7e16c1d7f92111f43e9c777421879920e79a4 | Bin 0 -> 219 bytes .../063eb46f202fdfe7935c30ca38d7eb81c82db419 | Bin 0 -> 10 bytes .../064773597c295fa871c184fc12d17b6de8aab31b | Bin 0 -> 91 bytes .../087449740758b114d16790067707934479946bd6 | Bin 0 -> 7 bytes .../0a5d068feb57a2782c6eba57b637abe8668ac82f | Bin 0 -> 271 bytes .../0b81e6d89bf7df80e87e5ee7c49f7cc1431f77e8 | Bin 0 -> 130 bytes .../11409339cec708a5e353893101bfe76364337d5c | Bin 0 -> 4 bytes .../147696a264cd6f197adb7c68aff834c30b1b77f8 | 1 + .../160e5cac38c5c9e919ed6e4fbafee76907d63044 | Bin 0 -> 7 bytes .../173d02167db431040b0540d98f6fc5e8b456587d | 1 + .../18a3fe239806b3c7d1af24bcd2bd23aeeb072d5c | Bin 0 -> 542 bytes .../195abd83b2e9d32b1b5b854fe33da44b6db40880 | 1 + .../19af2509c7d84334b9ec64de4767a07d5294fd72 | Bin 0 -> 7 bytes .../1b9864b948fcf08b062fd4401ef55b214c259535 | Bin 0 -> 642 bytes .../1edddfa67de854d7faaba41418fda845e9c6a89d | Bin 0 -> 385 bytes .../20031bb00e6608e1b570aa96e6afb9de06d42167 | Bin 0 -> 49 bytes .../22b4c7ce7db99b0df63c9eae9265de484b695922 | Bin 0 -> 15 bytes .../27416437ad287bd3cc1c5efdecebc39f20df73c1 | 1 + .../27e8cd785c2b9346f68dba75761b52fbabaf2b72 | Bin 0 -> 348 bytes .../28236f860d3d8e5ea11176746cb4c1c5c4f1f6c0 | Bin 0 -> 28 bytes .../29e15b492c5a409938092a30c003c5c34df7e283 | Bin 0 -> 4 bytes .../2a47864d77749aa042b772895dbdf46f608ccc6d | Bin 0 -> 745 bytes .../2cca5cb1b135c35f6e5e1ec4c37deb9e12d37dc0 | 2 + .../2df27b6c42dbaee382a29a87338d64ee87354acb | Bin 0 -> 760 bytes .../2e9ddd1339d8e599cef658a08965985c4f45e428 | 2 + .../31a2d12a84a7a56ace831a9668d6ab4847390679 | 2 + .../33cb9ec0ce3538ed6079b5fcb127649a5d05955b | Bin 0 -> 244 bytes .../348d9ae6eebb2e1644addf7f07231d108cf6f3b8 | 1 + .../359f76f3c802292e92b0640de2bfe051e780a3b6 | Bin 0 -> 4 bytes .../35a479988e965a6e3e75138b64b0bd1f45073e2f | Bin 0 -> 244 bytes .../362b00d713686ff70cb0199f3d7d0058e5a1a27a | Bin 0 -> 4 bytes .../3849c1625071791ceae709b9c6c705b28d099d67 | Bin 0 -> 32 bytes .../39ef03c66ee2d4bcfb6c8da50486dcd40f02fb12 | Bin 0 -> 28 bytes .../3a3ca061863499ebc171a4f910fa1b49523baad4 | 1 + .../3a890f3fd01b048ac9db65a9a9b4f4443268b91a | Bin 0 -> 690 bytes .../3b9554038a425bd1fae057ba41f9366bb467e946 | 1 + .../3ce0ae4aa226f205a3a4e66bbb253419d9d754bf | Bin 0 -> 326 bytes .../3dccc5523986c37e27684659bba8a1037e7a92e8 | Bin 0 -> 697 bytes .../3e0908c15b1cede4541d25f388b1345e8641e221 | Bin 0 -> 140 bytes .../3fcb181ff6a8c8e2ba38ed34cf78f7482eb55cb7 | Bin 0 -> 199 bytes .../41c9b5f720eb8f8fa04c840375a881781a849b43 | Bin 0 -> 388 bytes .../4257a018f08f13a3a9adc848ef808e1be50bc4cf | 2 + .../42dfc5c4d13261b7259e65cd692df9c9d607194e | Bin 0 -> 4 bytes .../43144664aedb585d45d42aa5249ddbfe81afe470 | Bin 0 -> 3 bytes .../43e5ad495a47593b17dbcbd3e70c2e25a417bb6e | Bin 0 -> 531 bytes .../446614e45b7bef49118b17e031c48faf167ebe3e | Bin 0 -> 68 bytes .../46492477fa84ca88e85df914801af0b09b0939f6 | Bin 0 -> 362 bytes .../47157f83b166b57e0052c98a65c6db864fa6cb9b | Bin 0 -> 81 bytes .../473fc9b6d768a925527d3ad805ca363d490dc741 | Bin 0 -> 759 bytes .../483c0b4015100eee00f6b23d1100d8c4953dd3b1 | Bin 0 -> 766 bytes .../48be2dc4cdc5462407b319caa855d976cda88153 | Bin 0 -> 367 bytes .../4e84eb54a0e438052b0c2e83653135042d9eb59a | 1 + .../50839d5c8bf33f0970986dcc4b73b024f11a95b7 | 1 + .../523d964986d8ad966ae07e540a608681098813f9 | Bin 0 -> 4 bytes .../5410b8190c95dacd36d6e6ec75b7538a630e08de | Bin 0 -> 364 bytes .../549b2891ac79f504a7c9ea00f6d7527c34ce04e6 | Bin 0 -> 66 bytes .../55321649e7b7f1b5664ae20724e683c930643fc4 | 1 + .../55cc52f25865baee3e6e52c3110a9723caa2b3cb | 1 + .../56c22410e3295ad03aa31552ab888f581756cc17 | Bin 0 -> 283 bytes .../5724a705b62a7548ba2df1abe4ef0c970c4e1bd2 | Bin 0 -> 759 bytes .../576a148c107d56861d1611641a6f7c7921061c5c | Bin 0 -> 362 bytes .../5a6b8263e8939f851cf5b1e347a33d97253b7b3d | Bin 0 -> 85 bytes .../5ba93c9db0cff93f52b521d7420e43f6eda2784f | Bin 0 -> 1 bytes .../5bd02a339fd7705449388580c75bfcc597aba954 | Bin 0 -> 109 bytes .../5bd6fb6fc4163bf3a9db6ddaf509dce8df8a5000 | 1 + .../5d06fc38005503af3d084721c60e574fb9d2f370 | 1 + .../5ddc10489ff3269bdaa3051b70fb7af455ee1104 | Bin 0 -> 4 bytes .../5ea9d515f0d10b04f1356b9463139bfe121a6e4a | Bin 0 -> 13 bytes .../61c449793347cf2e1ed0c38d54d23c63dfaabeb8 | 1 + .../6287389c373e9788dcc04f9747b4be1fd1ef3028 | Bin 0 -> 6 bytes .../64d4de4d5aafab7ec388a7fe83066c1a4d1d9d68 | Bin 0 -> 37 bytes .../651c37806d2ac579dcfc97643c3c1ea74dbb8774 | Bin 0 -> 305 bytes .../6551d02d20573cfa2944ec1f12b0c01f264a1326 | 1 + .../65f029414ee10e45ff4b9f305f7b472364cea538 | Bin 0 -> 22 bytes .../68b75a17fe2db060df3e61a597650ba99079abbf | Bin 0 -> 788 bytes .../69e80594dbc5c4c648e39883a650b1760f20ab63 | Bin 0 -> 157 bytes .../6cb47d0e640b4c41e32f13c0d64ee46eae1b80b5 | Bin 0 -> 25 bytes .../6da5fe063432cb9094c7c083efdbbe5ba4246d18 | Bin 0 -> 243 bytes .../6dd140da774d85f272fb587dc1b2a85d881a7c21 | Bin 0 -> 89 bytes .../6ddab273597d73be49e2307d68e00fa18bba4765 | Bin 0 -> 16 bytes .../6eaf85d84fbf47ea0619d0dba8d366f4e3ff0be6 | Bin 0 -> 4 bytes .../6f751cc09af8113f6ecd491b1830bd8454c4738d | Bin 0 -> 751 bytes .../70d9eb29a70d483d07e2faca6b00098af78d1fff | Bin 0 -> 124 bytes .../7192effa1058382b379fb7b87f1acad5ac554d05 | Bin 0 -> 643 bytes .../730e85d6a62e70cb6721009b903782ade4ff73a2 | Bin 0 -> 370 bytes .../74002471a854059cb29de7cad8f9fb7adc3c5ec2 | 2 + .../747f2330cd1fc4a06d54b376a9a6528d0364f0ac | Bin 0 -> 646 bytes .../749d5d7a9e0b1545b297117e834462af32b3e230 | 1 + .../77de0b1de120ac702ca45868b1008a48626daf12 | 1 + .../792c67398bce19a4eeda32653c994436e79456e5 | 1 + .../7a3022b248c8960289e4c80c7cc8df409499e5da | Bin 0 -> 250 bytes .../7a9372081294a6fbd3fecdd91b99589c98d4948e | Bin 0 -> 150 bytes .../7bbe4ba828947550f4ad089d5989cb695ecbdb1b | Bin 0 -> 34 bytes .../7f1ad514a96f0c3d5ca5d6f7880b929a65eeae96 | Bin 0 -> 37 bytes .../7f2b075f0b6707c38db851747e2578343eeab286 | Bin 0 -> 382 bytes .../81ebc64bfde3fad37af5a58ef7f1c5c3c54c4b5d | Bin 0 -> 4 bytes .../82fae081afaea13831404024d39658344d56e1c6 | Bin 0 -> 77 bytes .../83ba41cea1adab707f7f213af5e2ed734bdddc25 | Bin 0 -> 128 bytes .../841a3f66c94e5acd836a44cd5a8514d4ad45d83e | Bin 0 -> 161 bytes .../841ef94ee0f1b0b45983d95b75aba25421d73f2c | Bin 0 -> 4 bytes .../843b0aad4a9707c5dcc92d12d876b78675cfcb65 | Bin 0 -> 168 bytes .../8483e3d92eda8df504b1d1d0d012f4bcd778cd33 | Bin 0 -> 769 bytes .../876830fdff4e59038fa2173b700faef5bffe61de | 1 + .../87ca3342fdce0c1f678a3f1b62428032ef51442d | Bin 0 -> 16 bytes .../87d044027cdb7d35fadb56532f497764246946a6 | Bin 0 -> 642 bytes .../88ce75ba18bdb7e93a81197d850f4e792f6a8155 | Bin 0 -> 690 bytes .../89dc55e8e20e811e78c952c8bd2c16f55fe72f57 | 1 + .../8a215a58908f44bdced595ceb01a81977f1d72f0 | 1 + .../8ac7459e918304ca40b1cf29a3ac0f555eada678 | Bin 0 -> 150 bytes .../8b93e50a911f3ea0e0b0377ba4636574f2ee9a5e | Bin 0 -> 67 bytes .../8c9ec0ffd803505772693833d56e7a02110645b3 | 1 + .../8e4b361a530dc6825afcfb4106bd482c3fd010fa | 1 + .../8f6690d97bcda890f2a5b2930a2b7a4d7b56c6e7 | 1 + .../917636de2c14dce2580d4308249a94d61d62c305 | Bin 0 -> 31 bytes .../91f11008defda918951bda868cc68c6373fb0e6a | Bin 0 -> 3 bytes .../92e01a34047b660a798086d55a3d8d7100a01939 | Bin 0 -> 4 bytes .../963fafadb4de09dee0e6a852bd61b1740039a465 | 1 + .../97bf33ec97b93fcc2449431915911a55b906e3b6 | 1 + .../99e31e12b02b02479d10b2c08426906bd93a0840 | 1 + .../9a75ce693e7259d4d3bb9203dfc0a65f8bbaa466 | Bin 0 -> 152 bytes .../9ac0d956f9743e026baad7319ba2a75d9f1a534f | Bin 0 -> 760 bytes .../9ae56d4451dd3e1b66ddc250d84dbf6d8cae0dbd | Bin 0 -> 13 bytes .../9b9a3a1e4023c9b172060249752a482a3437ef2a | Bin 0 -> 14 bytes .../9c81164e10bf612c352dca3ecabf57743b451d42 | 2 + .../9d8b420b5d32deb0140ab91eeebba58ca6163722 | Bin 0 -> 15 bytes .../9de687bf1e2cfac54c3b2e2eb85b53014a460ff7 | Bin 0 -> 77 bytes .../9f3cda19a186bd11bfac361b464f92daa129a33b | Bin 0 -> 97 bytes .../a14fc6a608121f8abf0fe25cf466720f00f25653 | Bin 0 -> 964 bytes .../a39906074669a6b76a35b0adf2bf36ad751f3b35 | Bin 0 -> 19 bytes .../a454ca483b4a66b83826d061be2859dd79ff0d6c | Bin 0 -> 4 bytes .../a52df5607370ff0f56d821000f3d5e386a01d489 | 1 + .../a56eaf47f7c7263e53efdc55ec39063dbb4ae71c | Bin 0 -> 34 bytes .../a79249fb8f7d53f0a280359d2d9df31594adbdfc | Bin 0 -> 687 bytes .../aa98a46f25004f7436aadb36ff8b7f07ed7bfce1 | 1 + .../adc83b19e793491b1c6ea0fd8b46cd9f32e592fc | 1 + .../afd8e19f7bfd6c963f1856be59b75627864821dc | 2 + .../b3966239b8568442baecbeb0f8a1aa29dcdfd7ed | Bin 0 -> 241 bytes .../b430d41ef65493b3e917182c23ce90df983e01ab | 2 + .../b44e715e0cfe05f0c92a9e000ac3c36aae17df9d | 1 + .../b4cf4ef7b3f64eff76cf99091fddc04411774708 | Bin 0 -> 542 bytes .../b53d84468ea93620a9824ca65acf1179f431e763 | Bin 0 -> 584 bytes .../b6ac4831cc5baabee9c8ab9af9ca3923f91097a0 | 2 + .../b7f4a484866a8050dbc63bc905c9803c6964eda5 | Bin 0 -> 22 bytes .../b8f21e59f90431c982d5ec3fb54ae4605f102252 | Bin 0 -> 361 bytes .../bad10b6581cdead8e7cb96e4f544dcf0ea650fbc | Bin 0 -> 9 bytes .../bb01bed86b43257be9f527388e1183f52438c473 | 1 + .../bb7497b00f0d999ef39dbf81c6bd0441e32723b6 | Bin 0 -> 359 bytes .../bf01b72e635deda1b4a8468f1cc36f01a54e1338 | Bin 0 -> 3 bytes .../bf8b4530d8d246dd74ac53a13471bba17941dff7 | 1 + .../c08bc84ab6a512b901bb730beb05c8394e4f1c5d | Bin 0 -> 50 bytes .../c244b635d94e6f5d6b344887434be3e001a04b41 | Bin 0 -> 46 bytes .../c281efe9620da999a637ff6e9b3279ec613fb992 | Bin 0 -> 73 bytes .../c30a212824ee71e215f475f453de17c65a200101 | Bin 0 -> 172 bytes .../c449427f35b7ecdf5641073629f7723df52c4cb0 | 1 + .../c60240cd3b02eb71e2bf5ebd59afa3a5dc9b5e4d | Bin 0 -> 172 bytes .../c60cdf9c3fb9060838f445b3bc3852b6f81e1e4c | Bin 0 -> 4 bytes .../c72d0501bacadb45242c553ba292591302f12a6a | Bin 0 -> 13 bytes .../c739e7b5ad999edbdeffdab672dbc30deb3959a0 | Bin 0 -> 34 bytes .../c7d73b12a7108d82f8dac6d8a6a34f838601aca6 | Bin 0 -> 4 bytes .../ca781e1add632433293e847ae9e71649c217ee5f | Bin 0 -> 651 bytes .../cc48e916f40e8d69c2d07cfda42c7d3b7fe3447a | Bin 0 -> 357 bytes .../cca1aff4c08ee4ccbcb6f80e1cd1480a0a093cfd | Bin 0 -> 372 bytes .../cf6ae8bf1d08d25e235b7bee0839984bbc04edf6 | Bin 0 -> 4 bytes .../cfc52fa086292c699efd7bf41d2fae3deb449536 | Bin 0 -> 510 bytes .../cfe13ef3c6c713a059f231f0001ecec97e2a932d | Bin 0 -> 4 bytes .../d14026ac6421bca7161024f4e735cb80a1068d01 | 2 + .../d2fb6e8f7867fc1e2ebe723da2b5246dc9cc6b14 | Bin 0 -> 4 bytes .../d4db7d51bdaa4781cf12c3b59914bad414d2a41e | Bin 0 -> 7 bytes .../d533da0e7f8c1e39bb025b4d7a89613142a6f54e | Bin 0 -> 4 bytes .../d5cf489d01a1b847a7aac5dddabff23fdc218e1e | Bin 0 -> 14 bytes .../d686f8561a249c7c15c78f76a5fceb884286e070 | Bin 0 -> 73 bytes .../d92424daad9d96a40e5ab177e3824c36ef51dc0f | Bin 0 -> 10 bytes .../db242a11ed88b2b26af46770dd1927d9f35301fb | Bin 0 -> 756 bytes .../db32eb04db13d58f65f46d262608bd088987c063 | Bin 0 -> 684 bytes .../db39a953317951759e40734de6607a0b4457728e | Bin 0 -> 387 bytes .../dc5e8f3102456bed90d17303bc4cff1a7e076d5d | 1 + .../dd9542bbed8e5dc58da2789edbfb9c38d578d3b4 | Bin 0 -> 4 bytes .../de2ebb1ed324385de500a1a3308846239857c3c7 | 1 + .../de8ba9158254c1cd84b53df1e4cdf1757b1392f1 | Bin 0 -> 650 bytes .../e1dd260746f50024822a8b729b89545d26decfb8 | Bin 0 -> 14 bytes .../e29add81b20dc570fdc885782689f6dccb1c5fad | Bin 0 -> 9 bytes .../e2e99af62843cd3b29d50daeb118e58830784da9 | Bin 0 -> 646 bytes .../e46611c5daf99662e1576147c1623409752a1f39 | 1 + .../e5a1ba11af830e9d2db201c5164f75747a85fe9b | Bin 0 -> 94 bytes .../e6026ee0badf216b326443a5f708446b2f2e579f | Bin 0 -> 952 bytes .../e6c7d2c0038fa1f03fc6590a726abc98f4c641f3 | 1 + .../eafdef6a630bed71bd0e4f3d4a16b5fa0c920651 | Bin 0 -> 4 bytes .../ece985b9b82e27281514d460709d7edf8203ded7 | Bin 0 -> 11 bytes .../edb8f4259f756c2c4bc731f05beaa36f992cf079 | Bin 0 -> 697 bytes .../edce7778c2e1adb81dda3d057a6536759a7cb293 | 1 + .../ee4040c0dd406dd616c49ed2c37b40478dabfe0f | Bin 0 -> 71 bytes .../ee69f2b380663d051a70f30fcfce9f79f5341e5a | Bin 0 -> 5 bytes .../efc6743e47274058771bb6eda1fefa017bde4a95 | Bin 0 -> 373 bytes .../f0038e54162000694d882b1acb80930c807b41d2 | Bin 0 -> 7 bytes .../f1deb9e388c877337dabe92f31b01e2a019a10f4 | Bin 0 -> 223 bytes .../f3a09373e4d3c7310d372089e6deb15d6b22c198 | 1 + .../f3db7ef6495fa1ac5bb4db293fb38dd59122bb7c | 2 + .../f434bb4ceecc573e085d4c3ef453ef01e93d9c89 | Bin 0 -> 76 bytes .../f55bceaad42ddf9d2b37fdfca68255d29a696109 | 1 + .../f62ca5321428a5d23f3c804fb51eb4e65bc58716 | Bin 0 -> 4 bytes .../f7c6a558b8d0af64db2b139371a7af7068b01b92 | Bin 0 -> 661 bytes .../faa1781e1444bba5b8c677bc5e2a38d023a1ec65 | 1 + .../fceba33ada1dda05fccedfefd331c9a201f1a2e5 | 1 + .../fd668bef6fdaf7f3ffd58d8c60ce550476652e60 | Bin 0 -> 247 bytes .../fdf06b928e37e7c4ae59a568b5723ad98bbed6e5 | Bin 0 -> 19 bytes .../fe2fc5d499aeb2762387ef2e3ce939280813dec0 | Bin 0 -> 4 bytes .../ff548d368b090409a138e5cc4afc7f43b4a3fbbd | Bin 0 -> 748 bytes test/core/util/BUILD | 2 + test/core/util/fuzzer_util.cc | 82 + test/core/util/fuzzer_util.h | 49 + tools/fuzzer/runners/alts_credentials_fuzzer.sh | 30 + tools/run_tests/generated/sources_and_headers.json | 38 + tools/run_tests/generated/tests.json | 4186 ++++++++++++++++++++ 224 files changed, 4751 insertions(+), 95 deletions(-) create mode 100644 test/core/security/alts_credentials_fuzzer.cc create mode 100644 test/core/security/corpus/alts_credentials_corpus/0149b46b88d583e05be0fb1423d10f2a14d36c48 create mode 100644 test/core/security/corpus/alts_credentials_corpus/047fc351e73f760d329d5a8845944720be9ce773 create mode 100644 test/core/security/corpus/alts_credentials_corpus/04ef96c66d8222d1a2c07e6b2a6548e6a527042b create mode 100644 test/core/security/corpus/alts_credentials_corpus/05a7e16c1d7f92111f43e9c777421879920e79a4 create mode 100644 test/core/security/corpus/alts_credentials_corpus/063eb46f202fdfe7935c30ca38d7eb81c82db419 create mode 100644 test/core/security/corpus/alts_credentials_corpus/064773597c295fa871c184fc12d17b6de8aab31b create mode 100644 test/core/security/corpus/alts_credentials_corpus/087449740758b114d16790067707934479946bd6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/0a5d068feb57a2782c6eba57b637abe8668ac82f create mode 100644 test/core/security/corpus/alts_credentials_corpus/0b81e6d89bf7df80e87e5ee7c49f7cc1431f77e8 create mode 100644 test/core/security/corpus/alts_credentials_corpus/11409339cec708a5e353893101bfe76364337d5c create mode 100644 test/core/security/corpus/alts_credentials_corpus/147696a264cd6f197adb7c68aff834c30b1b77f8 create mode 100644 test/core/security/corpus/alts_credentials_corpus/160e5cac38c5c9e919ed6e4fbafee76907d63044 create mode 100644 test/core/security/corpus/alts_credentials_corpus/173d02167db431040b0540d98f6fc5e8b456587d create mode 100644 test/core/security/corpus/alts_credentials_corpus/18a3fe239806b3c7d1af24bcd2bd23aeeb072d5c create mode 100644 test/core/security/corpus/alts_credentials_corpus/195abd83b2e9d32b1b5b854fe33da44b6db40880 create mode 100644 test/core/security/corpus/alts_credentials_corpus/19af2509c7d84334b9ec64de4767a07d5294fd72 create mode 100644 test/core/security/corpus/alts_credentials_corpus/1b9864b948fcf08b062fd4401ef55b214c259535 create mode 100644 test/core/security/corpus/alts_credentials_corpus/1edddfa67de854d7faaba41418fda845e9c6a89d create mode 100644 test/core/security/corpus/alts_credentials_corpus/20031bb00e6608e1b570aa96e6afb9de06d42167 create mode 100644 test/core/security/corpus/alts_credentials_corpus/22b4c7ce7db99b0df63c9eae9265de484b695922 create mode 100644 test/core/security/corpus/alts_credentials_corpus/27416437ad287bd3cc1c5efdecebc39f20df73c1 create mode 100644 test/core/security/corpus/alts_credentials_corpus/27e8cd785c2b9346f68dba75761b52fbabaf2b72 create mode 100644 test/core/security/corpus/alts_credentials_corpus/28236f860d3d8e5ea11176746cb4c1c5c4f1f6c0 create mode 100644 test/core/security/corpus/alts_credentials_corpus/29e15b492c5a409938092a30c003c5c34df7e283 create mode 100644 test/core/security/corpus/alts_credentials_corpus/2a47864d77749aa042b772895dbdf46f608ccc6d create mode 100644 test/core/security/corpus/alts_credentials_corpus/2cca5cb1b135c35f6e5e1ec4c37deb9e12d37dc0 create mode 100644 test/core/security/corpus/alts_credentials_corpus/2df27b6c42dbaee382a29a87338d64ee87354acb create mode 100644 test/core/security/corpus/alts_credentials_corpus/2e9ddd1339d8e599cef658a08965985c4f45e428 create mode 100644 test/core/security/corpus/alts_credentials_corpus/31a2d12a84a7a56ace831a9668d6ab4847390679 create mode 100644 test/core/security/corpus/alts_credentials_corpus/33cb9ec0ce3538ed6079b5fcb127649a5d05955b create mode 100644 test/core/security/corpus/alts_credentials_corpus/348d9ae6eebb2e1644addf7f07231d108cf6f3b8 create mode 100644 test/core/security/corpus/alts_credentials_corpus/359f76f3c802292e92b0640de2bfe051e780a3b6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/35a479988e965a6e3e75138b64b0bd1f45073e2f create mode 100644 test/core/security/corpus/alts_credentials_corpus/362b00d713686ff70cb0199f3d7d0058e5a1a27a create mode 100644 test/core/security/corpus/alts_credentials_corpus/3849c1625071791ceae709b9c6c705b28d099d67 create mode 100644 test/core/security/corpus/alts_credentials_corpus/39ef03c66ee2d4bcfb6c8da50486dcd40f02fb12 create mode 100644 test/core/security/corpus/alts_credentials_corpus/3a3ca061863499ebc171a4f910fa1b49523baad4 create mode 100644 test/core/security/corpus/alts_credentials_corpus/3a890f3fd01b048ac9db65a9a9b4f4443268b91a create mode 100644 test/core/security/corpus/alts_credentials_corpus/3b9554038a425bd1fae057ba41f9366bb467e946 create mode 100644 test/core/security/corpus/alts_credentials_corpus/3ce0ae4aa226f205a3a4e66bbb253419d9d754bf create mode 100644 test/core/security/corpus/alts_credentials_corpus/3dccc5523986c37e27684659bba8a1037e7a92e8 create mode 100644 test/core/security/corpus/alts_credentials_corpus/3e0908c15b1cede4541d25f388b1345e8641e221 create mode 100644 test/core/security/corpus/alts_credentials_corpus/3fcb181ff6a8c8e2ba38ed34cf78f7482eb55cb7 create mode 100644 test/core/security/corpus/alts_credentials_corpus/41c9b5f720eb8f8fa04c840375a881781a849b43 create mode 100644 test/core/security/corpus/alts_credentials_corpus/4257a018f08f13a3a9adc848ef808e1be50bc4cf create mode 100644 test/core/security/corpus/alts_credentials_corpus/42dfc5c4d13261b7259e65cd692df9c9d607194e create mode 100644 test/core/security/corpus/alts_credentials_corpus/43144664aedb585d45d42aa5249ddbfe81afe470 create mode 100644 test/core/security/corpus/alts_credentials_corpus/43e5ad495a47593b17dbcbd3e70c2e25a417bb6e create mode 100644 test/core/security/corpus/alts_credentials_corpus/446614e45b7bef49118b17e031c48faf167ebe3e create mode 100644 test/core/security/corpus/alts_credentials_corpus/46492477fa84ca88e85df914801af0b09b0939f6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/47157f83b166b57e0052c98a65c6db864fa6cb9b create mode 100644 test/core/security/corpus/alts_credentials_corpus/473fc9b6d768a925527d3ad805ca363d490dc741 create mode 100644 test/core/security/corpus/alts_credentials_corpus/483c0b4015100eee00f6b23d1100d8c4953dd3b1 create mode 100644 test/core/security/corpus/alts_credentials_corpus/48be2dc4cdc5462407b319caa855d976cda88153 create mode 100644 test/core/security/corpus/alts_credentials_corpus/4e84eb54a0e438052b0c2e83653135042d9eb59a create mode 100644 test/core/security/corpus/alts_credentials_corpus/50839d5c8bf33f0970986dcc4b73b024f11a95b7 create mode 100644 test/core/security/corpus/alts_credentials_corpus/523d964986d8ad966ae07e540a608681098813f9 create mode 100644 test/core/security/corpus/alts_credentials_corpus/5410b8190c95dacd36d6e6ec75b7538a630e08de create mode 100644 test/core/security/corpus/alts_credentials_corpus/549b2891ac79f504a7c9ea00f6d7527c34ce04e6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/55321649e7b7f1b5664ae20724e683c930643fc4 create mode 100644 test/core/security/corpus/alts_credentials_corpus/55cc52f25865baee3e6e52c3110a9723caa2b3cb create mode 100644 test/core/security/corpus/alts_credentials_corpus/56c22410e3295ad03aa31552ab888f581756cc17 create mode 100644 test/core/security/corpus/alts_credentials_corpus/5724a705b62a7548ba2df1abe4ef0c970c4e1bd2 create mode 100644 test/core/security/corpus/alts_credentials_corpus/576a148c107d56861d1611641a6f7c7921061c5c create mode 100644 test/core/security/corpus/alts_credentials_corpus/5a6b8263e8939f851cf5b1e347a33d97253b7b3d create mode 100644 test/core/security/corpus/alts_credentials_corpus/5ba93c9db0cff93f52b521d7420e43f6eda2784f create mode 100644 test/core/security/corpus/alts_credentials_corpus/5bd02a339fd7705449388580c75bfcc597aba954 create mode 100644 test/core/security/corpus/alts_credentials_corpus/5bd6fb6fc4163bf3a9db6ddaf509dce8df8a5000 create mode 100644 test/core/security/corpus/alts_credentials_corpus/5d06fc38005503af3d084721c60e574fb9d2f370 create mode 100644 test/core/security/corpus/alts_credentials_corpus/5ddc10489ff3269bdaa3051b70fb7af455ee1104 create mode 100644 test/core/security/corpus/alts_credentials_corpus/5ea9d515f0d10b04f1356b9463139bfe121a6e4a create mode 100644 test/core/security/corpus/alts_credentials_corpus/61c449793347cf2e1ed0c38d54d23c63dfaabeb8 create mode 100644 test/core/security/corpus/alts_credentials_corpus/6287389c373e9788dcc04f9747b4be1fd1ef3028 create mode 100644 test/core/security/corpus/alts_credentials_corpus/64d4de4d5aafab7ec388a7fe83066c1a4d1d9d68 create mode 100644 test/core/security/corpus/alts_credentials_corpus/651c37806d2ac579dcfc97643c3c1ea74dbb8774 create mode 100644 test/core/security/corpus/alts_credentials_corpus/6551d02d20573cfa2944ec1f12b0c01f264a1326 create mode 100644 test/core/security/corpus/alts_credentials_corpus/65f029414ee10e45ff4b9f305f7b472364cea538 create mode 100644 test/core/security/corpus/alts_credentials_corpus/68b75a17fe2db060df3e61a597650ba99079abbf create mode 100644 test/core/security/corpus/alts_credentials_corpus/69e80594dbc5c4c648e39883a650b1760f20ab63 create mode 100644 test/core/security/corpus/alts_credentials_corpus/6cb47d0e640b4c41e32f13c0d64ee46eae1b80b5 create mode 100644 test/core/security/corpus/alts_credentials_corpus/6da5fe063432cb9094c7c083efdbbe5ba4246d18 create mode 100644 test/core/security/corpus/alts_credentials_corpus/6dd140da774d85f272fb587dc1b2a85d881a7c21 create mode 100644 test/core/security/corpus/alts_credentials_corpus/6ddab273597d73be49e2307d68e00fa18bba4765 create mode 100644 test/core/security/corpus/alts_credentials_corpus/6eaf85d84fbf47ea0619d0dba8d366f4e3ff0be6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/6f751cc09af8113f6ecd491b1830bd8454c4738d create mode 100644 test/core/security/corpus/alts_credentials_corpus/70d9eb29a70d483d07e2faca6b00098af78d1fff create mode 100644 test/core/security/corpus/alts_credentials_corpus/7192effa1058382b379fb7b87f1acad5ac554d05 create mode 100644 test/core/security/corpus/alts_credentials_corpus/730e85d6a62e70cb6721009b903782ade4ff73a2 create mode 100644 test/core/security/corpus/alts_credentials_corpus/74002471a854059cb29de7cad8f9fb7adc3c5ec2 create mode 100644 test/core/security/corpus/alts_credentials_corpus/747f2330cd1fc4a06d54b376a9a6528d0364f0ac create mode 100644 test/core/security/corpus/alts_credentials_corpus/749d5d7a9e0b1545b297117e834462af32b3e230 create mode 100644 test/core/security/corpus/alts_credentials_corpus/77de0b1de120ac702ca45868b1008a48626daf12 create mode 100644 test/core/security/corpus/alts_credentials_corpus/792c67398bce19a4eeda32653c994436e79456e5 create mode 100644 test/core/security/corpus/alts_credentials_corpus/7a3022b248c8960289e4c80c7cc8df409499e5da create mode 100644 test/core/security/corpus/alts_credentials_corpus/7a9372081294a6fbd3fecdd91b99589c98d4948e create mode 100644 test/core/security/corpus/alts_credentials_corpus/7bbe4ba828947550f4ad089d5989cb695ecbdb1b create mode 100644 test/core/security/corpus/alts_credentials_corpus/7f1ad514a96f0c3d5ca5d6f7880b929a65eeae96 create mode 100644 test/core/security/corpus/alts_credentials_corpus/7f2b075f0b6707c38db851747e2578343eeab286 create mode 100644 test/core/security/corpus/alts_credentials_corpus/81ebc64bfde3fad37af5a58ef7f1c5c3c54c4b5d create mode 100644 test/core/security/corpus/alts_credentials_corpus/82fae081afaea13831404024d39658344d56e1c6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/83ba41cea1adab707f7f213af5e2ed734bdddc25 create mode 100644 test/core/security/corpus/alts_credentials_corpus/841a3f66c94e5acd836a44cd5a8514d4ad45d83e create mode 100644 test/core/security/corpus/alts_credentials_corpus/841ef94ee0f1b0b45983d95b75aba25421d73f2c create mode 100644 test/core/security/corpus/alts_credentials_corpus/843b0aad4a9707c5dcc92d12d876b78675cfcb65 create mode 100644 test/core/security/corpus/alts_credentials_corpus/8483e3d92eda8df504b1d1d0d012f4bcd778cd33 create mode 100644 test/core/security/corpus/alts_credentials_corpus/876830fdff4e59038fa2173b700faef5bffe61de create mode 100644 test/core/security/corpus/alts_credentials_corpus/87ca3342fdce0c1f678a3f1b62428032ef51442d create mode 100644 test/core/security/corpus/alts_credentials_corpus/87d044027cdb7d35fadb56532f497764246946a6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/88ce75ba18bdb7e93a81197d850f4e792f6a8155 create mode 100644 test/core/security/corpus/alts_credentials_corpus/89dc55e8e20e811e78c952c8bd2c16f55fe72f57 create mode 100644 test/core/security/corpus/alts_credentials_corpus/8a215a58908f44bdced595ceb01a81977f1d72f0 create mode 100644 test/core/security/corpus/alts_credentials_corpus/8ac7459e918304ca40b1cf29a3ac0f555eada678 create mode 100644 test/core/security/corpus/alts_credentials_corpus/8b93e50a911f3ea0e0b0377ba4636574f2ee9a5e create mode 100644 test/core/security/corpus/alts_credentials_corpus/8c9ec0ffd803505772693833d56e7a02110645b3 create mode 100644 test/core/security/corpus/alts_credentials_corpus/8e4b361a530dc6825afcfb4106bd482c3fd010fa create mode 100644 test/core/security/corpus/alts_credentials_corpus/8f6690d97bcda890f2a5b2930a2b7a4d7b56c6e7 create mode 100644 test/core/security/corpus/alts_credentials_corpus/917636de2c14dce2580d4308249a94d61d62c305 create mode 100644 test/core/security/corpus/alts_credentials_corpus/91f11008defda918951bda868cc68c6373fb0e6a create mode 100644 test/core/security/corpus/alts_credentials_corpus/92e01a34047b660a798086d55a3d8d7100a01939 create mode 100644 test/core/security/corpus/alts_credentials_corpus/963fafadb4de09dee0e6a852bd61b1740039a465 create mode 100644 test/core/security/corpus/alts_credentials_corpus/97bf33ec97b93fcc2449431915911a55b906e3b6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/99e31e12b02b02479d10b2c08426906bd93a0840 create mode 100644 test/core/security/corpus/alts_credentials_corpus/9a75ce693e7259d4d3bb9203dfc0a65f8bbaa466 create mode 100644 test/core/security/corpus/alts_credentials_corpus/9ac0d956f9743e026baad7319ba2a75d9f1a534f create mode 100644 test/core/security/corpus/alts_credentials_corpus/9ae56d4451dd3e1b66ddc250d84dbf6d8cae0dbd create mode 100644 test/core/security/corpus/alts_credentials_corpus/9b9a3a1e4023c9b172060249752a482a3437ef2a create mode 100644 test/core/security/corpus/alts_credentials_corpus/9c81164e10bf612c352dca3ecabf57743b451d42 create mode 100644 test/core/security/corpus/alts_credentials_corpus/9d8b420b5d32deb0140ab91eeebba58ca6163722 create mode 100644 test/core/security/corpus/alts_credentials_corpus/9de687bf1e2cfac54c3b2e2eb85b53014a460ff7 create mode 100644 test/core/security/corpus/alts_credentials_corpus/9f3cda19a186bd11bfac361b464f92daa129a33b create mode 100644 test/core/security/corpus/alts_credentials_corpus/a14fc6a608121f8abf0fe25cf466720f00f25653 create mode 100644 test/core/security/corpus/alts_credentials_corpus/a39906074669a6b76a35b0adf2bf36ad751f3b35 create mode 100644 test/core/security/corpus/alts_credentials_corpus/a454ca483b4a66b83826d061be2859dd79ff0d6c create mode 100644 test/core/security/corpus/alts_credentials_corpus/a52df5607370ff0f56d821000f3d5e386a01d489 create mode 100644 test/core/security/corpus/alts_credentials_corpus/a56eaf47f7c7263e53efdc55ec39063dbb4ae71c create mode 100644 test/core/security/corpus/alts_credentials_corpus/a79249fb8f7d53f0a280359d2d9df31594adbdfc create mode 100644 test/core/security/corpus/alts_credentials_corpus/aa98a46f25004f7436aadb36ff8b7f07ed7bfce1 create mode 100644 test/core/security/corpus/alts_credentials_corpus/adc83b19e793491b1c6ea0fd8b46cd9f32e592fc create mode 100644 test/core/security/corpus/alts_credentials_corpus/afd8e19f7bfd6c963f1856be59b75627864821dc create mode 100644 test/core/security/corpus/alts_credentials_corpus/b3966239b8568442baecbeb0f8a1aa29dcdfd7ed create mode 100644 test/core/security/corpus/alts_credentials_corpus/b430d41ef65493b3e917182c23ce90df983e01ab create mode 100644 test/core/security/corpus/alts_credentials_corpus/b44e715e0cfe05f0c92a9e000ac3c36aae17df9d create mode 100644 test/core/security/corpus/alts_credentials_corpus/b4cf4ef7b3f64eff76cf99091fddc04411774708 create mode 100644 test/core/security/corpus/alts_credentials_corpus/b53d84468ea93620a9824ca65acf1179f431e763 create mode 100644 test/core/security/corpus/alts_credentials_corpus/b6ac4831cc5baabee9c8ab9af9ca3923f91097a0 create mode 100644 test/core/security/corpus/alts_credentials_corpus/b7f4a484866a8050dbc63bc905c9803c6964eda5 create mode 100644 test/core/security/corpus/alts_credentials_corpus/b8f21e59f90431c982d5ec3fb54ae4605f102252 create mode 100644 test/core/security/corpus/alts_credentials_corpus/bad10b6581cdead8e7cb96e4f544dcf0ea650fbc create mode 100644 test/core/security/corpus/alts_credentials_corpus/bb01bed86b43257be9f527388e1183f52438c473 create mode 100644 test/core/security/corpus/alts_credentials_corpus/bb7497b00f0d999ef39dbf81c6bd0441e32723b6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/bf01b72e635deda1b4a8468f1cc36f01a54e1338 create mode 100644 test/core/security/corpus/alts_credentials_corpus/bf8b4530d8d246dd74ac53a13471bba17941dff7 create mode 100644 test/core/security/corpus/alts_credentials_corpus/c08bc84ab6a512b901bb730beb05c8394e4f1c5d create mode 100644 test/core/security/corpus/alts_credentials_corpus/c244b635d94e6f5d6b344887434be3e001a04b41 create mode 100644 test/core/security/corpus/alts_credentials_corpus/c281efe9620da999a637ff6e9b3279ec613fb992 create mode 100644 test/core/security/corpus/alts_credentials_corpus/c30a212824ee71e215f475f453de17c65a200101 create mode 100644 test/core/security/corpus/alts_credentials_corpus/c449427f35b7ecdf5641073629f7723df52c4cb0 create mode 100644 test/core/security/corpus/alts_credentials_corpus/c60240cd3b02eb71e2bf5ebd59afa3a5dc9b5e4d create mode 100644 test/core/security/corpus/alts_credentials_corpus/c60cdf9c3fb9060838f445b3bc3852b6f81e1e4c create mode 100644 test/core/security/corpus/alts_credentials_corpus/c72d0501bacadb45242c553ba292591302f12a6a create mode 100644 test/core/security/corpus/alts_credentials_corpus/c739e7b5ad999edbdeffdab672dbc30deb3959a0 create mode 100644 test/core/security/corpus/alts_credentials_corpus/c7d73b12a7108d82f8dac6d8a6a34f838601aca6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/ca781e1add632433293e847ae9e71649c217ee5f create mode 100644 test/core/security/corpus/alts_credentials_corpus/cc48e916f40e8d69c2d07cfda42c7d3b7fe3447a create mode 100644 test/core/security/corpus/alts_credentials_corpus/cca1aff4c08ee4ccbcb6f80e1cd1480a0a093cfd create mode 100644 test/core/security/corpus/alts_credentials_corpus/cf6ae8bf1d08d25e235b7bee0839984bbc04edf6 create mode 100644 test/core/security/corpus/alts_credentials_corpus/cfc52fa086292c699efd7bf41d2fae3deb449536 create mode 100644 test/core/security/corpus/alts_credentials_corpus/cfe13ef3c6c713a059f231f0001ecec97e2a932d create mode 100644 test/core/security/corpus/alts_credentials_corpus/d14026ac6421bca7161024f4e735cb80a1068d01 create mode 100644 test/core/security/corpus/alts_credentials_corpus/d2fb6e8f7867fc1e2ebe723da2b5246dc9cc6b14 create mode 100644 test/core/security/corpus/alts_credentials_corpus/d4db7d51bdaa4781cf12c3b59914bad414d2a41e create mode 100644 test/core/security/corpus/alts_credentials_corpus/d533da0e7f8c1e39bb025b4d7a89613142a6f54e create mode 100644 test/core/security/corpus/alts_credentials_corpus/d5cf489d01a1b847a7aac5dddabff23fdc218e1e create mode 100644 test/core/security/corpus/alts_credentials_corpus/d686f8561a249c7c15c78f76a5fceb884286e070 create mode 100644 test/core/security/corpus/alts_credentials_corpus/d92424daad9d96a40e5ab177e3824c36ef51dc0f create mode 100644 test/core/security/corpus/alts_credentials_corpus/db242a11ed88b2b26af46770dd1927d9f35301fb create mode 100644 test/core/security/corpus/alts_credentials_corpus/db32eb04db13d58f65f46d262608bd088987c063 create mode 100644 test/core/security/corpus/alts_credentials_corpus/db39a953317951759e40734de6607a0b4457728e create mode 100644 test/core/security/corpus/alts_credentials_corpus/dc5e8f3102456bed90d17303bc4cff1a7e076d5d create mode 100644 test/core/security/corpus/alts_credentials_corpus/dd9542bbed8e5dc58da2789edbfb9c38d578d3b4 create mode 100644 test/core/security/corpus/alts_credentials_corpus/de2ebb1ed324385de500a1a3308846239857c3c7 create mode 100644 test/core/security/corpus/alts_credentials_corpus/de8ba9158254c1cd84b53df1e4cdf1757b1392f1 create mode 100644 test/core/security/corpus/alts_credentials_corpus/e1dd260746f50024822a8b729b89545d26decfb8 create mode 100644 test/core/security/corpus/alts_credentials_corpus/e29add81b20dc570fdc885782689f6dccb1c5fad create mode 100644 test/core/security/corpus/alts_credentials_corpus/e2e99af62843cd3b29d50daeb118e58830784da9 create mode 100644 test/core/security/corpus/alts_credentials_corpus/e46611c5daf99662e1576147c1623409752a1f39 create mode 100644 test/core/security/corpus/alts_credentials_corpus/e5a1ba11af830e9d2db201c5164f75747a85fe9b create mode 100644 test/core/security/corpus/alts_credentials_corpus/e6026ee0badf216b326443a5f708446b2f2e579f create mode 100644 test/core/security/corpus/alts_credentials_corpus/e6c7d2c0038fa1f03fc6590a726abc98f4c641f3 create mode 100644 test/core/security/corpus/alts_credentials_corpus/eafdef6a630bed71bd0e4f3d4a16b5fa0c920651 create mode 100644 test/core/security/corpus/alts_credentials_corpus/ece985b9b82e27281514d460709d7edf8203ded7 create mode 100644 test/core/security/corpus/alts_credentials_corpus/edb8f4259f756c2c4bc731f05beaa36f992cf079 create mode 100644 test/core/security/corpus/alts_credentials_corpus/edce7778c2e1adb81dda3d057a6536759a7cb293 create mode 100644 test/core/security/corpus/alts_credentials_corpus/ee4040c0dd406dd616c49ed2c37b40478dabfe0f create mode 100644 test/core/security/corpus/alts_credentials_corpus/ee69f2b380663d051a70f30fcfce9f79f5341e5a create mode 100644 test/core/security/corpus/alts_credentials_corpus/efc6743e47274058771bb6eda1fefa017bde4a95 create mode 100644 test/core/security/corpus/alts_credentials_corpus/f0038e54162000694d882b1acb80930c807b41d2 create mode 100644 test/core/security/corpus/alts_credentials_corpus/f1deb9e388c877337dabe92f31b01e2a019a10f4 create mode 100644 test/core/security/corpus/alts_credentials_corpus/f3a09373e4d3c7310d372089e6deb15d6b22c198 create mode 100644 test/core/security/corpus/alts_credentials_corpus/f3db7ef6495fa1ac5bb4db293fb38dd59122bb7c create mode 100644 test/core/security/corpus/alts_credentials_corpus/f434bb4ceecc573e085d4c3ef453ef01e93d9c89 create mode 100644 test/core/security/corpus/alts_credentials_corpus/f55bceaad42ddf9d2b37fdfca68255d29a696109 create mode 100644 test/core/security/corpus/alts_credentials_corpus/f62ca5321428a5d23f3c804fb51eb4e65bc58716 create mode 100644 test/core/security/corpus/alts_credentials_corpus/f7c6a558b8d0af64db2b139371a7af7068b01b92 create mode 100644 test/core/security/corpus/alts_credentials_corpus/faa1781e1444bba5b8c677bc5e2a38d023a1ec65 create mode 100644 test/core/security/corpus/alts_credentials_corpus/fceba33ada1dda05fccedfefd331c9a201f1a2e5 create mode 100644 test/core/security/corpus/alts_credentials_corpus/fd668bef6fdaf7f3ffd58d8c60ce550476652e60 create mode 100644 test/core/security/corpus/alts_credentials_corpus/fdf06b928e37e7c4ae59a568b5723ad98bbed6e5 create mode 100644 test/core/security/corpus/alts_credentials_corpus/fe2fc5d499aeb2762387ef2e3ce939280813dec0 create mode 100644 test/core/security/corpus/alts_credentials_corpus/ff548d368b090409a138e5cc4afc7f43b4a3fbbd create mode 100644 test/core/util/fuzzer_util.cc create mode 100644 test/core/util/fuzzer_util.h create mode 100644 tools/fuzzer/runners/alts_credentials_fuzzer.sh (limited to 'grpc.gyp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8db941239f..0374173b0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -454,6 +454,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_c h2_uds_nosec_test) endif() add_dependencies(buildtests_c inproc_nosec_test) +add_dependencies(buildtests_c alts_credentials_fuzzer_one_entry) add_dependencies(buildtests_c api_fuzzer_one_entry) add_dependencies(buildtests_c client_fuzzer_one_entry) add_dependencies(buildtests_c hpack_parser_fuzzer_test_one_entry) @@ -1672,6 +1673,7 @@ add_library(grpc_test_util test/core/end2end/fixtures/proxy.cc test/core/iomgr/endpoint_tests.cc test/core/util/debugger_macros.cc + test/core/util/fuzzer_util.cc test/core/util/grpc_profiler.cc test/core/util/histogram.cc test/core/util/memory_counters.cc @@ -1975,6 +1977,7 @@ add_library(grpc_test_util_unsecure test/core/end2end/fixtures/proxy.cc test/core/iomgr/endpoint_tests.cc test/core/util/debugger_macros.cc + test/core/util/fuzzer_util.cc test/core/util/grpc_profiler.cc test/core/util/histogram.cc test/core/util/memory_counters.cc @@ -15712,6 +15715,35 @@ endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) +add_executable(alts_credentials_fuzzer_one_entry + test/core/security/alts_credentials_fuzzer.cc + test/core/util/one_corpus_entry_fuzzer.cc +) + + +target_include_directories(alts_credentials_fuzzer_one_entry + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${_gRPC_SSL_INCLUDE_DIR} + PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} + PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} + PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} + PRIVATE ${_gRPC_CARES_INCLUDE_DIR} + PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} + PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} +) + +target_link_libraries(alts_credentials_fuzzer_one_entry + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc_test_util + grpc + gpr_test_util + gpr +) + +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + add_executable(api_fuzzer_one_entry test/core/end2end/fuzzers/api_fuzzer.cc test/core/util/one_corpus_entry_fuzzer.cc diff --git a/Makefile b/Makefile index 0b2024996d..e00b57ed8d 100644 --- a/Makefile +++ b/Makefile @@ -960,6 +960,7 @@ stop: algorithm_test: $(BINDIR)/$(CONFIG)/algorithm_test alloc_test: $(BINDIR)/$(CONFIG)/alloc_test alpn_test: $(BINDIR)/$(CONFIG)/alpn_test +alts_credentials_fuzzer: $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer api_fuzzer: $(BINDIR)/$(CONFIG)/api_fuzzer arena_test: $(BINDIR)/$(CONFIG)/arena_test avl_test: $(BINDIR)/$(CONFIG)/avl_test @@ -1325,6 +1326,7 @@ resolver_component_tests_runner_invoker_unsecure: $(BINDIR)/$(CONFIG)/resolver_c resolver_component_tests_runner_invoker: $(BINDIR)/$(CONFIG)/resolver_component_tests_runner_invoker address_sorting_test_unsecure: $(BINDIR)/$(CONFIG)/address_sorting_test_unsecure address_sorting_test: $(BINDIR)/$(CONFIG)/address_sorting_test +alts_credentials_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry api_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/api_fuzzer_one_entry client_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry hpack_parser_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry @@ -1571,6 +1573,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test \ $(BINDIR)/$(CONFIG)/h2_uds_nosec_test \ $(BINDIR)/$(CONFIG)/inproc_nosec_test \ + $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/api_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry \ @@ -4057,6 +4060,7 @@ LIBGRPC_TEST_UTIL_SRC = \ test/core/end2end/fixtures/proxy.cc \ test/core/iomgr/endpoint_tests.cc \ test/core/util/debugger_macros.cc \ + test/core/util/fuzzer_util.cc \ test/core/util/grpc_profiler.cc \ test/core/util/histogram.cc \ test/core/util/memory_counters.cc \ @@ -4352,6 +4356,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ test/core/end2end/fixtures/proxy.cc \ test/core/iomgr/endpoint_tests.cc \ test/core/util/debugger_macros.cc \ + test/core/util/fuzzer_util.cc \ test/core/util/grpc_profiler.cc \ test/core/util/histogram.cc \ test/core/util/memory_counters.cc \ @@ -10226,6 +10231,38 @@ endif endif +ALTS_CREDENTIALS_FUZZER_SRC = \ + test/core/security/alts_credentials_fuzzer.cc \ + +ALTS_CREDENTIALS_FUZZER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(ALTS_CREDENTIALS_FUZZER_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/alts_credentials_fuzzer: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/alts_credentials_fuzzer: $(ALTS_CREDENTIALS_FUZZER_OBJS) $(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) $(LDXX) $(LDFLAGS) $(ALTS_CREDENTIALS_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer + +endif + +$(OBJDIR)/$(CONFIG)/test/core/security/alts_credentials_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_alts_credentials_fuzzer: $(ALTS_CREDENTIALS_FUZZER_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(ALTS_CREDENTIALS_FUZZER_OBJS:.o=.dep) +endif +endif + + API_FUZZER_SRC = \ test/core/end2end/fuzzers/api_fuzzer.cc \ @@ -23445,6 +23482,41 @@ endif endif +ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_SRC = \ + test/core/security/alts_credentials_fuzzer.cc \ + test/core/util/one_corpus_entry_fuzzer.cc \ + +ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry: $(ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_OBJS) $(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) $(ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_OBJS) $(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)/alts_credentials_fuzzer_one_entry + +endif + +$(OBJDIR)/$(CONFIG)/test/core/security/alts_credentials_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +$(OBJDIR)/$(CONFIG)/test/core/util/one_corpus_entry_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_alts_credentials_fuzzer_one_entry: $(ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_OBJS:.o=.dep) +endif +endif + + API_FUZZER_ONE_ENTRY_SRC = \ test/core/end2end/fuzzers/api_fuzzer.cc \ test/core/util/one_corpus_entry_fuzzer.cc \ diff --git a/build.yaml b/build.yaml index af8de14e61..1c5cd87d3f 100644 --- a/build.yaml +++ b/build.yaml @@ -827,6 +827,7 @@ filegroups: - test/core/end2end/fixtures/proxy.h - test/core/iomgr/endpoint_tests.h - test/core/util/debugger_macros.h + - test/core/util/fuzzer_util.h - test/core/util/grpc_profiler.h - test/core/util/histogram.h - test/core/util/memory_counters.h @@ -846,6 +847,7 @@ filegroups: - test/core/end2end/fixtures/proxy.cc - test/core/iomgr/endpoint_tests.cc - test/core/util/debugger_macros.cc + - test/core/util/fuzzer_util.cc - test/core/util/grpc_profiler.cc - test/core/util/histogram.cc - test/core/util/memory_counters.cc @@ -1991,6 +1993,19 @@ targets: - grpc - gpr_test_util - gpr +- name: alts_credentials_fuzzer + build: fuzzer + language: c + src: + - test/core/security/alts_credentials_fuzzer.cc + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + corpus_dirs: + - test/core/security/corpus/alts_credentials_corpus + maxlen: 2048 - name: api_fuzzer build: fuzzer language: c diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index e893eb9990..f6374ebfcd 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1126,6 +1126,7 @@ Pod::Spec.new do |s| 'test/core/end2end/fixtures/proxy.cc', 'test/core/iomgr/endpoint_tests.cc', 'test/core/util/debugger_macros.cc', + 'test/core/util/fuzzer_util.cc', 'test/core/util/grpc_profiler.cc', 'test/core/util/histogram.cc', 'test/core/util/memory_counters.cc', @@ -1148,6 +1149,7 @@ Pod::Spec.new do |s| 'test/core/end2end/fixtures/proxy.h', 'test/core/iomgr/endpoint_tests.h', 'test/core/util/debugger_macros.h', + 'test/core/util/fuzzer_util.h', 'test/core/util/grpc_profiler.h', 'test/core/util/histogram.h', 'test/core/util/memory_counters.h', diff --git a/grpc.gyp b/grpc.gyp index 0c567d9da4..fff7c5380a 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -577,6 +577,7 @@ 'test/core/end2end/fixtures/proxy.cc', 'test/core/iomgr/endpoint_tests.cc', 'test/core/util/debugger_macros.cc', + 'test/core/util/fuzzer_util.cc', 'test/core/util/grpc_profiler.cc', 'test/core/util/histogram.cc', 'test/core/util/memory_counters.cc', @@ -807,6 +808,7 @@ 'test/core/end2end/fixtures/proxy.cc', 'test/core/iomgr/endpoint_tests.cc', 'test/core/util/debugger_macros.cc', + 'test/core/util/fuzzer_util.cc', 'test/core/util/grpc_profiler.cc', 'test/core/util/histogram.cc', 'test/core/util/memory_counters.cc', diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc index 9ace7d04aa..36f257d6da 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.cc +++ b/test/core/end2end/fuzzers/api_fuzzer.cc @@ -38,8 +38,14 @@ #include "src/core/lib/surface/server.h" #include "src/core/lib/transport/metadata.h" #include "test/core/end2end/data/ssl_test_data.h" +#include "test/core/util/fuzzer_util.h" #include "test/core/util/passthru_endpoint.h" +using grpc_core::testing::grpc_fuzzer_get_next_byte; +using grpc_core::testing::grpc_fuzzer_get_next_string; +using grpc_core::testing::grpc_fuzzer_get_next_uint32; +using grpc_core::testing::input_stream; + //////////////////////////////////////////////////////////////////////////////// // logging @@ -65,58 +71,20 @@ static gpr_timespec now_impl(gpr_clock_type clock_type) { return ts; } -//////////////////////////////////////////////////////////////////////////////// -// input_stream: allows easy access to input bytes, and allows reading a little -// past the end (avoiding needing to check everywhere) - -typedef struct { - const uint8_t* cur; - const uint8_t* end; -} input_stream; - -static uint8_t next_byte(input_stream* inp) { - if (inp->cur == inp->end) { - return 0; - } - return *inp->cur++; -} - static void end(input_stream* inp) { inp->cur = inp->end; } -static char* read_string(input_stream* inp, bool* special) { - char* str = nullptr; - size_t cap = 0; - size_t sz = 0; - char c; - do { - if (cap == sz) { - cap = GPR_MAX(3 * cap / 2, cap + 8); - str = static_cast(gpr_realloc(str, cap)); - } - c = static_cast(next_byte(inp)); - str[sz++] = c; - } while (c != 0 && c != 1); - if (special != nullptr) { - *special = (c == 1); - } - if (c == 1) { - str[sz - 1] = 0; - } - return str; -} - static void read_buffer(input_stream* inp, char** buffer, size_t* length, bool* special) { - *length = next_byte(inp); + *length = grpc_fuzzer_get_next_byte(inp); if (*length == 255) { if (special != nullptr) *special = true; - *length = next_byte(inp); + *length = grpc_fuzzer_get_next_byte(inp); } else { if (special != nullptr) *special = false; } *buffer = static_cast(gpr_malloc(*length)); for (size_t i = 0; i < *length; i++) { - (*buffer)[i] = static_cast(next_byte(inp)); + (*buffer)[i] = static_cast(grpc_fuzzer_get_next_byte(inp)); } } @@ -128,7 +96,7 @@ static grpc_slice maybe_intern(grpc_slice s, bool intern) { static grpc_slice read_string_like_slice(input_stream* inp) { bool special; - char* s = read_string(inp, &special); + char* s = grpc_fuzzer_get_next_string(inp, &special); grpc_slice r = maybe_intern(grpc_slice_from_copied_string(s), special); gpr_free(s); return r; @@ -146,39 +114,15 @@ static grpc_slice read_buffer_like_slice(input_stream* inp) { } static uint32_t read_uint22(input_stream* inp) { - uint8_t b = next_byte(inp); + uint8_t b = grpc_fuzzer_get_next_byte(inp); uint32_t x = b & 0x7f; if (b & 0x80) { x <<= 7; - b = next_byte(inp); + b = grpc_fuzzer_get_next_byte(inp); x |= b & 0x7f; if (b & 0x80) { x <<= 8; - x |= next_byte(inp); - } - } - return x; -} - -static uint32_t read_uint32(input_stream* inp) { - uint8_t b = next_byte(inp); - uint32_t x = b & 0x7f; - if (b & 0x80) { - x <<= 7; - b = next_byte(inp); - x |= b & 0x7f; - if (b & 0x80) { - x <<= 7; - b = next_byte(inp); - x |= b & 0x7f; - if (b & 0x80) { - x <<= 7; - b = next_byte(inp); - x |= b & 0x7f; - if (b & 0x80) { - x = (x << 4) | (next_byte(inp) & 0x0f); - } - } + x |= grpc_fuzzer_get_next_byte(inp); } } return x; @@ -193,22 +137,22 @@ static grpc_byte_buffer* read_message(input_stream* inp) { } static int read_int(input_stream* inp) { - return static_cast(read_uint32(inp)); + return static_cast(grpc_fuzzer_get_next_uint32(inp)); } static grpc_channel_args* read_args(input_stream* inp) { - size_t n = next_byte(inp); + size_t n = grpc_fuzzer_get_next_byte(inp); grpc_arg* args = static_cast(gpr_malloc(sizeof(*args) * n)); for (size_t i = 0; i < n; i++) { - switch (next_byte(inp)) { + switch (grpc_fuzzer_get_next_byte(inp)) { case 1: args[i].type = GRPC_ARG_STRING; - args[i].key = read_string(inp, nullptr); - args[i].value.string = read_string(inp, nullptr); + args[i].key = grpc_fuzzer_get_next_string(inp, nullptr); + args[i].value.string = grpc_fuzzer_get_next_string(inp, nullptr); break; case 2: args[i].type = GRPC_ARG_INTEGER; - args[i].key = read_string(inp, nullptr); + args[i].key = grpc_fuzzer_get_next_string(inp, nullptr); args[i].value.integer = read_int(inp); break; case 3: @@ -249,10 +193,11 @@ static void cred_artifact_ctx_finish(cred_artifact_ctx* ctx) { static const char* read_cred_artifact(cred_artifact_ctx* ctx, input_stream* inp, const char** builtins, size_t num_builtins) { - uint8_t b = next_byte(inp); + uint8_t b = grpc_fuzzer_get_next_byte(inp); if (b == 0) return nullptr; if (b == 1) - return ctx->release[ctx->num_release++] = read_string(inp, nullptr); + return ctx->release[ctx->num_release++] = + grpc_fuzzer_get_next_string(inp, nullptr); if (b >= num_builtins + 1) { end(inp); return nullptr; @@ -288,7 +233,7 @@ static grpc_call_credentials* read_call_creds(input_stream* inp, int depth) { end(inp); return nullptr; } - switch (next_byte(inp)) { + switch (grpc_fuzzer_get_next_byte(inp)) { default: end(inp); return nullptr; @@ -339,7 +284,7 @@ static grpc_call_credentials* read_call_creds(input_stream* inp, int depth) { } static grpc_channel_credentials* read_channel_creds(input_stream* inp) { - switch (next_byte(inp)) { + switch (grpc_fuzzer_get_next_byte(inp)) { case 0: return read_ssl_channel_creds(inp); break; @@ -673,7 +618,7 @@ static grpc_slice* add_slice_to_unref(call_state* call, grpc_slice s) { static void read_metadata(input_stream* inp, size_t* count, grpc_metadata** metadata, call_state* cs) { - *count = next_byte(inp); + *count = grpc_fuzzer_get_next_byte(inp); if (*count) { *metadata = static_cast(gpr_malloc(*count * sizeof(**metadata))); @@ -681,7 +626,7 @@ static void read_metadata(input_stream* inp, size_t* count, for (size_t i = 0; i < *count; i++) { (*metadata)[i].key = read_string_like_slice(inp); (*metadata)[i].value = read_buffer_like_slice(inp); - (*metadata)[i].flags = read_uint32(inp); + (*metadata)[i].flags = grpc_fuzzer_get_next_uint32(inp); add_slice_to_unref(cs, (*metadata)[i].key); add_slice_to_unref(cs, (*metadata)[i].value); } @@ -811,7 +756,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_timer_manager_tick(); - switch (next_byte(&inp)) { + switch (grpc_fuzzer_get_next_byte(&inp)) { // terminate on bad bytes default: end(&inp); @@ -838,13 +783,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { // increment global time case 1: { g_now = gpr_time_add( - g_now, gpr_time_from_micros(read_uint32(&inp), GPR_TIMESPAN)); + g_now, gpr_time_from_micros(grpc_fuzzer_get_next_uint32(&inp), + GPR_TIMESPAN)); break; } // create an insecure channel case 2: { if (g_channel == nullptr) { - char* target = read_string(&inp, nullptr); + char* target = grpc_fuzzer_get_next_string(&inp, nullptr); char* target_uri; gpr_asprintf(&target_uri, "dns:%s", target); grpc_channel_args* args = read_args(&inp); @@ -927,7 +873,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { // check connectivity case 8: { if (g_channel != nullptr) { - uint8_t try_to_connect = next_byte(&inp); + uint8_t try_to_connect = grpc_fuzzer_get_next_byte(&inp); if (try_to_connect == 0 || try_to_connect == 1) { grpc_channel_check_connectivity_state(g_channel, try_to_connect); } else { @@ -946,7 +892,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (st != GRPC_CHANNEL_SHUTDOWN) { gpr_timespec deadline = gpr_time_add( gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_micros(read_uint32(&inp), GPR_TIMESPAN)); + gpr_time_from_micros(grpc_fuzzer_get_next_uint32(&inp), + GPR_TIMESPAN)); grpc_channel_watch_connectivity_state( g_channel, st, deadline, cq, create_validator(validate_connectivity_watch, @@ -971,7 +918,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { } parent_call = g_active_call->call; } - uint32_t propagation_mask = read_uint32(&inp); + uint32_t propagation_mask = grpc_fuzzer_get_next_uint32(&inp); grpc_slice method = read_string_like_slice(&inp); if (GRPC_SLICE_LENGTH(method) == 0) { ok = false; @@ -979,7 +926,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_slice host = read_string_like_slice(&inp); gpr_timespec deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_micros(read_uint32(&inp), GPR_TIMESPAN)); + gpr_time_from_micros(grpc_fuzzer_get_next_uint32(&inp), + GPR_TIMESPAN)); if (ok) { call_state* cs = new_call(g_active_call, CLIENT); @@ -1005,7 +953,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { end(&inp); break; } - size_t num_ops = next_byte(&inp); + size_t num_ops = grpc_fuzzer_get_next_byte(&inp); if (num_ops > 6) { end(&inp); break; @@ -1019,7 +967,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { uint8_t has_ops = 0; for (i = 0; i < num_ops; i++) { op = &ops[i]; - switch (next_byte(&inp)) { + switch (grpc_fuzzer_get_next_byte(&inp)) { default: /* invalid value */ op->op = (grpc_op_type)-1; @@ -1060,7 +1008,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { &op->data.send_status_from_server.trailing_metadata, g_active_call); op->data.send_status_from_server.status = - static_cast(next_byte(&inp)); + static_cast( + grpc_fuzzer_get_next_byte(&inp)); op->data.send_status_from_server.status_details = add_slice_to_unref(g_active_call, read_buffer_like_slice(&inp)); @@ -1097,7 +1046,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { break; } op->reserved = nullptr; - op->flags = read_uint32(&inp); + op->flags = grpc_fuzzer_get_next_uint32(&inp); } if (ok) { validator* v = make_finished_batch_validator(g_active_call, has_ops); @@ -1160,14 +1109,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { } // enable a tracer case 17: { - char* tracer = read_string(&inp, nullptr); + char* tracer = grpc_fuzzer_get_next_string(&inp, nullptr); grpc_tracer_set_enabled(tracer, 1); gpr_free(tracer); break; } // disable a tracer case 18: { - char* tracer = read_string(&inp, nullptr); + char* tracer = grpc_fuzzer_get_next_string(&inp, nullptr); grpc_tracer_set_enabled(tracer, 0); gpr_free(tracer); break; @@ -1209,7 +1158,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { // create a secure channel case 22: { if (g_channel == nullptr) { - char* target = read_string(&inp, nullptr); + char* target = grpc_fuzzer_get_next_string(&inp, nullptr); char* target_uri; gpr_asprintf(&target_uri, "dns:%s", target); grpc_channel_args* args = read_args(&inp); diff --git a/test/core/security/BUILD b/test/core/security/BUILD index 9db73b9123..70bcc8c9c3 100644 --- a/test/core/security/BUILD +++ b/test/core/security/BUILD @@ -20,6 +20,18 @@ grpc_package(name = "test/core/security") load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") +grpc_fuzzer( + name = "alts_credentials_fuzzer", + srcs = ["alts_credentials_fuzzer.cc"], + language = "C++", + corpus = "corpus/alts_credentials_corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], +) + grpc_fuzzer( name = "ssl_server_fuzzer", srcs = ["ssl_server_fuzzer.cc"], diff --git a/test/core/security/alts_credentials_fuzzer.cc b/test/core/security/alts_credentials_fuzzer.cc new file mode 100644 index 0000000000..bf18f0a589 --- /dev/null +++ b/test/core/security/alts_credentials_fuzzer.cc @@ -0,0 +1,120 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include +#include +#include +#include +#include +#include "test/core/util/fuzzer_util.h" +#include "test/core/util/memory_counters.h" + +#include "src/core/lib/gpr/env.h" +#include "src/core/lib/security/credentials/alts/alts_credentials.h" +#include "src/core/lib/security/credentials/alts/check_gcp_environment.h" +#include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h" + +using grpc_core::testing::grpc_fuzzer_get_next_byte; +using grpc_core::testing::grpc_fuzzer_get_next_string; +using grpc_core::testing::input_stream; + +// Logging +bool squelch = true; +bool leak_check = true; + +static void dont_log(gpr_log_func_args* args) {} + +// Add a random number of target service accounts to client options. +static void read_target_service_accounts( + input_stream* inp, grpc_alts_credentials_options* options) { + size_t n = grpc_fuzzer_get_next_byte(inp); + for (size_t i = 0; i < n; i++) { + char* service_account = grpc_fuzzer_get_next_string(inp, nullptr); + if (service_account != nullptr) { + grpc_alts_credentials_client_options_add_target_service_account( + options, service_account); + gpr_free(service_account); + } + } + // Added to improve code coverage. + grpc_alts_credentials_client_options_add_target_service_account(options, + nullptr); + grpc_alts_credentials_client_options_add_target_service_account( + nullptr, "this is service account"); +} + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + char* grpc_trace_fuzzer = gpr_getenv("GRPC_TRACE_FUZZER"); + if (squelch && grpc_trace_fuzzer == nullptr) { + gpr_set_log_function(dont_log); + } + gpr_free(grpc_trace_fuzzer); + struct grpc_memory_counters counters; + if (leak_check) { + grpc_memory_counters_init(); + } + input_stream inp = {data, data + size}; + grpc_init(); + bool is_on_gcp = grpc_alts_is_running_on_gcp(); + while (inp.cur != inp.end) { + bool enable_untrusted_alts = grpc_fuzzer_get_next_byte(&inp) & 0x01; + char* handshaker_service_url = + grpc_fuzzer_get_next_byte(&inp) & 0x01 + ? grpc_fuzzer_get_next_string(&inp, nullptr) + : nullptr; + if (grpc_fuzzer_get_next_byte(&inp) & 0x01) { + // Test ALTS channel credentials. + grpc_alts_credentials_options* options = + grpc_alts_credentials_client_options_create(); + read_target_service_accounts(&inp, options); + grpc_channel_credentials* cred = grpc_alts_credentials_create_customized( + options, handshaker_service_url, enable_untrusted_alts); + if (!enable_untrusted_alts && !is_on_gcp) { + GPR_ASSERT(cred == nullptr); + } else { + GPR_ASSERT(cred != nullptr); + } + grpc_channel_credentials_release(cred); + grpc_alts_credentials_options_destroy(options); + } else { + // Test ALTS server credentials. + grpc_alts_credentials_options* options = + grpc_alts_credentials_server_options_create(); + grpc_server_credentials* cred = + grpc_alts_server_credentials_create_customized( + options, handshaker_service_url, enable_untrusted_alts); + if (!enable_untrusted_alts && !is_on_gcp) { + GPR_ASSERT(cred == nullptr); + } else { + GPR_ASSERT(cred != nullptr); + } + grpc_server_credentials_release(cred); + grpc_alts_credentials_options_destroy(options); + } + gpr_free(handshaker_service_url); + } + grpc_shutdown(); + if (leak_check) { + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); + GPR_ASSERT(counters.total_size_relative == 0); + } + return 0; +} diff --git a/test/core/security/corpus/alts_credentials_corpus/0149b46b88d583e05be0fb1423d10f2a14d36c48 b/test/core/security/corpus/alts_credentials_corpus/0149b46b88d583e05be0fb1423d10f2a14d36c48 new file mode 100644 index 0000000000..c062c7f179 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/0149b46b88d583e05be0fb1423d10f2a14d36c48 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/047fc351e73f760d329d5a8845944720be9ce773 b/test/core/security/corpus/alts_credentials_corpus/047fc351e73f760d329d5a8845944720be9ce773 new file mode 100644 index 0000000000..d943cfeacd Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/047fc351e73f760d329d5a8845944720be9ce773 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/04ef96c66d8222d1a2c07e6b2a6548e6a527042b b/test/core/security/corpus/alts_credentials_corpus/04ef96c66d8222d1a2c07e6b2a6548e6a527042b new file mode 100644 index 0000000000..e7346f33ef Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/04ef96c66d8222d1a2c07e6b2a6548e6a527042b differ diff --git a/test/core/security/corpus/alts_credentials_corpus/05a7e16c1d7f92111f43e9c777421879920e79a4 b/test/core/security/corpus/alts_credentials_corpus/05a7e16c1d7f92111f43e9c777421879920e79a4 new file mode 100644 index 0000000000..43b8b47d03 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/05a7e16c1d7f92111f43e9c777421879920e79a4 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/063eb46f202fdfe7935c30ca38d7eb81c82db419 b/test/core/security/corpus/alts_credentials_corpus/063eb46f202fdfe7935c30ca38d7eb81c82db419 new file mode 100644 index 0000000000..5b30f12418 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/063eb46f202fdfe7935c30ca38d7eb81c82db419 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/064773597c295fa871c184fc12d17b6de8aab31b b/test/core/security/corpus/alts_credentials_corpus/064773597c295fa871c184fc12d17b6de8aab31b new file mode 100644 index 0000000000..758709b022 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/064773597c295fa871c184fc12d17b6de8aab31b differ diff --git a/test/core/security/corpus/alts_credentials_corpus/087449740758b114d16790067707934479946bd6 b/test/core/security/corpus/alts_credentials_corpus/087449740758b114d16790067707934479946bd6 new file mode 100644 index 0000000000..099636f9ca Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/087449740758b114d16790067707934479946bd6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/0a5d068feb57a2782c6eba57b637abe8668ac82f b/test/core/security/corpus/alts_credentials_corpus/0a5d068feb57a2782c6eba57b637abe8668ac82f new file mode 100644 index 0000000000..fd7d7c8ebc Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/0a5d068feb57a2782c6eba57b637abe8668ac82f differ diff --git a/test/core/security/corpus/alts_credentials_corpus/0b81e6d89bf7df80e87e5ee7c49f7cc1431f77e8 b/test/core/security/corpus/alts_credentials_corpus/0b81e6d89bf7df80e87e5ee7c49f7cc1431f77e8 new file mode 100644 index 0000000000..a40664b4ef Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/0b81e6d89bf7df80e87e5ee7c49f7cc1431f77e8 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/11409339cec708a5e353893101bfe76364337d5c b/test/core/security/corpus/alts_credentials_corpus/11409339cec708a5e353893101bfe76364337d5c new file mode 100644 index 0000000000..c8b350d21c Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/11409339cec708a5e353893101bfe76364337d5c differ diff --git a/test/core/security/corpus/alts_credentials_corpus/147696a264cd6f197adb7c68aff834c30b1b77f8 b/test/core/security/corpus/alts_credentials_corpus/147696a264cd6f197adb7c68aff834c30b1b77f8 new file mode 100644 index 0000000000..5f68d8a10f --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/147696a264cd6f197adb7c68aff834c30b1b77f8 @@ -0,0 +1 @@ +ø+ú \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/160e5cac38c5c9e919ed6e4fbafee76907d63044 b/test/core/security/corpus/alts_credentials_corpus/160e5cac38c5c9e919ed6e4fbafee76907d63044 new file mode 100644 index 0000000000..c11ad6674d Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/160e5cac38c5c9e919ed6e4fbafee76907d63044 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/173d02167db431040b0540d98f6fc5e8b456587d b/test/core/security/corpus/alts_credentials_corpus/173d02167db431040b0540d98f6fc5e8b456587d new file mode 100644 index 0000000000..662cc9bc79 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/173d02167db431040b0540d98f6fc5e8b456587d @@ -0,0 +1 @@ +òÒÒ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/18a3fe239806b3c7d1af24bcd2bd23aeeb072d5c b/test/core/security/corpus/alts_credentials_corpus/18a3fe239806b3c7d1af24bcd2bd23aeeb072d5c new file mode 100644 index 0000000000..9239e10f44 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/18a3fe239806b3c7d1af24bcd2bd23aeeb072d5c differ diff --git a/test/core/security/corpus/alts_credentials_corpus/195abd83b2e9d32b1b5b854fe33da44b6db40880 b/test/core/security/corpus/alts_credentials_corpus/195abd83b2e9d32b1b5b854fe33da44b6db40880 new file mode 100644 index 0000000000..db7815ee2f --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/195abd83b2e9d32b1b5b854fe33da44b6db40880 @@ -0,0 +1 @@ +apÿì~!õìA~;ì \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/19af2509c7d84334b9ec64de4767a07d5294fd72 b/test/core/security/corpus/alts_credentials_corpus/19af2509c7d84334b9ec64de4767a07d5294fd72 new file mode 100644 index 0000000000..b87c814597 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/19af2509c7d84334b9ec64de4767a07d5294fd72 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/1b9864b948fcf08b062fd4401ef55b214c259535 b/test/core/security/corpus/alts_credentials_corpus/1b9864b948fcf08b062fd4401ef55b214c259535 new file mode 100644 index 0000000000..8cb97c5ea7 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/1b9864b948fcf08b062fd4401ef55b214c259535 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/1edddfa67de854d7faaba41418fda845e9c6a89d b/test/core/security/corpus/alts_credentials_corpus/1edddfa67de854d7faaba41418fda845e9c6a89d new file mode 100644 index 0000000000..035f07c06b Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/1edddfa67de854d7faaba41418fda845e9c6a89d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/20031bb00e6608e1b570aa96e6afb9de06d42167 b/test/core/security/corpus/alts_credentials_corpus/20031bb00e6608e1b570aa96e6afb9de06d42167 new file mode 100644 index 0000000000..27753dfa09 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/20031bb00e6608e1b570aa96e6afb9de06d42167 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/22b4c7ce7db99b0df63c9eae9265de484b695922 b/test/core/security/corpus/alts_credentials_corpus/22b4c7ce7db99b0df63c9eae9265de484b695922 new file mode 100644 index 0000000000..ab8f18d934 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/22b4c7ce7db99b0df63c9eae9265de484b695922 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/27416437ad287bd3cc1c5efdecebc39f20df73c1 b/test/core/security/corpus/alts_credentials_corpus/27416437ad287bd3cc1c5efdecebc39f20df73c1 new file mode 100644 index 0000000000..c400e3e3af --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/27416437ad287bd3cc1c5efdecebc39f20df73c1 @@ -0,0 +1 @@ +Ä=ļyyyyy‡†yyyyz \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/27e8cd785c2b9346f68dba75761b52fbabaf2b72 b/test/core/security/corpus/alts_credentials_corpus/27e8cd785c2b9346f68dba75761b52fbabaf2b72 new file mode 100644 index 0000000000..746dee96af Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/27e8cd785c2b9346f68dba75761b52fbabaf2b72 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/28236f860d3d8e5ea11176746cb4c1c5c4f1f6c0 b/test/core/security/corpus/alts_credentials_corpus/28236f860d3d8e5ea11176746cb4c1c5c4f1f6c0 new file mode 100644 index 0000000000..982c97b1ed Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/28236f860d3d8e5ea11176746cb4c1c5c4f1f6c0 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/29e15b492c5a409938092a30c003c5c34df7e283 b/test/core/security/corpus/alts_credentials_corpus/29e15b492c5a409938092a30c003c5c34df7e283 new file mode 100644 index 0000000000..c3e5b25e0d Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/29e15b492c5a409938092a30c003c5c34df7e283 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/2a47864d77749aa042b772895dbdf46f608ccc6d b/test/core/security/corpus/alts_credentials_corpus/2a47864d77749aa042b772895dbdf46f608ccc6d new file mode 100644 index 0000000000..141d94d982 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/2a47864d77749aa042b772895dbdf46f608ccc6d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/2cca5cb1b135c35f6e5e1ec4c37deb9e12d37dc0 b/test/core/security/corpus/alts_credentials_corpus/2cca5cb1b135c35f6e5e1ec4c37deb9e12d37dc0 new file mode 100644 index 0000000000..a956708b56 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/2cca5cb1b135c35f6e5e1ec4c37deb9e12d37dc0 @@ -0,0 +1,2 @@ +ï +ïï \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/2df27b6c42dbaee382a29a87338d64ee87354acb b/test/core/security/corpus/alts_credentials_corpus/2df27b6c42dbaee382a29a87338d64ee87354acb new file mode 100644 index 0000000000..a35f0e83cd Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/2df27b6c42dbaee382a29a87338d64ee87354acb differ diff --git a/test/core/security/corpus/alts_credentials_corpus/2e9ddd1339d8e599cef658a08965985c4f45e428 b/test/core/security/corpus/alts_credentials_corpus/2e9ddd1339d8e599cef658a08965985c4f45e428 new file mode 100644 index 0000000000..17c98e7ca0 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/2e9ddd1339d8e599cef658a08965985c4f45e428 @@ -0,0 +1,2 @@ +ï +ïe \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/31a2d12a84a7a56ace831a9668d6ab4847390679 b/test/core/security/corpus/alts_credentials_corpus/31a2d12a84a7a56ace831a9668d6ab4847390679 new file mode 100644 index 0000000000..745dc42bc0 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/31a2d12a84a7a56ace831a9668d6ab4847390679 @@ -0,0 +1,2 @@ +ï +ïé \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/33cb9ec0ce3538ed6079b5fcb127649a5d05955b b/test/core/security/corpus/alts_credentials_corpus/33cb9ec0ce3538ed6079b5fcb127649a5d05955b new file mode 100644 index 0000000000..293176466e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/33cb9ec0ce3538ed6079b5fcb127649a5d05955b differ diff --git a/test/core/security/corpus/alts_credentials_corpus/348d9ae6eebb2e1644addf7f07231d108cf6f3b8 b/test/core/security/corpus/alts_credentials_corpus/348d9ae6eebb2e1644addf7f07231d108cf6f3b8 new file mode 100644 index 0000000000..02326f0b69 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/348d9ae6eebb2e1644addf7f07231d108cf6f3b8 @@ -0,0 +1 @@ +òÒä \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/359f76f3c802292e92b0640de2bfe051e780a3b6 b/test/core/security/corpus/alts_credentials_corpus/359f76f3c802292e92b0640de2bfe051e780a3b6 new file mode 100644 index 0000000000..f31c54bad8 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/359f76f3c802292e92b0640de2bfe051e780a3b6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/35a479988e965a6e3e75138b64b0bd1f45073e2f b/test/core/security/corpus/alts_credentials_corpus/35a479988e965a6e3e75138b64b0bd1f45073e2f new file mode 100644 index 0000000000..4e44bcc27f Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/35a479988e965a6e3e75138b64b0bd1f45073e2f differ diff --git a/test/core/security/corpus/alts_credentials_corpus/362b00d713686ff70cb0199f3d7d0058e5a1a27a b/test/core/security/corpus/alts_credentials_corpus/362b00d713686ff70cb0199f3d7d0058e5a1a27a new file mode 100644 index 0000000000..3e22fca175 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/362b00d713686ff70cb0199f3d7d0058e5a1a27a differ diff --git a/test/core/security/corpus/alts_credentials_corpus/3849c1625071791ceae709b9c6c705b28d099d67 b/test/core/security/corpus/alts_credentials_corpus/3849c1625071791ceae709b9c6c705b28d099d67 new file mode 100644 index 0000000000..5bc905de15 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/3849c1625071791ceae709b9c6c705b28d099d67 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/39ef03c66ee2d4bcfb6c8da50486dcd40f02fb12 b/test/core/security/corpus/alts_credentials_corpus/39ef03c66ee2d4bcfb6c8da50486dcd40f02fb12 new file mode 100644 index 0000000000..467004c97d Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/39ef03c66ee2d4bcfb6c8da50486dcd40f02fb12 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/3a3ca061863499ebc171a4f910fa1b49523baad4 b/test/core/security/corpus/alts_credentials_corpus/3a3ca061863499ebc171a4f910fa1b49523baad4 new file mode 100644 index 0000000000..97f09bf5c7 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/3a3ca061863499ebc171a4f910fa1b49523baad4 @@ -0,0 +1 @@ +úÒû9 \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/3a890f3fd01b048ac9db65a9a9b4f4443268b91a b/test/core/security/corpus/alts_credentials_corpus/3a890f3fd01b048ac9db65a9a9b4f4443268b91a new file mode 100644 index 0000000000..97b05e80ba Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/3a890f3fd01b048ac9db65a9a9b4f4443268b91a differ diff --git a/test/core/security/corpus/alts_credentials_corpus/3b9554038a425bd1fae057ba41f9366bb467e946 b/test/core/security/corpus/alts_credentials_corpus/3b9554038a425bd1fae057ba41f9366bb467e946 new file mode 100644 index 0000000000..d0ef6342d0 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/3b9554038a425bd1fae057ba41f9366bb467e946 @@ -0,0 +1 @@ +„ÜðððððððððððððððððððððððððððÔððððòððððððÔÜÜÜ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/3ce0ae4aa226f205a3a4e66bbb253419d9d754bf b/test/core/security/corpus/alts_credentials_corpus/3ce0ae4aa226f205a3a4e66bbb253419d9d754bf new file mode 100644 index 0000000000..08e6df0ee2 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/3ce0ae4aa226f205a3a4e66bbb253419d9d754bf differ diff --git a/test/core/security/corpus/alts_credentials_corpus/3dccc5523986c37e27684659bba8a1037e7a92e8 b/test/core/security/corpus/alts_credentials_corpus/3dccc5523986c37e27684659bba8a1037e7a92e8 new file mode 100644 index 0000000000..09b735e831 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/3dccc5523986c37e27684659bba8a1037e7a92e8 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/3e0908c15b1cede4541d25f388b1345e8641e221 b/test/core/security/corpus/alts_credentials_corpus/3e0908c15b1cede4541d25f388b1345e8641e221 new file mode 100644 index 0000000000..eabd458c03 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/3e0908c15b1cede4541d25f388b1345e8641e221 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/3fcb181ff6a8c8e2ba38ed34cf78f7482eb55cb7 b/test/core/security/corpus/alts_credentials_corpus/3fcb181ff6a8c8e2ba38ed34cf78f7482eb55cb7 new file mode 100644 index 0000000000..bbef93b5ad Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/3fcb181ff6a8c8e2ba38ed34cf78f7482eb55cb7 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/41c9b5f720eb8f8fa04c840375a881781a849b43 b/test/core/security/corpus/alts_credentials_corpus/41c9b5f720eb8f8fa04c840375a881781a849b43 new file mode 100644 index 0000000000..d611c732db Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/41c9b5f720eb8f8fa04c840375a881781a849b43 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/4257a018f08f13a3a9adc848ef808e1be50bc4cf b/test/core/security/corpus/alts_credentials_corpus/4257a018f08f13a3a9adc848ef808e1be50bc4cf new file mode 100644 index 0000000000..607c97117a --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/4257a018f08f13a3a9adc848ef808e1be50bc4cf @@ -0,0 +1,2 @@ +òÓ99999999999999999999999999999999999¬¬¬¬¬¬¬¬¬ÿÿÿÿÿÿÿÿÿÿÿÿÿ/////ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ +ÿÿÿÿÿÿÿÿÿÿ²²²²²²²ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNSt6locale5 \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/42dfc5c4d13261b7259e65cd692df9c9d607194e b/test/core/security/corpus/alts_credentials_corpus/42dfc5c4d13261b7259e65cd692df9c9d607194e new file mode 100644 index 0000000000..48ffa853fb Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/42dfc5c4d13261b7259e65cd692df9c9d607194e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/43144664aedb585d45d42aa5249ddbfe81afe470 b/test/core/security/corpus/alts_credentials_corpus/43144664aedb585d45d42aa5249ddbfe81afe470 new file mode 100644 index 0000000000..fee2672260 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/43144664aedb585d45d42aa5249ddbfe81afe470 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/43e5ad495a47593b17dbcbd3e70c2e25a417bb6e b/test/core/security/corpus/alts_credentials_corpus/43e5ad495a47593b17dbcbd3e70c2e25a417bb6e new file mode 100644 index 0000000000..32ffc96267 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/43e5ad495a47593b17dbcbd3e70c2e25a417bb6e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/446614e45b7bef49118b17e031c48faf167ebe3e b/test/core/security/corpus/alts_credentials_corpus/446614e45b7bef49118b17e031c48faf167ebe3e new file mode 100644 index 0000000000..849aadf08a Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/446614e45b7bef49118b17e031c48faf167ebe3e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/46492477fa84ca88e85df914801af0b09b0939f6 b/test/core/security/corpus/alts_credentials_corpus/46492477fa84ca88e85df914801af0b09b0939f6 new file mode 100644 index 0000000000..98885bcde8 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/46492477fa84ca88e85df914801af0b09b0939f6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/47157f83b166b57e0052c98a65c6db864fa6cb9b b/test/core/security/corpus/alts_credentials_corpus/47157f83b166b57e0052c98a65c6db864fa6cb9b new file mode 100644 index 0000000000..fad1e0faf1 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/47157f83b166b57e0052c98a65c6db864fa6cb9b differ diff --git a/test/core/security/corpus/alts_credentials_corpus/473fc9b6d768a925527d3ad805ca363d490dc741 b/test/core/security/corpus/alts_credentials_corpus/473fc9b6d768a925527d3ad805ca363d490dc741 new file mode 100644 index 0000000000..1775a17df6 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/473fc9b6d768a925527d3ad805ca363d490dc741 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/483c0b4015100eee00f6b23d1100d8c4953dd3b1 b/test/core/security/corpus/alts_credentials_corpus/483c0b4015100eee00f6b23d1100d8c4953dd3b1 new file mode 100644 index 0000000000..2d52687fda Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/483c0b4015100eee00f6b23d1100d8c4953dd3b1 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/48be2dc4cdc5462407b319caa855d976cda88153 b/test/core/security/corpus/alts_credentials_corpus/48be2dc4cdc5462407b319caa855d976cda88153 new file mode 100644 index 0000000000..c1c2cd98cf Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/48be2dc4cdc5462407b319caa855d976cda88153 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/4e84eb54a0e438052b0c2e83653135042d9eb59a b/test/core/security/corpus/alts_credentials_corpus/4e84eb54a0e438052b0c2e83653135042d9eb59a new file mode 100644 index 0000000000..66b525f713 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/4e84eb54a0e438052b0c2e83653135042d9eb59a @@ -0,0 +1 @@ +òÒ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/50839d5c8bf33f0970986dcc4b73b024f11a95b7 b/test/core/security/corpus/alts_credentials_corpus/50839d5c8bf33f0970986dcc4b73b024f11a95b7 new file mode 100644 index 0000000000..9673f73c62 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/50839d5c8bf33f0970986dcc4b73b024f11a95b7 @@ -0,0 +1 @@ +òÿt_Ó ÿÿÿÿÿæææ&ææææææææææææææææææææææÿÿÿÿÿÿÿÿÿÿûÿÿÿÿÿÿÿÜ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/523d964986d8ad966ae07e540a608681098813f9 b/test/core/security/corpus/alts_credentials_corpus/523d964986d8ad966ae07e540a608681098813f9 new file mode 100644 index 0000000000..06e05df73e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/523d964986d8ad966ae07e540a608681098813f9 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/5410b8190c95dacd36d6e6ec75b7538a630e08de b/test/core/security/corpus/alts_credentials_corpus/5410b8190c95dacd36d6e6ec75b7538a630e08de new file mode 100644 index 0000000000..4579c6fff2 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/5410b8190c95dacd36d6e6ec75b7538a630e08de differ diff --git a/test/core/security/corpus/alts_credentials_corpus/549b2891ac79f504a7c9ea00f6d7527c34ce04e6 b/test/core/security/corpus/alts_credentials_corpus/549b2891ac79f504a7c9ea00f6d7527c34ce04e6 new file mode 100644 index 0000000000..6f1a9ed509 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/549b2891ac79f504a7c9ea00f6d7527c34ce04e6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/55321649e7b7f1b5664ae20724e683c930643fc4 b/test/core/security/corpus/alts_credentials_corpus/55321649e7b7f1b5664ae20724e683c930643fc4 new file mode 100644 index 0000000000..e38fd28e17 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/55321649e7b7f1b5664ae20724e683c930643fc4 @@ -0,0 +1 @@ +ò)Ò \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/55cc52f25865baee3e6e52c3110a9723caa2b3cb b/test/core/security/corpus/alts_credentials_corpus/55cc52f25865baee3e6e52c3110a9723caa2b3cb new file mode 100644 index 0000000000..aae2fe5fe0 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/55cc52f25865baee3e6e52c3110a9723caa2b3cb @@ -0,0 +1 @@ +òÒÎ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/56c22410e3295ad03aa31552ab888f581756cc17 b/test/core/security/corpus/alts_credentials_corpus/56c22410e3295ad03aa31552ab888f581756cc17 new file mode 100644 index 0000000000..e5d7cf9d5d Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/56c22410e3295ad03aa31552ab888f581756cc17 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/5724a705b62a7548ba2df1abe4ef0c970c4e1bd2 b/test/core/security/corpus/alts_credentials_corpus/5724a705b62a7548ba2df1abe4ef0c970c4e1bd2 new file mode 100644 index 0000000000..b0875c947b Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/5724a705b62a7548ba2df1abe4ef0c970c4e1bd2 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/576a148c107d56861d1611641a6f7c7921061c5c b/test/core/security/corpus/alts_credentials_corpus/576a148c107d56861d1611641a6f7c7921061c5c new file mode 100644 index 0000000000..6d91b58071 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/576a148c107d56861d1611641a6f7c7921061c5c differ diff --git a/test/core/security/corpus/alts_credentials_corpus/5a6b8263e8939f851cf5b1e347a33d97253b7b3d b/test/core/security/corpus/alts_credentials_corpus/5a6b8263e8939f851cf5b1e347a33d97253b7b3d new file mode 100644 index 0000000000..add56cac16 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/5a6b8263e8939f851cf5b1e347a33d97253b7b3d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/5ba93c9db0cff93f52b521d7420e43f6eda2784f b/test/core/security/corpus/alts_credentials_corpus/5ba93c9db0cff93f52b521d7420e43f6eda2784f new file mode 100644 index 0000000000..f76dd238ad Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/5ba93c9db0cff93f52b521d7420e43f6eda2784f differ diff --git a/test/core/security/corpus/alts_credentials_corpus/5bd02a339fd7705449388580c75bfcc597aba954 b/test/core/security/corpus/alts_credentials_corpus/5bd02a339fd7705449388580c75bfcc597aba954 new file mode 100644 index 0000000000..f450932939 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/5bd02a339fd7705449388580c75bfcc597aba954 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/5bd6fb6fc4163bf3a9db6ddaf509dce8df8a5000 b/test/core/security/corpus/alts_credentials_corpus/5bd6fb6fc4163bf3a9db6ddaf509dce8df8a5000 new file mode 100644 index 0000000000..aea3da6970 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/5bd6fb6fc4163bf3a9db6ddaf509dce8df8a5000 @@ -0,0 +1 @@ +)applea.ÿÿÿÿ„ÜÜ.ÿßÿÿÿÿÿÜÿÿÿÜÿÿ„ÜÜ. \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/5d06fc38005503af3d084721c60e574fb9d2f370 b/test/core/security/corpus/alts_credentials_corpus/5d06fc38005503af3d084721c60e574fb9d2f370 new file mode 100644 index 0000000000..42eb673e51 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/5d06fc38005503af3d084721c60e574fb9d2f370 @@ -0,0 +1 @@ +ÓÓ× \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/5ddc10489ff3269bdaa3051b70fb7af455ee1104 b/test/core/security/corpus/alts_credentials_corpus/5ddc10489ff3269bdaa3051b70fb7af455ee1104 new file mode 100644 index 0000000000..79db88a7b3 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/5ddc10489ff3269bdaa3051b70fb7af455ee1104 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/5ea9d515f0d10b04f1356b9463139bfe121a6e4a b/test/core/security/corpus/alts_credentials_corpus/5ea9d515f0d10b04f1356b9463139bfe121a6e4a new file mode 100644 index 0000000000..7efb47e7c8 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/5ea9d515f0d10b04f1356b9463139bfe121a6e4a differ diff --git a/test/core/security/corpus/alts_credentials_corpus/61c449793347cf2e1ed0c38d54d23c63dfaabeb8 b/test/core/security/corpus/alts_credentials_corpus/61c449793347cf2e1ed0c38d54d23c63dfaabeb8 new file mode 100644 index 0000000000..96031be7fc --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/61c449793347cf2e1ed0c38d54d23c63dfaabeb8 @@ -0,0 +1 @@ +òÿÿÿÿÿÿÿÿÿÿÿÿÿÿÝÿÿÿÿÿÿÿÿÿÿÿÿÿÿ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/6287389c373e9788dcc04f9747b4be1fd1ef3028 b/test/core/security/corpus/alts_credentials_corpus/6287389c373e9788dcc04f9747b4be1fd1ef3028 new file mode 100644 index 0000000000..799bd0e6b0 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/6287389c373e9788dcc04f9747b4be1fd1ef3028 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/64d4de4d5aafab7ec388a7fe83066c1a4d1d9d68 b/test/core/security/corpus/alts_credentials_corpus/64d4de4d5aafab7ec388a7fe83066c1a4d1d9d68 new file mode 100644 index 0000000000..2e91965059 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/64d4de4d5aafab7ec388a7fe83066c1a4d1d9d68 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/651c37806d2ac579dcfc97643c3c1ea74dbb8774 b/test/core/security/corpus/alts_credentials_corpus/651c37806d2ac579dcfc97643c3c1ea74dbb8774 new file mode 100644 index 0000000000..618e514ec3 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/651c37806d2ac579dcfc97643c3c1ea74dbb8774 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/6551d02d20573cfa2944ec1f12b0c01f264a1326 b/test/core/security/corpus/alts_credentials_corpus/6551d02d20573cfa2944ec1f12b0c01f264a1326 new file mode 100644 index 0000000000..98056c073e --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/6551d02d20573cfa2944ec1f12b0c01f264a1326 @@ -0,0 +1 @@ +‚s \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/65f029414ee10e45ff4b9f305f7b472364cea538 b/test/core/security/corpus/alts_credentials_corpus/65f029414ee10e45ff4b9f305f7b472364cea538 new file mode 100644 index 0000000000..1c3a1a0d28 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/65f029414ee10e45ff4b9f305f7b472364cea538 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/68b75a17fe2db060df3e61a597650ba99079abbf b/test/core/security/corpus/alts_credentials_corpus/68b75a17fe2db060df3e61a597650ba99079abbf new file mode 100644 index 0000000000..327dd390b9 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/68b75a17fe2db060df3e61a597650ba99079abbf differ diff --git a/test/core/security/corpus/alts_credentials_corpus/69e80594dbc5c4c648e39883a650b1760f20ab63 b/test/core/security/corpus/alts_credentials_corpus/69e80594dbc5c4c648e39883a650b1760f20ab63 new file mode 100644 index 0000000000..740b987b48 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/69e80594dbc5c4c648e39883a650b1760f20ab63 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/6cb47d0e640b4c41e32f13c0d64ee46eae1b80b5 b/test/core/security/corpus/alts_credentials_corpus/6cb47d0e640b4c41e32f13c0d64ee46eae1b80b5 new file mode 100644 index 0000000000..b22a010648 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/6cb47d0e640b4c41e32f13c0d64ee46eae1b80b5 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/6da5fe063432cb9094c7c083efdbbe5ba4246d18 b/test/core/security/corpus/alts_credentials_corpus/6da5fe063432cb9094c7c083efdbbe5ba4246d18 new file mode 100644 index 0000000000..993620ed92 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/6da5fe063432cb9094c7c083efdbbe5ba4246d18 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/6dd140da774d85f272fb587dc1b2a85d881a7c21 b/test/core/security/corpus/alts_credentials_corpus/6dd140da774d85f272fb587dc1b2a85d881a7c21 new file mode 100644 index 0000000000..d838739e6c Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/6dd140da774d85f272fb587dc1b2a85d881a7c21 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/6ddab273597d73be49e2307d68e00fa18bba4765 b/test/core/security/corpus/alts_credentials_corpus/6ddab273597d73be49e2307d68e00fa18bba4765 new file mode 100644 index 0000000000..3e74467a38 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/6ddab273597d73be49e2307d68e00fa18bba4765 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/6eaf85d84fbf47ea0619d0dba8d366f4e3ff0be6 b/test/core/security/corpus/alts_credentials_corpus/6eaf85d84fbf47ea0619d0dba8d366f4e3ff0be6 new file mode 100644 index 0000000000..42cddf7419 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/6eaf85d84fbf47ea0619d0dba8d366f4e3ff0be6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/6f751cc09af8113f6ecd491b1830bd8454c4738d b/test/core/security/corpus/alts_credentials_corpus/6f751cc09af8113f6ecd491b1830bd8454c4738d new file mode 100644 index 0000000000..a51a3d0f6c Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/6f751cc09af8113f6ecd491b1830bd8454c4738d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/70d9eb29a70d483d07e2faca6b00098af78d1fff b/test/core/security/corpus/alts_credentials_corpus/70d9eb29a70d483d07e2faca6b00098af78d1fff new file mode 100644 index 0000000000..e9fb9b9317 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/70d9eb29a70d483d07e2faca6b00098af78d1fff differ diff --git a/test/core/security/corpus/alts_credentials_corpus/7192effa1058382b379fb7b87f1acad5ac554d05 b/test/core/security/corpus/alts_credentials_corpus/7192effa1058382b379fb7b87f1acad5ac554d05 new file mode 100644 index 0000000000..23a3819ebe Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/7192effa1058382b379fb7b87f1acad5ac554d05 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/730e85d6a62e70cb6721009b903782ade4ff73a2 b/test/core/security/corpus/alts_credentials_corpus/730e85d6a62e70cb6721009b903782ade4ff73a2 new file mode 100644 index 0000000000..9c1e71c549 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/730e85d6a62e70cb6721009b903782ade4ff73a2 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/74002471a854059cb29de7cad8f9fb7adc3c5ec2 b/test/core/security/corpus/alts_credentials_corpus/74002471a854059cb29de7cad8f9fb7adc3c5ec2 new file mode 100644 index 0000000000..bb832313c7 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/74002471a854059cb29de7cad8f9fb7adc3c5ec2 @@ -0,0 +1,2 @@ + +¡Š \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/747f2330cd1fc4a06d54b376a9a6528d0364f0ac b/test/core/security/corpus/alts_credentials_corpus/747f2330cd1fc4a06d54b376a9a6528d0364f0ac new file mode 100644 index 0000000000..332ac4b672 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/747f2330cd1fc4a06d54b376a9a6528d0364f0ac differ diff --git a/test/core/security/corpus/alts_credentials_corpus/749d5d7a9e0b1545b297117e834462af32b3e230 b/test/core/security/corpus/alts_credentials_corpus/749d5d7a9e0b1545b297117e834462af32b3e230 new file mode 100644 index 0000000000..a00db592b0 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/749d5d7a9e0b1545b297117e834462af32b3e230 @@ -0,0 +1 @@ +aèÿÿ+ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/77de0b1de120ac702ca45868b1008a48626daf12 b/test/core/security/corpus/alts_credentials_corpus/77de0b1de120ac702ca45868b1008a48626daf12 new file mode 100644 index 0000000000..352762cf75 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/77de0b1de120ac702ca45868b1008a48626daf12 @@ -0,0 +1 @@ +òÒ^ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/792c67398bce19a4eeda32653c994436e79456e5 b/test/core/security/corpus/alts_credentials_corpus/792c67398bce19a4eeda32653c994436e79456e5 new file mode 100644 index 0000000000..08342871da --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/792c67398bce19a4eeda32653c994436e79456e5 @@ -0,0 +1 @@ +jþ ù \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/7a3022b248c8960289e4c80c7cc8df409499e5da b/test/core/security/corpus/alts_credentials_corpus/7a3022b248c8960289e4c80c7cc8df409499e5da new file mode 100644 index 0000000000..f9ef6a4631 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/7a3022b248c8960289e4c80c7cc8df409499e5da differ diff --git a/test/core/security/corpus/alts_credentials_corpus/7a9372081294a6fbd3fecdd91b99589c98d4948e b/test/core/security/corpus/alts_credentials_corpus/7a9372081294a6fbd3fecdd91b99589c98d4948e new file mode 100644 index 0000000000..7100f32821 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/7a9372081294a6fbd3fecdd91b99589c98d4948e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/7bbe4ba828947550f4ad089d5989cb695ecbdb1b b/test/core/security/corpus/alts_credentials_corpus/7bbe4ba828947550f4ad089d5989cb695ecbdb1b new file mode 100644 index 0000000000..44e3963031 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/7bbe4ba828947550f4ad089d5989cb695ecbdb1b differ diff --git a/test/core/security/corpus/alts_credentials_corpus/7f1ad514a96f0c3d5ca5d6f7880b929a65eeae96 b/test/core/security/corpus/alts_credentials_corpus/7f1ad514a96f0c3d5ca5d6f7880b929a65eeae96 new file mode 100644 index 0000000000..700c079449 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/7f1ad514a96f0c3d5ca5d6f7880b929a65eeae96 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/7f2b075f0b6707c38db851747e2578343eeab286 b/test/core/security/corpus/alts_credentials_corpus/7f2b075f0b6707c38db851747e2578343eeab286 new file mode 100644 index 0000000000..1f7b5d72ac Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/7f2b075f0b6707c38db851747e2578343eeab286 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/81ebc64bfde3fad37af5a58ef7f1c5c3c54c4b5d b/test/core/security/corpus/alts_credentials_corpus/81ebc64bfde3fad37af5a58ef7f1c5c3c54c4b5d new file mode 100644 index 0000000000..d89f30fd4c Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/81ebc64bfde3fad37af5a58ef7f1c5c3c54c4b5d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/82fae081afaea13831404024d39658344d56e1c6 b/test/core/security/corpus/alts_credentials_corpus/82fae081afaea13831404024d39658344d56e1c6 new file mode 100644 index 0000000000..bc3cfc241f Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/82fae081afaea13831404024d39658344d56e1c6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/83ba41cea1adab707f7f213af5e2ed734bdddc25 b/test/core/security/corpus/alts_credentials_corpus/83ba41cea1adab707f7f213af5e2ed734bdddc25 new file mode 100644 index 0000000000..d465fb4977 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/83ba41cea1adab707f7f213af5e2ed734bdddc25 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/841a3f66c94e5acd836a44cd5a8514d4ad45d83e b/test/core/security/corpus/alts_credentials_corpus/841a3f66c94e5acd836a44cd5a8514d4ad45d83e new file mode 100644 index 0000000000..cbb7bdcaf8 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/841a3f66c94e5acd836a44cd5a8514d4ad45d83e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/841ef94ee0f1b0b45983d95b75aba25421d73f2c b/test/core/security/corpus/alts_credentials_corpus/841ef94ee0f1b0b45983d95b75aba25421d73f2c new file mode 100644 index 0000000000..ba85d1d67e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/841ef94ee0f1b0b45983d95b75aba25421d73f2c differ diff --git a/test/core/security/corpus/alts_credentials_corpus/843b0aad4a9707c5dcc92d12d876b78675cfcb65 b/test/core/security/corpus/alts_credentials_corpus/843b0aad4a9707c5dcc92d12d876b78675cfcb65 new file mode 100644 index 0000000000..02d61c52aa Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/843b0aad4a9707c5dcc92d12d876b78675cfcb65 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/8483e3d92eda8df504b1d1d0d012f4bcd778cd33 b/test/core/security/corpus/alts_credentials_corpus/8483e3d92eda8df504b1d1d0d012f4bcd778cd33 new file mode 100644 index 0000000000..3795466779 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/8483e3d92eda8df504b1d1d0d012f4bcd778cd33 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/876830fdff4e59038fa2173b700faef5bffe61de b/test/core/security/corpus/alts_credentials_corpus/876830fdff4e59038fa2173b700faef5bffe61de new file mode 100644 index 0000000000..26048bd593 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/876830fdff4e59038fa2173b700faef5bffe61de @@ -0,0 +1 @@ +òÒA \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/87ca3342fdce0c1f678a3f1b62428032ef51442d b/test/core/security/corpus/alts_credentials_corpus/87ca3342fdce0c1f678a3f1b62428032ef51442d new file mode 100644 index 0000000000..ea35b452ca Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/87ca3342fdce0c1f678a3f1b62428032ef51442d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/87d044027cdb7d35fadb56532f497764246946a6 b/test/core/security/corpus/alts_credentials_corpus/87d044027cdb7d35fadb56532f497764246946a6 new file mode 100644 index 0000000000..1e474c9134 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/87d044027cdb7d35fadb56532f497764246946a6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/88ce75ba18bdb7e93a81197d850f4e792f6a8155 b/test/core/security/corpus/alts_credentials_corpus/88ce75ba18bdb7e93a81197d850f4e792f6a8155 new file mode 100644 index 0000000000..70c9ab1fc5 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/88ce75ba18bdb7e93a81197d850f4e792f6a8155 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/89dc55e8e20e811e78c952c8bd2c16f55fe72f57 b/test/core/security/corpus/alts_credentials_corpus/89dc55e8e20e811e78c952c8bd2c16f55fe72f57 new file mode 100644 index 0000000000..00961fdf9e --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/89dc55e8e20e811e78c952c8bd2c16f55fe72f57 @@ -0,0 +1 @@ +òÒŽ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/8a215a58908f44bdced595ceb01a81977f1d72f0 b/test/core/security/corpus/alts_credentials_corpus/8a215a58908f44bdced595ceb01a81977f1d72f0 new file mode 100644 index 0000000000..296f8b7a24 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/8a215a58908f44bdced595ceb01a81977f1d72f0 @@ -0,0 +1 @@ +Ä=ÒÄ=)†††††††ÄÄÄÄÄÄ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/8ac7459e918304ca40b1cf29a3ac0f555eada678 b/test/core/security/corpus/alts_credentials_corpus/8ac7459e918304ca40b1cf29a3ac0f555eada678 new file mode 100644 index 0000000000..629a6f95a2 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/8ac7459e918304ca40b1cf29a3ac0f555eada678 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/8b93e50a911f3ea0e0b0377ba4636574f2ee9a5e b/test/core/security/corpus/alts_credentials_corpus/8b93e50a911f3ea0e0b0377ba4636574f2ee9a5e new file mode 100644 index 0000000000..280aecfb9a Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/8b93e50a911f3ea0e0b0377ba4636574f2ee9a5e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/8c9ec0ffd803505772693833d56e7a02110645b3 b/test/core/security/corpus/alts_credentials_corpus/8c9ec0ffd803505772693833d56e7a02110645b3 new file mode 100644 index 0000000000..3bd046b7f9 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/8c9ec0ffd803505772693833d56e7a02110645b3 @@ -0,0 +1 @@ +K]//( \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/8e4b361a530dc6825afcfb4106bd482c3fd010fa b/test/core/security/corpus/alts_credentials_corpus/8e4b361a530dc6825afcfb4106bd482c3fd010fa new file mode 100644 index 0000000000..3733df9e3c --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/8e4b361a530dc6825afcfb4106bd482c3fd010fa @@ -0,0 +1 @@ +òÒÝ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/8f6690d97bcda890f2a5b2930a2b7a4d7b56c6e7 b/test/core/security/corpus/alts_credentials_corpus/8f6690d97bcda890f2a5b2930a2b7a4d7b56c6e7 new file mode 100644 index 0000000000..7885e1effb --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/8f6690d97bcda890f2a5b2930a2b7a4d7b56c6e7 @@ -0,0 +1 @@ +òÒÝ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/917636de2c14dce2580d4308249a94d61d62c305 b/test/core/security/corpus/alts_credentials_corpus/917636de2c14dce2580d4308249a94d61d62c305 new file mode 100644 index 0000000000..cccb20d847 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/917636de2c14dce2580d4308249a94d61d62c305 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/91f11008defda918951bda868cc68c6373fb0e6a b/test/core/security/corpus/alts_credentials_corpus/91f11008defda918951bda868cc68c6373fb0e6a new file mode 100644 index 0000000000..bf10853bfb Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/91f11008defda918951bda868cc68c6373fb0e6a differ diff --git a/test/core/security/corpus/alts_credentials_corpus/92e01a34047b660a798086d55a3d8d7100a01939 b/test/core/security/corpus/alts_credentials_corpus/92e01a34047b660a798086d55a3d8d7100a01939 new file mode 100644 index 0000000000..e86bc1d589 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/92e01a34047b660a798086d55a3d8d7100a01939 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/963fafadb4de09dee0e6a852bd61b1740039a465 b/test/core/security/corpus/alts_credentials_corpus/963fafadb4de09dee0e6a852bd61b1740039a465 new file mode 100644 index 0000000000..8933b18c72 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/963fafadb4de09dee0e6a852bd61b1740039a465 @@ -0,0 +1 @@ +ê \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/97bf33ec97b93fcc2449431915911a55b906e3b6 b/test/core/security/corpus/alts_credentials_corpus/97bf33ec97b93fcc2449431915911a55b906e3b6 new file mode 100644 index 0000000000..8101e3720d --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/97bf33ec97b93fcc2449431915911a55b906e3b6 @@ -0,0 +1 @@ +òÓÓÒ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/99e31e12b02b02479d10b2c08426906bd93a0840 b/test/core/security/corpus/alts_credentials_corpus/99e31e12b02b02479d10b2c08426906bd93a0840 new file mode 100644 index 0000000000..9fe2a6a137 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/99e31e12b02b02479d10b2c08426906bd93a0840 @@ -0,0 +1 @@ +òÓÓÒ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/9a75ce693e7259d4d3bb9203dfc0a65f8bbaa466 b/test/core/security/corpus/alts_credentials_corpus/9a75ce693e7259d4d3bb9203dfc0a65f8bbaa466 new file mode 100644 index 0000000000..5366cdd4a6 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/9a75ce693e7259d4d3bb9203dfc0a65f8bbaa466 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/9ac0d956f9743e026baad7319ba2a75d9f1a534f b/test/core/security/corpus/alts_credentials_corpus/9ac0d956f9743e026baad7319ba2a75d9f1a534f new file mode 100644 index 0000000000..adb0583eb6 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/9ac0d956f9743e026baad7319ba2a75d9f1a534f differ diff --git a/test/core/security/corpus/alts_credentials_corpus/9ae56d4451dd3e1b66ddc250d84dbf6d8cae0dbd b/test/core/security/corpus/alts_credentials_corpus/9ae56d4451dd3e1b66ddc250d84dbf6d8cae0dbd new file mode 100644 index 0000000000..121d0cb5d6 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/9ae56d4451dd3e1b66ddc250d84dbf6d8cae0dbd differ diff --git a/test/core/security/corpus/alts_credentials_corpus/9b9a3a1e4023c9b172060249752a482a3437ef2a b/test/core/security/corpus/alts_credentials_corpus/9b9a3a1e4023c9b172060249752a482a3437ef2a new file mode 100644 index 0000000000..0b19f19a43 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/9b9a3a1e4023c9b172060249752a482a3437ef2a differ diff --git a/test/core/security/corpus/alts_credentials_corpus/9c81164e10bf612c352dca3ecabf57743b451d42 b/test/core/security/corpus/alts_credentials_corpus/9c81164e10bf612c352dca3ecabf57743b451d42 new file mode 100644 index 0000000000..1cae116cff --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/9c81164e10bf612c352dca3ecabf57743b451d42 @@ -0,0 +1,2 @@ + +z \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/9d8b420b5d32deb0140ab91eeebba58ca6163722 b/test/core/security/corpus/alts_credentials_corpus/9d8b420b5d32deb0140ab91eeebba58ca6163722 new file mode 100644 index 0000000000..6d0f80948e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/9d8b420b5d32deb0140ab91eeebba58ca6163722 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/9de687bf1e2cfac54c3b2e2eb85b53014a460ff7 b/test/core/security/corpus/alts_credentials_corpus/9de687bf1e2cfac54c3b2e2eb85b53014a460ff7 new file mode 100644 index 0000000000..789f59cd27 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/9de687bf1e2cfac54c3b2e2eb85b53014a460ff7 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/9f3cda19a186bd11bfac361b464f92daa129a33b b/test/core/security/corpus/alts_credentials_corpus/9f3cda19a186bd11bfac361b464f92daa129a33b new file mode 100644 index 0000000000..61347c386e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/9f3cda19a186bd11bfac361b464f92daa129a33b differ diff --git a/test/core/security/corpus/alts_credentials_corpus/a14fc6a608121f8abf0fe25cf466720f00f25653 b/test/core/security/corpus/alts_credentials_corpus/a14fc6a608121f8abf0fe25cf466720f00f25653 new file mode 100644 index 0000000000..58af76210a Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/a14fc6a608121f8abf0fe25cf466720f00f25653 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/a39906074669a6b76a35b0adf2bf36ad751f3b35 b/test/core/security/corpus/alts_credentials_corpus/a39906074669a6b76a35b0adf2bf36ad751f3b35 new file mode 100644 index 0000000000..e10cdb997e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/a39906074669a6b76a35b0adf2bf36ad751f3b35 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/a454ca483b4a66b83826d061be2859dd79ff0d6c b/test/core/security/corpus/alts_credentials_corpus/a454ca483b4a66b83826d061be2859dd79ff0d6c new file mode 100644 index 0000000000..38424fc7a2 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/a454ca483b4a66b83826d061be2859dd79ff0d6c differ diff --git a/test/core/security/corpus/alts_credentials_corpus/a52df5607370ff0f56d821000f3d5e386a01d489 b/test/core/security/corpus/alts_credentials_corpus/a52df5607370ff0f56d821000f3d5e386a01d489 new file mode 100644 index 0000000000..f16da079ed --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/a52df5607370ff0f56d821000f3d5e386a01d489 @@ -0,0 +1 @@ +úÒû; \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/a56eaf47f7c7263e53efdc55ec39063dbb4ae71c b/test/core/security/corpus/alts_credentials_corpus/a56eaf47f7c7263e53efdc55ec39063dbb4ae71c new file mode 100644 index 0000000000..3664ce0f99 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/a56eaf47f7c7263e53efdc55ec39063dbb4ae71c differ diff --git a/test/core/security/corpus/alts_credentials_corpus/a79249fb8f7d53f0a280359d2d9df31594adbdfc b/test/core/security/corpus/alts_credentials_corpus/a79249fb8f7d53f0a280359d2d9df31594adbdfc new file mode 100644 index 0000000000..d7f1f455b1 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/a79249fb8f7d53f0a280359d2d9df31594adbdfc differ diff --git a/test/core/security/corpus/alts_credentials_corpus/aa98a46f25004f7436aadb36ff8b7f07ed7bfce1 b/test/core/security/corpus/alts_credentials_corpus/aa98a46f25004f7436aadb36ff8b7f07ed7bfce1 new file mode 100644 index 0000000000..f1db8d9f2c --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/aa98a46f25004f7436aadb36ff8b7f07ed7bfce1 @@ -0,0 +1 @@ +ap“ž’/òÒ+ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/adc83b19e793491b1c6ea0fd8b46cd9f32e592fc b/test/core/security/corpus/alts_credentials_corpus/adc83b19e793491b1c6ea0fd8b46cd9f32e592fc new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/adc83b19e793491b1c6ea0fd8b46cd9f32e592fc @@ -0,0 +1 @@ + diff --git a/test/core/security/corpus/alts_credentials_corpus/afd8e19f7bfd6c963f1856be59b75627864821dc b/test/core/security/corpus/alts_credentials_corpus/afd8e19f7bfd6c963f1856be59b75627864821dc new file mode 100644 index 0000000000..385405e116 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/afd8e19f7bfd6c963f1856be59b75627864821dc @@ -0,0 +1,2 @@ +¯+ú +ä´õ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/b3966239b8568442baecbeb0f8a1aa29dcdfd7ed b/test/core/security/corpus/alts_credentials_corpus/b3966239b8568442baecbeb0f8a1aa29dcdfd7ed new file mode 100644 index 0000000000..3d9fb86775 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/b3966239b8568442baecbeb0f8a1aa29dcdfd7ed differ diff --git a/test/core/security/corpus/alts_credentials_corpus/b430d41ef65493b3e917182c23ce90df983e01ab b/test/core/security/corpus/alts_credentials_corpus/b430d41ef65493b3e917182c23ce90df983e01ab new file mode 100644 index 0000000000..cbb8cebbb9 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/b430d41ef65493b3e917182c23ce90df983e01ab @@ -0,0 +1,2 @@ +ÿ + diff --git a/test/core/security/corpus/alts_credentials_corpus/b44e715e0cfe05f0c92a9e000ac3c36aae17df9d b/test/core/security/corpus/alts_credentials_corpus/b44e715e0cfe05f0c92a9e000ac3c36aae17df9d new file mode 100644 index 0000000000..f0b1381e2c --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/b44e715e0cfe05f0c92a9e000ac3c36aae17df9d @@ -0,0 +1 @@ +]] \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/b4cf4ef7b3f64eff76cf99091fddc04411774708 b/test/core/security/corpus/alts_credentials_corpus/b4cf4ef7b3f64eff76cf99091fddc04411774708 new file mode 100644 index 0000000000..65d4adbeb4 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/b4cf4ef7b3f64eff76cf99091fddc04411774708 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/b53d84468ea93620a9824ca65acf1179f431e763 b/test/core/security/corpus/alts_credentials_corpus/b53d84468ea93620a9824ca65acf1179f431e763 new file mode 100644 index 0000000000..5844d31855 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/b53d84468ea93620a9824ca65acf1179f431e763 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/b6ac4831cc5baabee9c8ab9af9ca3923f91097a0 b/test/core/security/corpus/alts_credentials_corpus/b6ac4831cc5baabee9c8ab9af9ca3923f91097a0 new file mode 100644 index 0000000000..3d54a26e1c --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/b6ac4831cc5baabee9c8ab9af9ca3923f91097a0 @@ -0,0 +1,2 @@ +îÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿAï +ïé \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/b7f4a484866a8050dbc63bc905c9803c6964eda5 b/test/core/security/corpus/alts_credentials_corpus/b7f4a484866a8050dbc63bc905c9803c6964eda5 new file mode 100644 index 0000000000..e17c966032 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/b7f4a484866a8050dbc63bc905c9803c6964eda5 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/b8f21e59f90431c982d5ec3fb54ae4605f102252 b/test/core/security/corpus/alts_credentials_corpus/b8f21e59f90431c982d5ec3fb54ae4605f102252 new file mode 100644 index 0000000000..79e3486245 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/b8f21e59f90431c982d5ec3fb54ae4605f102252 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/bad10b6581cdead8e7cb96e4f544dcf0ea650fbc b/test/core/security/corpus/alts_credentials_corpus/bad10b6581cdead8e7cb96e4f544dcf0ea650fbc new file mode 100644 index 0000000000..9deb7606c7 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/bad10b6581cdead8e7cb96e4f544dcf0ea650fbc differ diff --git a/test/core/security/corpus/alts_credentials_corpus/bb01bed86b43257be9f527388e1183f52438c473 b/test/core/security/corpus/alts_credentials_corpus/bb01bed86b43257be9f527388e1183f52438c473 new file mode 100644 index 0000000000..ad47d46dc2 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/bb01bed86b43257be9f527388e1183f52438c473 @@ -0,0 +1 @@ +òÒûþ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/bb7497b00f0d999ef39dbf81c6bd0441e32723b6 b/test/core/security/corpus/alts_credentials_corpus/bb7497b00f0d999ef39dbf81c6bd0441e32723b6 new file mode 100644 index 0000000000..3b2f10845c Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/bb7497b00f0d999ef39dbf81c6bd0441e32723b6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/bf01b72e635deda1b4a8468f1cc36f01a54e1338 b/test/core/security/corpus/alts_credentials_corpus/bf01b72e635deda1b4a8468f1cc36f01a54e1338 new file mode 100644 index 0000000000..7fa6cf8df9 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/bf01b72e635deda1b4a8468f1cc36f01a54e1338 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/bf8b4530d8d246dd74ac53a13471bba17941dff7 b/test/core/security/corpus/alts_credentials_corpus/bf8b4530d8d246dd74ac53a13471bba17941dff7 new file mode 100644 index 0000000000..6b2aaa7640 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/bf8b4530d8d246dd74ac53a13471bba17941dff7 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/c08bc84ab6a512b901bb730beb05c8394e4f1c5d b/test/core/security/corpus/alts_credentials_corpus/c08bc84ab6a512b901bb730beb05c8394e4f1c5d new file mode 100644 index 0000000000..8d753685ca Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c08bc84ab6a512b901bb730beb05c8394e4f1c5d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/c244b635d94e6f5d6b344887434be3e001a04b41 b/test/core/security/corpus/alts_credentials_corpus/c244b635d94e6f5d6b344887434be3e001a04b41 new file mode 100644 index 0000000000..92e73a2356 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c244b635d94e6f5d6b344887434be3e001a04b41 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/c281efe9620da999a637ff6e9b3279ec613fb992 b/test/core/security/corpus/alts_credentials_corpus/c281efe9620da999a637ff6e9b3279ec613fb992 new file mode 100644 index 0000000000..c17a77e0da Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c281efe9620da999a637ff6e9b3279ec613fb992 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/c30a212824ee71e215f475f453de17c65a200101 b/test/core/security/corpus/alts_credentials_corpus/c30a212824ee71e215f475f453de17c65a200101 new file mode 100644 index 0000000000..86ac99e288 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c30a212824ee71e215f475f453de17c65a200101 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/c449427f35b7ecdf5641073629f7723df52c4cb0 b/test/core/security/corpus/alts_credentials_corpus/c449427f35b7ecdf5641073629f7723df52c4cb0 new file mode 100644 index 0000000000..87d1a322d7 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/c449427f35b7ecdf5641073629f7723df52c4cb0 @@ -0,0 +1 @@ +ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‚ÕÒÒÒÒÒÒÒÒÒÒ‘- \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/c60240cd3b02eb71e2bf5ebd59afa3a5dc9b5e4d b/test/core/security/corpus/alts_credentials_corpus/c60240cd3b02eb71e2bf5ebd59afa3a5dc9b5e4d new file mode 100644 index 0000000000..f8804b84e4 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c60240cd3b02eb71e2bf5ebd59afa3a5dc9b5e4d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/c60cdf9c3fb9060838f445b3bc3852b6f81e1e4c b/test/core/security/corpus/alts_credentials_corpus/c60cdf9c3fb9060838f445b3bc3852b6f81e1e4c new file mode 100644 index 0000000000..327246f1c9 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c60cdf9c3fb9060838f445b3bc3852b6f81e1e4c differ diff --git a/test/core/security/corpus/alts_credentials_corpus/c72d0501bacadb45242c553ba292591302f12a6a b/test/core/security/corpus/alts_credentials_corpus/c72d0501bacadb45242c553ba292591302f12a6a new file mode 100644 index 0000000000..ca02bafb78 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c72d0501bacadb45242c553ba292591302f12a6a differ diff --git a/test/core/security/corpus/alts_credentials_corpus/c739e7b5ad999edbdeffdab672dbc30deb3959a0 b/test/core/security/corpus/alts_credentials_corpus/c739e7b5ad999edbdeffdab672dbc30deb3959a0 new file mode 100644 index 0000000000..d7f2d22aa8 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c739e7b5ad999edbdeffdab672dbc30deb3959a0 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/c7d73b12a7108d82f8dac6d8a6a34f838601aca6 b/test/core/security/corpus/alts_credentials_corpus/c7d73b12a7108d82f8dac6d8a6a34f838601aca6 new file mode 100644 index 0000000000..b38437a65e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/c7d73b12a7108d82f8dac6d8a6a34f838601aca6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/ca781e1add632433293e847ae9e71649c217ee5f b/test/core/security/corpus/alts_credentials_corpus/ca781e1add632433293e847ae9e71649c217ee5f new file mode 100644 index 0000000000..5c79dd1c52 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/ca781e1add632433293e847ae9e71649c217ee5f differ diff --git a/test/core/security/corpus/alts_credentials_corpus/cc48e916f40e8d69c2d07cfda42c7d3b7fe3447a b/test/core/security/corpus/alts_credentials_corpus/cc48e916f40e8d69c2d07cfda42c7d3b7fe3447a new file mode 100644 index 0000000000..11ccb07de1 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/cc48e916f40e8d69c2d07cfda42c7d3b7fe3447a differ diff --git a/test/core/security/corpus/alts_credentials_corpus/cca1aff4c08ee4ccbcb6f80e1cd1480a0a093cfd b/test/core/security/corpus/alts_credentials_corpus/cca1aff4c08ee4ccbcb6f80e1cd1480a0a093cfd new file mode 100644 index 0000000000..b7bebbe8e9 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/cca1aff4c08ee4ccbcb6f80e1cd1480a0a093cfd differ diff --git a/test/core/security/corpus/alts_credentials_corpus/cf6ae8bf1d08d25e235b7bee0839984bbc04edf6 b/test/core/security/corpus/alts_credentials_corpus/cf6ae8bf1d08d25e235b7bee0839984bbc04edf6 new file mode 100644 index 0000000000..32eb656fbf Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/cf6ae8bf1d08d25e235b7bee0839984bbc04edf6 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/cfc52fa086292c699efd7bf41d2fae3deb449536 b/test/core/security/corpus/alts_credentials_corpus/cfc52fa086292c699efd7bf41d2fae3deb449536 new file mode 100644 index 0000000000..285e35d40f Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/cfc52fa086292c699efd7bf41d2fae3deb449536 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/cfe13ef3c6c713a059f231f0001ecec97e2a932d b/test/core/security/corpus/alts_credentials_corpus/cfe13ef3c6c713a059f231f0001ecec97e2a932d new file mode 100644 index 0000000000..1059f60cec Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/cfe13ef3c6c713a059f231f0001ecec97e2a932d differ diff --git a/test/core/security/corpus/alts_credentials_corpus/d14026ac6421bca7161024f4e735cb80a1068d01 b/test/core/security/corpus/alts_credentials_corpus/d14026ac6421bca7161024f4e735cb80a1068d01 new file mode 100644 index 0000000000..68b7682c71 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/d14026ac6421bca7161024f4e735cb80a1068d01 @@ -0,0 +1,2 @@ + +ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûÿ+´úä¯õ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/d2fb6e8f7867fc1e2ebe723da2b5246dc9cc6b14 b/test/core/security/corpus/alts_credentials_corpus/d2fb6e8f7867fc1e2ebe723da2b5246dc9cc6b14 new file mode 100644 index 0000000000..9854260459 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/d2fb6e8f7867fc1e2ebe723da2b5246dc9cc6b14 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/d4db7d51bdaa4781cf12c3b59914bad414d2a41e b/test/core/security/corpus/alts_credentials_corpus/d4db7d51bdaa4781cf12c3b59914bad414d2a41e new file mode 100644 index 0000000000..0979d45bca Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/d4db7d51bdaa4781cf12c3b59914bad414d2a41e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/d533da0e7f8c1e39bb025b4d7a89613142a6f54e b/test/core/security/corpus/alts_credentials_corpus/d533da0e7f8c1e39bb025b4d7a89613142a6f54e new file mode 100644 index 0000000000..89ef0d2307 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/d533da0e7f8c1e39bb025b4d7a89613142a6f54e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/d5cf489d01a1b847a7aac5dddabff23fdc218e1e b/test/core/security/corpus/alts_credentials_corpus/d5cf489d01a1b847a7aac5dddabff23fdc218e1e new file mode 100644 index 0000000000..c544b2793e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/d5cf489d01a1b847a7aac5dddabff23fdc218e1e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/d686f8561a249c7c15c78f76a5fceb884286e070 b/test/core/security/corpus/alts_credentials_corpus/d686f8561a249c7c15c78f76a5fceb884286e070 new file mode 100644 index 0000000000..b96c459973 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/d686f8561a249c7c15c78f76a5fceb884286e070 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/d92424daad9d96a40e5ab177e3824c36ef51dc0f b/test/core/security/corpus/alts_credentials_corpus/d92424daad9d96a40e5ab177e3824c36ef51dc0f new file mode 100644 index 0000000000..509eb39065 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/d92424daad9d96a40e5ab177e3824c36ef51dc0f differ diff --git a/test/core/security/corpus/alts_credentials_corpus/db242a11ed88b2b26af46770dd1927d9f35301fb b/test/core/security/corpus/alts_credentials_corpus/db242a11ed88b2b26af46770dd1927d9f35301fb new file mode 100644 index 0000000000..bd5d04676a Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/db242a11ed88b2b26af46770dd1927d9f35301fb differ diff --git a/test/core/security/corpus/alts_credentials_corpus/db32eb04db13d58f65f46d262608bd088987c063 b/test/core/security/corpus/alts_credentials_corpus/db32eb04db13d58f65f46d262608bd088987c063 new file mode 100644 index 0000000000..5c526d8a28 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/db32eb04db13d58f65f46d262608bd088987c063 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/db39a953317951759e40734de6607a0b4457728e b/test/core/security/corpus/alts_credentials_corpus/db39a953317951759e40734de6607a0b4457728e new file mode 100644 index 0000000000..d794576b59 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/db39a953317951759e40734de6607a0b4457728e differ diff --git a/test/core/security/corpus/alts_credentials_corpus/dc5e8f3102456bed90d17303bc4cff1a7e076d5d b/test/core/security/corpus/alts_credentials_corpus/dc5e8f3102456bed90d17303bc4cff1a7e076d5d new file mode 100644 index 0000000000..53e1bbce92 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/dc5e8f3102456bed90d17303bc4cff1a7e076d5d @@ -0,0 +1 @@ +‚ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/dd9542bbed8e5dc58da2789edbfb9c38d578d3b4 b/test/core/security/corpus/alts_credentials_corpus/dd9542bbed8e5dc58da2789edbfb9c38d578d3b4 new file mode 100644 index 0000000000..95fd950be8 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/dd9542bbed8e5dc58da2789edbfb9c38d578d3b4 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/de2ebb1ed324385de500a1a3308846239857c3c7 b/test/core/security/corpus/alts_credentials_corpus/de2ebb1ed324385de500a1a3308846239857c3c7 new file mode 100644 index 0000000000..d0cee5f847 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/de2ebb1ed324385de500a1a3308846239857c3c7 @@ -0,0 +1 @@ +ø+ø \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/de8ba9158254c1cd84b53df1e4cdf1757b1392f1 b/test/core/security/corpus/alts_credentials_corpus/de8ba9158254c1cd84b53df1e4cdf1757b1392f1 new file mode 100644 index 0000000000..1cbbe5b8cb Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/de8ba9158254c1cd84b53df1e4cdf1757b1392f1 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/e1dd260746f50024822a8b729b89545d26decfb8 b/test/core/security/corpus/alts_credentials_corpus/e1dd260746f50024822a8b729b89545d26decfb8 new file mode 100644 index 0000000000..c44854edf7 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/e1dd260746f50024822a8b729b89545d26decfb8 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/e29add81b20dc570fdc885782689f6dccb1c5fad b/test/core/security/corpus/alts_credentials_corpus/e29add81b20dc570fdc885782689f6dccb1c5fad new file mode 100644 index 0000000000..5c50fe7539 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/e29add81b20dc570fdc885782689f6dccb1c5fad differ diff --git a/test/core/security/corpus/alts_credentials_corpus/e2e99af62843cd3b29d50daeb118e58830784da9 b/test/core/security/corpus/alts_credentials_corpus/e2e99af62843cd3b29d50daeb118e58830784da9 new file mode 100644 index 0000000000..04da1314d9 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/e2e99af62843cd3b29d50daeb118e58830784da9 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/e46611c5daf99662e1576147c1623409752a1f39 b/test/core/security/corpus/alts_credentials_corpus/e46611c5daf99662e1576147c1623409752a1f39 new file mode 100644 index 0000000000..0334d31def --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/e46611c5daf99662e1576147c1623409752a1f39 @@ -0,0 +1 @@ +ä## \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/e5a1ba11af830e9d2db201c5164f75747a85fe9b b/test/core/security/corpus/alts_credentials_corpus/e5a1ba11af830e9d2db201c5164f75747a85fe9b new file mode 100644 index 0000000000..8e8b1e2001 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/e5a1ba11af830e9d2db201c5164f75747a85fe9b differ diff --git a/test/core/security/corpus/alts_credentials_corpus/e6026ee0badf216b326443a5f708446b2f2e579f b/test/core/security/corpus/alts_credentials_corpus/e6026ee0badf216b326443a5f708446b2f2e579f new file mode 100644 index 0000000000..a99014fa41 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/e6026ee0badf216b326443a5f708446b2f2e579f differ diff --git a/test/core/security/corpus/alts_credentials_corpus/e6c7d2c0038fa1f03fc6590a726abc98f4c641f3 b/test/core/security/corpus/alts_credentials_corpus/e6c7d2c0038fa1f03fc6590a726abc98f4c641f3 new file mode 100644 index 0000000000..8f5a9f5b33 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/e6c7d2c0038fa1f03fc6590a726abc98f4c641f3 @@ -0,0 +1 @@ +òi \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/eafdef6a630bed71bd0e4f3d4a16b5fa0c920651 b/test/core/security/corpus/alts_credentials_corpus/eafdef6a630bed71bd0e4f3d4a16b5fa0c920651 new file mode 100644 index 0000000000..6fbe750e01 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/eafdef6a630bed71bd0e4f3d4a16b5fa0c920651 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/ece985b9b82e27281514d460709d7edf8203ded7 b/test/core/security/corpus/alts_credentials_corpus/ece985b9b82e27281514d460709d7edf8203ded7 new file mode 100644 index 0000000000..c1243022a0 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/ece985b9b82e27281514d460709d7edf8203ded7 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/edb8f4259f756c2c4bc731f05beaa36f992cf079 b/test/core/security/corpus/alts_credentials_corpus/edb8f4259f756c2c4bc731f05beaa36f992cf079 new file mode 100644 index 0000000000..1cc08a4d39 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/edb8f4259f756c2c4bc731f05beaa36f992cf079 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/edce7778c2e1adb81dda3d057a6536759a7cb293 b/test/core/security/corpus/alts_credentials_corpus/edce7778c2e1adb81dda3d057a6536759a7cb293 new file mode 100644 index 0000000000..39b52cf971 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/edce7778c2e1adb81dda3d057a6536759a7cb293 @@ -0,0 +1 @@ ++ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/ee4040c0dd406dd616c49ed2c37b40478dabfe0f b/test/core/security/corpus/alts_credentials_corpus/ee4040c0dd406dd616c49ed2c37b40478dabfe0f new file mode 100644 index 0000000000..48325e312e Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/ee4040c0dd406dd616c49ed2c37b40478dabfe0f differ diff --git a/test/core/security/corpus/alts_credentials_corpus/ee69f2b380663d051a70f30fcfce9f79f5341e5a b/test/core/security/corpus/alts_credentials_corpus/ee69f2b380663d051a70f30fcfce9f79f5341e5a new file mode 100644 index 0000000000..7e0ad2a61a Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/ee69f2b380663d051a70f30fcfce9f79f5341e5a differ diff --git a/test/core/security/corpus/alts_credentials_corpus/efc6743e47274058771bb6eda1fefa017bde4a95 b/test/core/security/corpus/alts_credentials_corpus/efc6743e47274058771bb6eda1fefa017bde4a95 new file mode 100644 index 0000000000..4418e8ab73 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/efc6743e47274058771bb6eda1fefa017bde4a95 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/f0038e54162000694d882b1acb80930c807b41d2 b/test/core/security/corpus/alts_credentials_corpus/f0038e54162000694d882b1acb80930c807b41d2 new file mode 100644 index 0000000000..292a5e4bd3 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/f0038e54162000694d882b1acb80930c807b41d2 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/f1deb9e388c877337dabe92f31b01e2a019a10f4 b/test/core/security/corpus/alts_credentials_corpus/f1deb9e388c877337dabe92f31b01e2a019a10f4 new file mode 100644 index 0000000000..46464ee9c2 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/f1deb9e388c877337dabe92f31b01e2a019a10f4 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/f3a09373e4d3c7310d372089e6deb15d6b22c198 b/test/core/security/corpus/alts_credentials_corpus/f3a09373e4d3c7310d372089e6deb15d6b22c198 new file mode 100644 index 0000000000..a974996100 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/f3a09373e4d3c7310d372089e6deb15d6b22c198 @@ -0,0 +1 @@ +üÒûþ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/f3db7ef6495fa1ac5bb4db293fb38dd59122bb7c b/test/core/security/corpus/alts_credentials_corpus/f3db7ef6495fa1ac5bb4db293fb38dd59122bb7c new file mode 100644 index 0000000000..8afc32bf9d --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/f3db7ef6495fa1ac5bb4db293fb38dd59122bb7c @@ -0,0 +1,2 @@ +[ÿÿ[ÿÿÿ +¡Š \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/f434bb4ceecc573e085d4c3ef453ef01e93d9c89 b/test/core/security/corpus/alts_credentials_corpus/f434bb4ceecc573e085d4c3ef453ef01e93d9c89 new file mode 100644 index 0000000000..2b66a00cd8 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/f434bb4ceecc573e085d4c3ef453ef01e93d9c89 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/f55bceaad42ddf9d2b37fdfca68255d29a696109 b/test/core/security/corpus/alts_credentials_corpus/f55bceaad42ddf9d2b37fdfca68255d29a696109 new file mode 100644 index 0000000000..a8eef8f96a --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/f55bceaad42ddf9d2b37fdfca68255d29a696109 @@ -0,0 +1 @@ +òÒ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/f62ca5321428a5d23f3c804fb51eb4e65bc58716 b/test/core/security/corpus/alts_credentials_corpus/f62ca5321428a5d23f3c804fb51eb4e65bc58716 new file mode 100644 index 0000000000..0d80f7be69 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/f62ca5321428a5d23f3c804fb51eb4e65bc58716 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/f7c6a558b8d0af64db2b139371a7af7068b01b92 b/test/core/security/corpus/alts_credentials_corpus/f7c6a558b8d0af64db2b139371a7af7068b01b92 new file mode 100644 index 0000000000..d46ea45bc4 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/f7c6a558b8d0af64db2b139371a7af7068b01b92 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/faa1781e1444bba5b8c677bc5e2a38d023a1ec65 b/test/core/security/corpus/alts_credentials_corpus/faa1781e1444bba5b8c677bc5e2a38d023a1ec65 new file mode 100644 index 0000000000..013d565bb4 --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/faa1781e1444bba5b8c677bc5e2a38d023a1ec65 @@ -0,0 +1 @@ +‚ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/fceba33ada1dda05fccedfefd331c9a201f1a2e5 b/test/core/security/corpus/alts_credentials_corpus/fceba33ada1dda05fccedfefd331c9a201f1a2e5 new file mode 100644 index 0000000000..f3db26dc2f --- /dev/null +++ b/test/core/security/corpus/alts_credentials_corpus/fceba33ada1dda05fccedfefd331c9a201f1a2e5 @@ -0,0 +1 @@ + ¿ \ No newline at end of file diff --git a/test/core/security/corpus/alts_credentials_corpus/fd668bef6fdaf7f3ffd58d8c60ce550476652e60 b/test/core/security/corpus/alts_credentials_corpus/fd668bef6fdaf7f3ffd58d8c60ce550476652e60 new file mode 100644 index 0000000000..dcefd99985 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/fd668bef6fdaf7f3ffd58d8c60ce550476652e60 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/fdf06b928e37e7c4ae59a568b5723ad98bbed6e5 b/test/core/security/corpus/alts_credentials_corpus/fdf06b928e37e7c4ae59a568b5723ad98bbed6e5 new file mode 100644 index 0000000000..fe28d69b5f Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/fdf06b928e37e7c4ae59a568b5723ad98bbed6e5 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/fe2fc5d499aeb2762387ef2e3ce939280813dec0 b/test/core/security/corpus/alts_credentials_corpus/fe2fc5d499aeb2762387ef2e3ce939280813dec0 new file mode 100644 index 0000000000..cb035e7101 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/fe2fc5d499aeb2762387ef2e3ce939280813dec0 differ diff --git a/test/core/security/corpus/alts_credentials_corpus/ff548d368b090409a138e5cc4afc7f43b4a3fbbd b/test/core/security/corpus/alts_credentials_corpus/ff548d368b090409a138e5cc4afc7f43b4a3fbbd new file mode 100644 index 0000000000..caadbc0309 Binary files /dev/null and b/test/core/security/corpus/alts_credentials_corpus/ff548d368b090409a138e5cc4afc7f43b4a3fbbd differ diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 886cfddf86..f52570cde5 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -52,6 +52,7 @@ grpc_cc_library( name = "grpc_test_util_base", srcs = [ "cmdline.cc", + "fuzzer_util.cc", "grpc_profiler.cc", "histogram.cc", "mock_endpoint.cc", @@ -70,6 +71,7 @@ grpc_cc_library( ], hdrs = [ "cmdline.h", + "fuzzer_util.h", "grpc_profiler.h", "histogram.h", "mock_endpoint.h", diff --git a/test/core/util/fuzzer_util.cc b/test/core/util/fuzzer_util.cc new file mode 100644 index 0000000000..29c9b8875f --- /dev/null +++ b/test/core/util/fuzzer_util.cc @@ -0,0 +1,82 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "test/core/util/fuzzer_util.h" + +#include + +#include "src/core/lib/gpr/useful.h" + +namespace grpc_core { +namespace testing { + +uint8_t grpc_fuzzer_get_next_byte(input_stream* inp) { + if (inp->cur == inp->end) { + return 0; + } + return *inp->cur++; +} + +char* grpc_fuzzer_get_next_string(input_stream* inp, bool* special) { + char* str = nullptr; + size_t cap = 0; + size_t sz = 0; + char c; + do { + if (cap == sz) { + cap = GPR_MAX(3 * cap / 2, cap + 8); + str = static_cast(gpr_realloc(str, cap)); + } + c = static_cast(grpc_fuzzer_get_next_byte(inp)); + str[sz++] = c; + } while (c != 0 && c != 1); + if (special != nullptr) { + *special = (c == 1); + } + if (c == 1) { + str[sz - 1] = 0; + } + return str; +} + +uint32_t grpc_fuzzer_get_next_uint32(input_stream* inp) { + uint8_t b = grpc_fuzzer_get_next_byte(inp); + uint32_t x = b & 0x7f; + if (b & 0x80) { + x <<= 7; + b = grpc_fuzzer_get_next_byte(inp); + x |= b & 0x7f; + if (b & 0x80) { + x <<= 7; + b = grpc_fuzzer_get_next_byte(inp); + x |= b & 0x7f; + if (b & 0x80) { + x <<= 7; + b = grpc_fuzzer_get_next_byte(inp); + x |= b & 0x7f; + if (b & 0x80) { + x = (x << 4) | (grpc_fuzzer_get_next_byte(inp) & 0x0f); + } + } + } + } + return x; +} + +} // namespace testing +} // namespace grpc_core diff --git a/test/core/util/fuzzer_util.h b/test/core/util/fuzzer_util.h new file mode 100644 index 0000000000..0e938399a1 --- /dev/null +++ b/test/core/util/fuzzer_util.h @@ -0,0 +1,49 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_TEST_CORE_UTIL_FUZZER_UTIL_H +#define GRPC_TEST_CORE_UTIL_FUZZER_UTIL_H + +#include + +namespace grpc_core { + +namespace testing { + +// Main struct for input_stream. It allows easy access to input +// bytes, and allows reading a little past the end(avoiding +// needing to check everywhere). +typedef struct { + const uint8_t* cur; + const uint8_t* end; +} input_stream; + +// get a byte from an input stream. +uint8_t grpc_fuzzer_get_next_byte(input_stream* inp); + +// get a string and boolean values (if special is not null) from an input +// stream. +char* grpc_fuzzer_get_next_string(input_stream* inp, bool* special); + +// get a uint32 value from an input stream. +uint32_t grpc_fuzzer_get_next_uint32(input_stream* inp); + +} // namespace testing +} // namespace grpc_core + +#endif /* GRPC_TEST_CORE_UTIL_FUZZER_UTIL_H */ diff --git a/tools/fuzzer/runners/alts_credentials_fuzzer.sh b/tools/fuzzer/runners/alts_credentials_fuzzer.sh new file mode 100644 index 0000000000..3aaff6b57d --- /dev/null +++ b/tools/fuzzer/runners/alts_credentials_fuzzer.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Copyright 2016 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048 -timeout=120" + + +if [ "$jobs" != "1" ] +then + flags="-jobs=$jobs -workers=$jobs $flags" +fi + +if [ "$config" == "asan-trace-cmp" ] +then + flags="-use_traces=1 $flags" +fi + +bins/$config/alts_credentials_fuzzer $flags fuzzer_output test/core/security/corpus/alts_credentials_corpus diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index abb7005327..9c5d1ec81b 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -50,6 +50,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "alts_credentials_fuzzer", + "src": [ + "test/core/security/alts_credentials_fuzzer.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -6449,6 +6466,24 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "src": [ + "test/core/security/alts_credentials_fuzzer.cc", + "test/core/util/one_corpus_entry_fuzzer.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -10165,6 +10200,7 @@ "test/core/end2end/fixtures/proxy.h", "test/core/iomgr/endpoint_tests.h", "test/core/util/debugger_macros.h", + "test/core/util/fuzzer_util.h", "test/core/util/grpc_profiler.h", "test/core/util/histogram.h", "test/core/util/memory_counters.h", @@ -10194,6 +10230,8 @@ "test/core/iomgr/endpoint_tests.h", "test/core/util/debugger_macros.cc", "test/core/util/debugger_macros.h", + "test/core/util/fuzzer_util.cc", + "test/core/util/fuzzer_util.h", "test/core/util/grpc_profiler.cc", "test/core/util/grpc_profiler.h", "test/core/util/histogram.cc", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index e2a79075d9..1a5506f4f0 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -63843,6 +63843,4192 @@ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_insecure_low_thread_count", "timeout_seconds": 600 }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/001b0f1c1fd877209ec330f91ffe9450803f3af1" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/01a3e90d943f0e4b0b8ec6e21f22a7805a3d55ae" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/02aa629c8b16cd17a44f3a0efec2feed43937642" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/0347878242034088ad7c7c28eb11db03ca822e58" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/0441d29f2bdd1c416f08f727fc6676e52ebc3355" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/061ea4a089fd8f90f0bc0a6ee9a1eabe92a458cb" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/066736c74eec62138d0344ff0e16a38793c21e79" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/078558172f7a3a29d203c50fe9c0be8c806ee2fa" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/0a561496ff07895c3de6d379c8515400328e8132" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/0de032c15a96c8c6df906845bf46a327c95b4c61" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/0fe0afc1eeef58aa25a0332282bec4b23c15ad2c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/109441567b1fad6198b1a388895a2bd3654483d8" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/11d890d9004b695f3468cc03179eab06ba2c07fb" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/1212b598455391501de16b54bddbe4f5343a4a88" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/1666e8aa226a18bf64f2785a2f9be28fc4af01cb" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/16e58db814acc76c24ba50eb3d89b24ddd494454" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/1af35e95ed0090ae0ee489453e850a2600a225c8" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/1c654b103763405d321d090adbcda783bf447ef7" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/1c8e404bae365315af2427626ea2f2475e9ae117" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/1e9a89f1f2ad84637da91f9d5d9b2b4201d59079" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/1e9df3bc49997ee68ad2db5bc683067244614b39" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/289dd2a1b53799f52fed42183165223ac00dd7e2" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/292cdfe83a7b50121a9024e70bbef29d9c8bb707" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/2ddd9fce413102f816ae577dbf01c2162b6acb3f" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/2f463a008b3d0ec0dad09ab6f6de99115c440fd6" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/301045841e56d4b43ac01c33b91e7f5ac26124f7" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/31cf1335ca0ec97cd5d580966c56d6a0a40efd2d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/3389789f2f4dbe75a101e62e290c7d8e3dc5d5f1" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/33c784ee455251ec8c594944da5c4948fdd8753d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/33fd34877b43b24c030563a3970377c794013a34" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/3786ba4fc72b15b351d73b5345da16b8f5c8c8bf" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/37b57582d59381ce62f0fd1da7c7e92e709af3b4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/3950877189aee19ecc4f076733158ebb1a5f42df" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/3a407d0eea73e0eeb54ed0d1ae2ad73bd978f405" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/3a5e866fb1d159bdb2754f11e7e522986dbd5a7f" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/3cb873e6ef34b5d539699b6082bdddefc8c65838" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/43300433c1aee3396a605f1955a3ed75dba52e26" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/4645aa0db937ee4a71a1bae3cbcfb565f564e3d5" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/4a6235246630ab2a427ca69b9c5d0cc0e803ad49" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/4a7758e8149ae5cf26c5c6f53d577038e249f0d6" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/4aef59e34030f8a1e9f265439c2e3db1119f1493" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/4c9fad46c1539bdf3556687883322cf75021f96a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/4d8861033b6a1cd84db5122d138e2da3e53b60f7" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/53ec92f9c452fa57573a52d98fdc9abcfc3f0371" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/54959ff4b0aae33ec0f7cd1381eb328cdbba19ee" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/549dff503b59978a958a9651519af26f037b2d55" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/54b27d84618d3ee769881b8c49aee7db67b4020c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/562f4112f9ace35951efe6f5b9e87fcbd63b9ecb" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/57a347cef7b1399eded9599a94f301be9b4df21d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/593f1b85552ff31f587835a52d1277fc73c44c8d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/5c67e4584246af2ac0de928e018734261932bf0c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/5faa30e5ee6aee2a59168083ef72f3ec2e7567db" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/623898e8c98442b00d2f23b1b8bcd13089b32922" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/63f05684944d29fdaa31e95eae7b85b12a48879d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/6420d3ebda967d432e45e9cbe8a50330140ac318" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/64b27fcd2a65d61cc6d68cb57e97bd73d124ffb3" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/6530639009ae17e56283b0decaf49fba83a63f3e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/672c55e579063079e101b5a0222a2efa02ee294b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/67ab9a6bdfab6ac480c65a45fc65cd4f9e4f4e6d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/6b2c13846e2a8331dfeabcf838db569577eb56bf" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/6cb2ae170a663077e9518bf0076238546e371bbe" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/6d787a7104ed6f9350ed9d1a3f843e7b42b07687" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/6dbb2224c3ccd70b9ade387f6373f075f8f504db" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/71839db8e675da8e2740a5e2643b09d84280ae92" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/725c32ba1684bc7ed628105091a66fbe940967a0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/734a25b9c712db908f45e1e32a87333e31c207de" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/73751bcbe4443d38a287b93fc910937b9b3f0368" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/741351dd7d6b01ad8eb0dd5c803067c1668e1f99" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/7463613249480f9ab78c5ec26f785f23a7a3f275" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/74679e8d39dee9255516abc6ed24666a3e88e45c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/7474dbc6e6db97ea1b467d3813ab2462953c1d90" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/765e5fedea0337dbf1de4a8b49d81fb17aac81bd" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/77e1bdc71978ad61766aaaec3ccb9e548a6f79d9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/787c7e80d62b3d368574ab0f17cbf6ec29489f79" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/78e848258de0ef0721b32afbf0cbcab3ba7db273" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/79600afed1fb50fdefd5e461d8df7764ab9f8395" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/79dac7b853495c96cb39a10bbda8f3045cf49358" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/7af3d42c9c0e17b942a9e1c83cf48cd56d8314c8" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/7b01be9915cdb9d7633d07daf5f5a290b248aa5d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/7c4d33785daa5c2370201ffa236b427aa37c9996" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/7cefdeda0d406ce61bb989b348a58d8cff9cfd4e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/7fdd6a898be020d078dea054ac4e92f956775a0a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/80938354d5e18685418deed05044fbf9d3b4fb78" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/818ab3833d8173171263de8ef28c0e75d9e7c804" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/834fb1dc07db500d8b3ffef0e6add8bcd8f9953e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/835718f279c89f990af7b9d5dfab7e9aab2fc80a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/84475df5a9c775171e7c507fa0fc30e7eedc050b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/876bcf8c4e83e6684358ee6ae6a065c990bacb7c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/88baf260e09ed315576ab4352e59d2c29f91014d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/8a59dd6e84e4ca345410d9d04057acbfc6913d9f" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/8ad72941a8d2b51dc9ff69652c39e4534b85f7e5" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/8ae2cd28420c2f39e9ce0990929ef9e89180a5da" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/8bea6c731ebcc00bc18d5da1a25f124b3f2c5cbc" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/8c687d5146622bf6fc7e7b57c11113e4df45baa8" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/90af9ff504792d98e02ecdbead1625037b2981fa" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/919ba4880da279183396f9ff4bd1c5d9e3b171ab" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/92e50dbea4a8909b20beccc4c67526a546e67872" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/9456897eba5729ca3ad0414d09b982cd25dfca41" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/9493a1fb29e60e99dd218688803a89407f80a687" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/94e476f817104a1d90fe755dfb6a42203ec92fb4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/969ac2b1c8c179ff409731ca42a4c46656f4a02c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/9747fcc14e8d4610c607adadaad1a38f7e854e65" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/98e6a9db69d8fa44765fb6b55d556abe033dc3b6" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/9a121d76889a39e61de76426df8359ec3afcb092" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/9b6769b0e3f20a255f81a94de6a04f1aac586a3d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/9c406c2d51c3647b2512f8ba97a9dc93e2bd3e38" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/9d1e036d184ca0f15fe4201d1e9ae2ef36c972f8" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/9e7ad28a70a5545d5440f3414d4ecee3ca27925b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a08b39c8d4ed35be02d5d6f8b4594d1ac6e00dbb" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a15449d6a06c870a69debd4ad7236ee4003bc1b9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a18344273947dd507dd1aefb5d9089e074be853d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a278cf292db732816ce5e3e903743eba002e6e97" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a33f5b5fd6b1caddf4a4adee107a3cc91d2d14d2" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a3812f441f50aa305705e81306995fa2774d4258" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a3e7720932526ba34c7533edbdb38ddc35e6fd63" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a40dc8ca42102b7db12aeeae5f5d91a964a588a0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/a79e215b2de4495ddc4d5c6cd4a87631fbe0d452" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ac129a90d6c769424bfc00ac761f22a270563890" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ac949d39f61b98f560e840fba540343c1c934a70" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ac9f9fa757c06e64fd7d285e52d48787b2bde370" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b005508cc4aaafb3bf374c01ca926eaf910736f3" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b1a7d5e2038e77b6d87ed179edbc1102e7444837" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b1e37dab3982c3c3dd343fdec7f4180f771c3479" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b221415ccaed29a4a4b496203246f485ca329bbd" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b358a21a6ee25cba7b67be4d5396b921f6cc362f" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b3b86ddbe133204a26bdab0ffcf4d86d492230f4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b488ab63f7615b054ff9efc67b5ee9be956428f6" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b572d0c7920a35edec344a05ffdb70dd2d5514c4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b6ed275d14cf8503a5a6f0b96a43006b3616d387" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b7044e4b4f03442e1b9afd2ee9a3a03574f24a09" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b87c8464e2786cf99010f1535573cabf19704b11" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/b8b6cc0ba6fb3c6c5de3797fccd5edb95eb9bb91" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/bbcce69956ddfe9c73b7e90ab1d97c265efe54f3" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/bcb07db44dfdf159a2ec15c5d624a0ba93b6f8df" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/bd1f20176944eea147fa688ac1c83ec40dcde725" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c0d578b3da9bb9b937a59341466850d882a0315a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c2f3d392b91926d88b9fead65581b54fb6ccd719" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c39aadb0bb330abe4828809c710308644b13b3ac" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c426a2ef2b5c798dd946c4897fdcf47c72437f82" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c4581dfa596e08d295601a2f4142f04778da72fd" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c5a0a2529d2deb60fec041b4fbd722a2ebe31702" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c5c723b98ad1c4de8e24cae27cf51d235aa66519" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c7c950b3d997487b659c966704aa7cb63b07dbca" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c8d355651b0565b22e7b014531d2b4a19c1a3711" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/c8e95e0ddf91f4efb3127892dfa5ea167b47c6bc" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/cbf6012269cda3a536067cf5f692ae96116ad3b4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/cc007a1fe922cef3e47a0a58ed4746c2c1d9f36c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/cc698e7eec52dca3a51806a81b97deeb89f99cad" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ce45e439eef9bd0f7f13c815cd429e1315a7e532" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/cf121df9d71cbed6087bca08847e6b20ae944c3c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/cf366460d403bb61a5c63f5ae10d357629d6902a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/d00055e1c781c3986f5d5be858acc2c827b3c578" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/d2a4cc53435d2077a81a5452e27a91a91d90ed3d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/d4907b83c6c8d551d9631d7d268093735c3afcd4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/d4d2f811468bbb8cc0c5afb1a7607ae37861b71f" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/d5005e2f7f9f6134bb29022cdf5483d47e8e6dfe" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/d7b867d15d6bb47e0fe4e39189fc6dbf01fb0e0d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/d9619a45ecc185c14d1540cb8e95985b029bd30e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/da386ee66def6b390a4189ede86d95e6aa69a5b4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/dabc6ebc5cc306fb74f0a70abc4262288ed17fdc" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/db51663760429a68b95f8b817f5015d67891dd82" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/db814e9914dce9bc053e1058fd7e5fcd2b14685f" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/dc89fc5dc1c56f45e743374909b793c34b922ad8" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ded5ba42480fe75dcebba1ce068489ff7be2186a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/df0f219315c1ade94de9802803abc43b879bc85c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/df58248c414f342c81e056b40bee12d17a08bf61" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/e17587a8da37991643ed2789a3277db907413d97" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/e5c7471f82c52d5678d0f624c76bc01504576658" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ea2b2e79b6f450856240afcfb8c114195374dbb0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ea7fa138b0f80ef309ae1906b5a804965eedbc00" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/eaf8aa1843ef570cb98463c533a66ad2c3e146d0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ed7cb2ebccdf551757cb91aece558e1e7c696f34" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/f47869036ebbe00ea23a7ade460833ab2817a889" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/f48e2ea11775727eb080fe31c207fa27da8ae1bd" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/f4c2019474e8047db7b62b5fb376120a8bbec3ec" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/f963e21e226a0e936e5f55f060fb0b68e50e1834" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/fa33ee34813fc92b0b77902efbf1f2bf96659cd8" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/fc01f450f8e74b8c7e92ad7cef8034c3273bca16" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/fc0a6fc2aa643adc00490a959a8d12f765f1640b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/fce52e7c5cb92d24f2949dea9971c8cd4fe3efde" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ff33b54071da748d62faf2a79e8a07ac66a6a51b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/security/corpus/alts_credentials_corpus/ff5c629ae11892921452922e2f233155c0e01c3c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "language": "c", + "name": "alts_credentials_fuzzer_one_entry", + "platforms": [ + "mac", + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/00.bin" -- cgit v1.2.3 From 274840e4d304b094d1d4711d4b9572866221a4ed Mon Sep 17 00:00:00 2001 From: jiangtaoli2016 Date: Wed, 9 May 2018 14:42:48 -0700 Subject: Migrate SSL_transport_security TSI to new TSI handshaker API --- BUILD | 2 - CMakeLists.txt | 2 - Makefile | 3 - build.yaml | 2 - config.m4 | 1 - config.w32 | 1 - gRPC-C++.podspec | 1 - gRPC-Core.podspec | 3 - grpc.gemspec | 2 - grpc.gyp | 1 - package.xml | 2 - src/core/lib/http/httpcli_security_connector.cc | 4 +- .../security_connector/security_connector.cc | 7 +- src/core/tsi/ssl_transport_security.cc | 314 ++++++++++++++------- src/core/tsi/transport_security_adapter.cc | 242 ---------------- src/core/tsi/transport_security_adapter.h | 41 --- src/core/tsi/transport_security_interface.h | 2 + src/python/grpcio/grpc_core_dependencies.py | 1 - test/core/tsi/ssl_transport_security_test.cc | 13 +- tools/doxygen/Doxyfile.core.internal | 2 - tools/run_tests/generated/sources_and_headers.json | 3 - 21 files changed, 225 insertions(+), 424 deletions(-) delete mode 100644 src/core/tsi/transport_security_adapter.cc delete mode 100644 src/core/tsi/transport_security_adapter.h (limited to 'grpc.gyp') diff --git a/BUILD b/BUILD index 80b40338c3..c35a7d65e1 100644 --- a/BUILD +++ b/BUILD @@ -1625,11 +1625,9 @@ grpc_cc_library( name = "tsi_interface", srcs = [ "src/core/tsi/transport_security.cc", - "src/core/tsi/transport_security_adapter.cc", ], hdrs = [ "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_adapter.h", "src/core/tsi/transport_security_interface.h", ], language = "c++", diff --git a/CMakeLists.txt b/CMakeLists.txt index d99a71e078..190e2dd465 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1150,7 +1150,6 @@ add_library(grpc third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c src/core/tsi/transport_security.cc - src/core/tsi/transport_security_adapter.cc src/core/ext/transport/chttp2/client/insecure/channel_create.cc src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc src/core/ext/transport/chttp2/client/authority.cc @@ -1569,7 +1568,6 @@ add_library(grpc_cronet third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c src/core/tsi/transport_security.cc - src/core/tsi/transport_security_adapter.cc src/core/ext/transport/chttp2/client/insecure/channel_create.cc src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc src/core/ext/transport/chttp2/client/authority.cc diff --git a/Makefile b/Makefile index 3225478720..ba765f0af6 100644 --- a/Makefile +++ b/Makefile @@ -3540,7 +3540,6 @@ LIBGRPC_SRC = \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ src/core/tsi/transport_security.cc \ - src/core/tsi/transport_security_adapter.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ src/core/ext/transport/chttp2/client/authority.cc \ @@ -3959,7 +3958,6 @@ LIBGRPC_CRONET_SRC = \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ src/core/tsi/transport_security.cc \ - src/core/tsi/transport_security_adapter.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ src/core/ext/transport/chttp2/client/authority.cc \ @@ -24107,7 +24105,6 @@ src/core/tsi/ssl/session_cache/ssl_session_cache.cc: $(OPENSSL_DEP) src/core/tsi/ssl/session_cache/ssl_session_openssl.cc: $(OPENSSL_DEP) src/core/tsi/ssl_transport_security.cc: $(OPENSSL_DEP) src/core/tsi/transport_security.cc: $(OPENSSL_DEP) -src/core/tsi/transport_security_adapter.cc: $(OPENSSL_DEP) src/core/tsi/transport_security_grpc.cc: $(OPENSSL_DEP) src/cpp/client/cronet_credentials.cc: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 930236eb7d..1bc2adbb8c 100644 --- a/build.yaml +++ b/build.yaml @@ -1080,11 +1080,9 @@ filegroups: - name: tsi_interface headers: - src/core/tsi/transport_security.h - - src/core/tsi/transport_security_adapter.h - src/core/tsi/transport_security_interface.h src: - src/core/tsi/transport_security.cc - - src/core/tsi/transport_security_adapter.cc deps: - gpr secure: true diff --git a/config.m4 b/config.m4 index df06259606..ee2aca4fa5 100644 --- a/config.m4 +++ b/config.m4 @@ -321,7 +321,6 @@ if test "$PHP_GRPC" != "no"; then third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ src/core/tsi/transport_security.cc \ - src/core/tsi/transport_security_adapter.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ src/core/ext/transport/chttp2/client/authority.cc \ diff --git a/config.w32 b/config.w32 index f60a5b746d..abca8e22f2 100644 --- a/config.w32 +++ b/config.w32 @@ -297,7 +297,6 @@ if (PHP_GRPC != "no") { "third_party\\nanopb\\pb_decode.c " + "third_party\\nanopb\\pb_encode.c " + "src\\core\\tsi\\transport_security.cc " + - "src\\core\\tsi\\transport_security_adapter.cc " + "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create.cc " + "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create_posix.cc " + "src\\core\\ext\\transport\\chttp2\\client\\authority.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index fe082ef3af..29b79e0b01 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -308,7 +308,6 @@ Pod::Spec.new do |s| 'src/core/tsi/alts/handshaker/handshaker.pb.h', 'src/core/tsi/alts/handshaker/transport_security_common.pb.h', 'src/core/tsi/transport_security.h', - 'src/core/tsi/transport_security_adapter.h', 'src/core/tsi/transport_security_interface.h', 'src/core/ext/transport/chttp2/client/authority.h', 'src/core/ext/transport/chttp2/client/chttp2_connector.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index f6374ebfcd..ce6ff76806 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -318,7 +318,6 @@ Pod::Spec.new do |s| 'src/core/tsi/alts/handshaker/handshaker.pb.h', 'src/core/tsi/alts/handshaker/transport_security_common.pb.h', 'src/core/tsi/transport_security.h', - 'src/core/tsi/transport_security_adapter.h', 'src/core/tsi/transport_security_interface.h', 'src/core/ext/transport/chttp2/client/authority.h', 'src/core/ext/transport/chttp2/client/chttp2_connector.h', @@ -737,7 +736,6 @@ Pod::Spec.new do |s| 'src/core/tsi/alts/handshaker/handshaker.pb.c', 'src/core/tsi/alts/handshaker/transport_security_common.pb.c', 'src/core/tsi/transport_security.cc', - 'src/core/tsi/transport_security_adapter.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', 'src/core/ext/transport/chttp2/client/authority.cc', @@ -898,7 +896,6 @@ Pod::Spec.new do |s| 'src/core/tsi/alts/handshaker/handshaker.pb.h', 'src/core/tsi/alts/handshaker/transport_security_common.pb.h', 'src/core/tsi/transport_security.h', - 'src/core/tsi/transport_security_adapter.h', 'src/core/tsi/transport_security_interface.h', 'src/core/ext/transport/chttp2/client/authority.h', 'src/core/ext/transport/chttp2/client/chttp2_connector.h', diff --git a/grpc.gemspec b/grpc.gemspec index bb40a3ba02..2a66801e34 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -253,7 +253,6 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_decode.h ) s.files += %w( third_party/nanopb/pb_encode.h ) s.files += %w( src/core/tsi/transport_security.h ) - s.files += %w( src/core/tsi/transport_security_adapter.h ) s.files += %w( src/core/tsi/transport_security_interface.h ) s.files += %w( src/core/ext/transport/chttp2/client/authority.h ) s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.h ) @@ -675,7 +674,6 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_decode.c ) s.files += %w( third_party/nanopb/pb_encode.c ) s.files += %w( src/core/tsi/transport_security.cc ) - s.files += %w( src/core/tsi/transport_security_adapter.cc ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.cc ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc ) s.files += %w( src/core/ext/transport/chttp2/client/authority.cc ) diff --git a/grpc.gyp b/grpc.gyp index fff7c5380a..5726719521 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -481,7 +481,6 @@ 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', 'src/core/tsi/transport_security.cc', - 'src/core/tsi/transport_security_adapter.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', 'src/core/ext/transport/chttp2/client/authority.cc', diff --git a/package.xml b/package.xml index 75a69931a4..ac9b520fb7 100644 --- a/package.xml +++ b/package.xml @@ -260,7 +260,6 @@ - @@ -682,7 +681,6 @@ - diff --git a/src/core/lib/http/httpcli_security_connector.cc b/src/core/lib/http/httpcli_security_connector.cc index 0b53d63e77..50078c37a1 100644 --- a/src/core/lib/http/httpcli_security_connector.cc +++ b/src/core/lib/http/httpcli_security_connector.cc @@ -32,7 +32,6 @@ #include "src/core/lib/security/transport/security_handshaker.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/ssl_transport_security.h" -#include "src/core/tsi/transport_security_adapter.h" typedef struct { grpc_channel_security_connector base; @@ -65,8 +64,7 @@ static void httpcli_ssl_add_handshakers(grpc_channel_security_connector* sc, } } grpc_handshake_manager_add( - handshake_mgr, grpc_security_handshaker_create( - tsi_create_adapter_handshaker(handshaker), &sc->base)); + handshake_mgr, grpc_security_handshaker_create(handshaker, &sc->base)); } static void httpcli_ssl_check_peer(grpc_security_connector* sc, tsi_peer peer, diff --git a/src/core/lib/security/security_connector/security_connector.cc b/src/core/lib/security/security_connector/security_connector.cc index 6eae30a6e5..a30696703f 100644 --- a/src/core/lib/security/security_connector/security_connector.cc +++ b/src/core/lib/security/security_connector/security_connector.cc @@ -44,7 +44,6 @@ #include "src/core/lib/security/transport/target_authority_table.h" #include "src/core/tsi/fake_transport_security.h" #include "src/core/tsi/ssl_transport_security.h" -#include "src/core/tsi/transport_security_adapter.h" grpc_core::DebugOnlyTraceFlag grpc_trace_security_connector_refcount( false, "security_connector_refcount"); @@ -673,8 +672,7 @@ static void ssl_channel_add_handshakers(grpc_channel_security_connector* sc, } // Create handshakers. grpc_handshake_manager_add( - handshake_mgr, grpc_security_handshaker_create( - tsi_create_adapter_handshaker(tsi_hs), &sc->base)); + handshake_mgr, grpc_security_handshaker_create(tsi_hs, &sc->base)); } static const char** fill_alpn_protocol_strings(size_t* num_alpn_protocols) { @@ -782,8 +780,7 @@ static void ssl_server_add_handshakers(grpc_server_security_connector* sc, } // Create handshakers. grpc_handshake_manager_add( - handshake_mgr, grpc_security_handshaker_create( - tsi_create_adapter_handshaker(tsi_hs), &sc->base)); + handshake_mgr, grpc_security_handshaker_create(tsi_hs, &sc->base)); } int grpc_ssl_host_matches_name(const tsi_peer* peer, const char* peer_name) { diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 8d0729ba05..8065a8b185 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -57,6 +57,7 @@ extern "C" { #define TSI_SSL_MAX_PROTECTED_FRAME_SIZE_UPPER_BOUND 16384 #define TSI_SSL_MAX_PROTECTED_FRAME_SIZE_LOWER_BOUND 1024 +#define TSI_SSL_HANDSHAKER_OUTGOING_BUFFER_INITIAL_SIZE 1024 /* Putting a macro like this and littering the source file with #if is really bad practice. @@ -105,9 +106,19 @@ typedef struct { SSL* ssl; BIO* network_io; tsi_result result; + unsigned char* outgoing_bytes_buffer; + size_t outgoing_bytes_buffer_size; tsi_ssl_handshaker_factory* factory_ref; } tsi_ssl_handshaker; +typedef struct { + tsi_handshaker_result base; + SSL* ssl; + BIO* network_io; + unsigned char* unused_bytes; + size_t unused_bytes_size; +} tsi_ssl_handshaker_result; + typedef struct { tsi_frame_protector base; SSL* ssl; @@ -994,94 +1005,15 @@ static void tsi_ssl_handshaker_factory_init( gpr_ref_init(&factory->refcount, 1); } -/* --- tsi_handshaker methods implementation. ---*/ - -static tsi_result ssl_handshaker_get_bytes_to_send_to_peer(tsi_handshaker* self, - unsigned char* bytes, - size_t* bytes_size) { - tsi_ssl_handshaker* impl = reinterpret_cast(self); - int bytes_read_from_ssl = 0; - if (bytes == nullptr || bytes_size == nullptr || *bytes_size == 0 || - *bytes_size > INT_MAX) { - return TSI_INVALID_ARGUMENT; - } - GPR_ASSERT(*bytes_size <= INT_MAX); - bytes_read_from_ssl = - BIO_read(impl->network_io, bytes, static_cast(*bytes_size)); - if (bytes_read_from_ssl < 0) { - *bytes_size = 0; - if (!BIO_should_retry(impl->network_io)) { - impl->result = TSI_INTERNAL_ERROR; - return impl->result; - } else { - return TSI_OK; - } - } - *bytes_size = static_cast(bytes_read_from_ssl); - return BIO_pending(impl->network_io) == 0 ? TSI_OK : TSI_INCOMPLETE_DATA; -} - -static tsi_result ssl_handshaker_get_result(tsi_handshaker* self) { - tsi_ssl_handshaker* impl = reinterpret_cast(self); - if ((impl->result == TSI_HANDSHAKE_IN_PROGRESS) && - SSL_is_init_finished(impl->ssl)) { - impl->result = TSI_OK; - } - return impl->result; -} - -static tsi_result ssl_handshaker_process_bytes_from_peer( - tsi_handshaker* self, const unsigned char* bytes, size_t* bytes_size) { - tsi_ssl_handshaker* impl = reinterpret_cast(self); - int bytes_written_into_ssl_size = 0; - if (bytes == nullptr || bytes_size == nullptr || *bytes_size > INT_MAX) { - return TSI_INVALID_ARGUMENT; - } - GPR_ASSERT(*bytes_size <= INT_MAX); - bytes_written_into_ssl_size = - BIO_write(impl->network_io, bytes, static_cast(*bytes_size)); - if (bytes_written_into_ssl_size < 0) { - gpr_log(GPR_ERROR, "Could not write to memory BIO."); - impl->result = TSI_INTERNAL_ERROR; - return impl->result; - } - *bytes_size = static_cast(bytes_written_into_ssl_size); - - if (!tsi_handshaker_is_in_progress(self)) { - impl->result = TSI_OK; - return impl->result; - } else { - /* Get ready to get some bytes from SSL. */ - int ssl_result = SSL_do_handshake(impl->ssl); - ssl_result = SSL_get_error(impl->ssl, ssl_result); - switch (ssl_result) { - case SSL_ERROR_WANT_READ: - if (BIO_pending(impl->network_io) == 0) { - /* We need more data. */ - return TSI_INCOMPLETE_DATA; - } else { - return TSI_OK; - } - case SSL_ERROR_NONE: - return TSI_OK; - default: { - char err_str[256]; - ERR_error_string_n(ERR_get_error(), err_str, sizeof(err_str)); - gpr_log(GPR_ERROR, "Handshake failed with fatal error %s: %s.", - ssl_error_string(ssl_result), err_str); - impl->result = TSI_PROTOCOL_FAILURE; - return impl->result; - } - } - } -} +/* --- tsi_handshaker_result methods implementation. ---*/ -static tsi_result ssl_handshaker_extract_peer(tsi_handshaker* self, - tsi_peer* peer) { +static tsi_result ssl_handshaker_result_extract_peer( + const tsi_handshaker_result* self, tsi_peer* peer) { tsi_result result = TSI_OK; const unsigned char* alpn_selected = nullptr; unsigned int alpn_selected_len; - tsi_ssl_handshaker* impl = reinterpret_cast(self); + const tsi_ssl_handshaker_result* impl = + reinterpret_cast(self); X509* peer_cert = SSL_get_peer_certificate(impl->ssl); if (peer_cert != nullptr) { result = peer_from_x509(peer_cert, 1, peer); @@ -1127,12 +1059,14 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker* self, return result; } -static tsi_result ssl_handshaker_create_frame_protector( - tsi_handshaker* self, size_t* max_output_protected_frame_size, +static tsi_result ssl_handshaker_result_create_frame_protector( + const tsi_handshaker_result* self, size_t* max_output_protected_frame_size, tsi_frame_protector** protector) { size_t actual_max_output_protected_frame_size = TSI_SSL_MAX_PROTECTED_FRAME_SIZE_UPPER_BOUND; - tsi_ssl_handshaker* impl = reinterpret_cast(self); + tsi_ssl_handshaker_result* impl = + reinterpret_cast( + const_cast(self)); tsi_ssl_frame_protector* protector_impl = static_cast( gpr_zalloc(sizeof(*protector_impl))); @@ -1160,35 +1094,217 @@ static tsi_result ssl_handshaker_create_frame_protector( return TSI_INTERNAL_ERROR; } - /* Transfer ownership of ssl and network_io to the frame protector. It is OK - * as the caller cannot call anything else but destroy on the handshaker - * after this call. */ + /* Transfer ownership of ssl and network_io to the frame protector. */ protector_impl->ssl = impl->ssl; impl->ssl = nullptr; protector_impl->network_io = impl->network_io; impl->network_io = nullptr; - protector_impl->base.vtable = &frame_protector_vtable; *protector = &protector_impl->base; return TSI_OK; } +static tsi_result ssl_handshaker_result_get_unused_bytes( + const tsi_handshaker_result* self, const unsigned char** bytes, + size_t* bytes_size) { + const tsi_ssl_handshaker_result* impl = + reinterpret_cast(self); + *bytes_size = impl->unused_bytes_size; + *bytes = impl->unused_bytes; + return TSI_OK; +} + +static void ssl_handshaker_result_destroy(tsi_handshaker_result* self) { + tsi_ssl_handshaker_result* impl = + reinterpret_cast(self); + SSL_free(impl->ssl); + BIO_free(impl->network_io); + gpr_free(impl->unused_bytes); + gpr_free(impl); +} + +static const tsi_handshaker_result_vtable handshaker_result_vtable = { + ssl_handshaker_result_extract_peer, + nullptr, /* create_zero_copy_grpc_protector */ + ssl_handshaker_result_create_frame_protector, + ssl_handshaker_result_get_unused_bytes, + ssl_handshaker_result_destroy, +}; + +static tsi_result ssl_handshaker_result_create( + tsi_ssl_handshaker* handshaker, const unsigned char* unused_bytes, + size_t unused_bytes_size, tsi_handshaker_result** handshaker_result) { + if (handshaker == nullptr || handshaker_result == nullptr || + (unused_bytes_size > 0 && unused_bytes == nullptr)) { + return TSI_INVALID_ARGUMENT; + } + tsi_ssl_handshaker_result* result = + static_cast(gpr_zalloc(sizeof(*result))); + result->base.vtable = &handshaker_result_vtable; + /* Transfer ownership of ssl and network_io to the handshaker result. */ + result->ssl = handshaker->ssl; + handshaker->ssl = nullptr; + result->network_io = handshaker->network_io; + handshaker->network_io = nullptr; + if (unused_bytes_size > 0) { + result->unused_bytes = + static_cast(gpr_malloc(unused_bytes_size)); + memcpy(result->unused_bytes, unused_bytes, unused_bytes_size); + } + result->unused_bytes_size = unused_bytes_size; + *handshaker_result = &result->base; + return TSI_OK; +} + +/* --- tsi_handshaker methods implementation. ---*/ + +static tsi_result ssl_handshaker_get_bytes_to_send_to_peer( + tsi_ssl_handshaker* impl, unsigned char* bytes, size_t* bytes_size) { + int bytes_read_from_ssl = 0; + if (bytes == nullptr || bytes_size == nullptr || *bytes_size == 0 || + *bytes_size > INT_MAX) { + return TSI_INVALID_ARGUMENT; + } + GPR_ASSERT(*bytes_size <= INT_MAX); + bytes_read_from_ssl = + BIO_read(impl->network_io, bytes, static_cast(*bytes_size)); + if (bytes_read_from_ssl < 0) { + *bytes_size = 0; + if (!BIO_should_retry(impl->network_io)) { + impl->result = TSI_INTERNAL_ERROR; + return impl->result; + } else { + return TSI_OK; + } + } + *bytes_size = static_cast(bytes_read_from_ssl); + return BIO_pending(impl->network_io) == 0 ? TSI_OK : TSI_INCOMPLETE_DATA; +} + +static tsi_result ssl_handshaker_get_result(tsi_ssl_handshaker* impl) { + if ((impl->result == TSI_HANDSHAKE_IN_PROGRESS) && + SSL_is_init_finished(impl->ssl)) { + impl->result = TSI_OK; + } + return impl->result; +} + +static tsi_result ssl_handshaker_process_bytes_from_peer( + tsi_ssl_handshaker* impl, const unsigned char* bytes, size_t* bytes_size) { + int bytes_written_into_ssl_size = 0; + if (bytes == nullptr || bytes_size == nullptr || *bytes_size > INT_MAX) { + return TSI_INVALID_ARGUMENT; + } + GPR_ASSERT(*bytes_size <= INT_MAX); + bytes_written_into_ssl_size = + BIO_write(impl->network_io, bytes, static_cast(*bytes_size)); + if (bytes_written_into_ssl_size < 0) { + gpr_log(GPR_ERROR, "Could not write to memory BIO."); + impl->result = TSI_INTERNAL_ERROR; + return impl->result; + } + *bytes_size = static_cast(bytes_written_into_ssl_size); + + if (ssl_handshaker_get_result(impl) != TSI_HANDSHAKE_IN_PROGRESS) { + impl->result = TSI_OK; + return impl->result; + } else { + /* Get ready to get some bytes from SSL. */ + int ssl_result = SSL_do_handshake(impl->ssl); + ssl_result = SSL_get_error(impl->ssl, ssl_result); + switch (ssl_result) { + case SSL_ERROR_WANT_READ: + if (BIO_pending(impl->network_io) == 0) { + /* We need more data. */ + return TSI_INCOMPLETE_DATA; + } else { + return TSI_OK; + } + case SSL_ERROR_NONE: + return TSI_OK; + default: { + char err_str[256]; + ERR_error_string_n(ERR_get_error(), err_str, sizeof(err_str)); + gpr_log(GPR_ERROR, "Handshake failed with fatal error %s: %s.", + ssl_error_string(ssl_result), err_str); + impl->result = TSI_PROTOCOL_FAILURE; + return impl->result; + } + } + } +} + static void ssl_handshaker_destroy(tsi_handshaker* self) { tsi_ssl_handshaker* impl = reinterpret_cast(self); SSL_free(impl->ssl); BIO_free(impl->network_io); + gpr_free(impl->outgoing_bytes_buffer); tsi_ssl_handshaker_factory_unref(impl->factory_ref); gpr_free(impl); } +static tsi_result ssl_handshaker_next( + tsi_handshaker* self, const unsigned char* received_bytes, + size_t received_bytes_size, const unsigned char** bytes_to_send, + size_t* bytes_to_send_size, tsi_handshaker_result** handshaker_result, + tsi_handshaker_on_next_done_cb cb, void* user_data) { + /* Input sanity check. */ + if ((received_bytes_size > 0 && received_bytes == nullptr) || + bytes_to_send == nullptr || bytes_to_send_size == nullptr || + handshaker_result == nullptr) { + return TSI_INVALID_ARGUMENT; + } + /* If there are received bytes, process them first. */ + tsi_ssl_handshaker* impl = reinterpret_cast(self); + tsi_result status = TSI_OK; + size_t bytes_consumed = received_bytes_size; + if (received_bytes_size > 0) { + status = ssl_handshaker_process_bytes_from_peer(impl, received_bytes, + &bytes_consumed); + if (status != TSI_OK) return status; + } + /* Get bytes to send to the peer, if available. */ + size_t offset = 0; + do { + size_t to_send_size = impl->outgoing_bytes_buffer_size - offset; + status = ssl_handshaker_get_bytes_to_send_to_peer( + impl, impl->outgoing_bytes_buffer + offset, &to_send_size); + offset += to_send_size; + if (status == TSI_INCOMPLETE_DATA) { + impl->outgoing_bytes_buffer_size *= 2; + impl->outgoing_bytes_buffer = static_cast(gpr_realloc( + impl->outgoing_bytes_buffer, impl->outgoing_bytes_buffer_size)); + } + } while (status == TSI_INCOMPLETE_DATA); + if (status != TSI_OK) return status; + *bytes_to_send = impl->outgoing_bytes_buffer; + *bytes_to_send_size = offset; + /* If handshake completes, create tsi_handshaker_result. */ + if (ssl_handshaker_get_result(impl) == TSI_HANDSHAKE_IN_PROGRESS) { + *handshaker_result = nullptr; + } else { + size_t unused_bytes_size = received_bytes_size - bytes_consumed; + const unsigned char* unused_bytes = + unused_bytes_size == 0 ? nullptr : received_bytes + bytes_consumed; + status = ssl_handshaker_result_create(impl, unused_bytes, unused_bytes_size, + handshaker_result); + if (status == TSI_OK) { + /* Indicates that the handshake has completed and that a handshaker_result + * has been created. */ + self->handshaker_result_created = true; + } + } + return status; +} + static const tsi_handshaker_vtable handshaker_vtable = { - ssl_handshaker_get_bytes_to_send_to_peer, - ssl_handshaker_process_bytes_from_peer, - ssl_handshaker_get_result, - ssl_handshaker_extract_peer, - ssl_handshaker_create_frame_protector, + nullptr, /* get_bytes_to_send_to_peer -- deprecated */ + nullptr, /* process_bytes_from_peer -- deprecated */ + nullptr, /* get_result -- deprecated */ + nullptr, /* extract_peer -- deprecated */ + nullptr, /* create_frame_protector -- deprecated */ ssl_handshaker_destroy, - nullptr, + ssl_handshaker_next, nullptr, /* shutdown */ }; @@ -1267,6 +1383,10 @@ static tsi_result create_tsi_ssl_handshaker(SSL_CTX* ctx, int is_client, impl->ssl = ssl; impl->network_io = network_io; impl->result = TSI_HANDSHAKE_IN_PROGRESS; + impl->outgoing_bytes_buffer_size = + TSI_SSL_HANDSHAKER_OUTGOING_BUFFER_INITIAL_SIZE; + impl->outgoing_bytes_buffer = + static_cast(gpr_zalloc(impl->outgoing_bytes_buffer_size)); impl->base.vtable = &handshaker_vtable; impl->factory_ref = tsi_ssl_handshaker_factory_ref(factory); diff --git a/src/core/tsi/transport_security_adapter.cc b/src/core/tsi/transport_security_adapter.cc deleted file mode 100644 index 642188e619..0000000000 --- a/src/core/tsi/transport_security_adapter.cc +++ /dev/null @@ -1,242 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include - -#include "src/core/tsi/transport_security_adapter.h" - -#include - -#include -#include -#include "src/core/tsi/transport_security.h" - -#define TSI_ADAPTER_INITIAL_BUFFER_SIZE 256 - -/* --- tsi_adapter_handshaker_result implementation ---*/ - -typedef struct { - tsi_handshaker_result base; - tsi_handshaker* wrapped; - unsigned char* unused_bytes; - size_t unused_bytes_size; -} tsi_adapter_handshaker_result; - -static tsi_result adapter_result_extract_peer(const tsi_handshaker_result* self, - tsi_peer* peer) { - tsi_adapter_handshaker_result* impl = (tsi_adapter_handshaker_result*)self; - return tsi_handshaker_extract_peer(impl->wrapped, peer); -} - -static tsi_result adapter_result_create_frame_protector( - const tsi_handshaker_result* self, size_t* max_output_protected_frame_size, - tsi_frame_protector** protector) { - tsi_adapter_handshaker_result* impl = (tsi_adapter_handshaker_result*)self; - return tsi_handshaker_create_frame_protector( - impl->wrapped, max_output_protected_frame_size, protector); -} - -static tsi_result adapter_result_get_unused_bytes( - const tsi_handshaker_result* self, const unsigned char** bytes, - size_t* byte_size) { - tsi_adapter_handshaker_result* impl = (tsi_adapter_handshaker_result*)self; - *bytes = impl->unused_bytes; - *byte_size = impl->unused_bytes_size; - return TSI_OK; -} - -static void adapter_result_destroy(tsi_handshaker_result* self) { - tsi_adapter_handshaker_result* impl = - reinterpret_cast(self); - tsi_handshaker_destroy(impl->wrapped); - gpr_free(impl->unused_bytes); - gpr_free(self); -} - -static const tsi_handshaker_result_vtable result_vtable = { - adapter_result_extract_peer, - nullptr, /* create_zero_copy_grpc_protector */ - adapter_result_create_frame_protector, - adapter_result_get_unused_bytes, - adapter_result_destroy, -}; - -/* Ownership of wrapped tsi_handshaker is transferred to the result object. */ -static tsi_result tsi_adapter_create_handshaker_result( - tsi_handshaker* wrapped, const unsigned char* unused_bytes, - size_t unused_bytes_size, tsi_handshaker_result** handshaker_result) { - if (wrapped == nullptr || - (unused_bytes_size > 0 && unused_bytes == nullptr)) { - return TSI_INVALID_ARGUMENT; - } - tsi_adapter_handshaker_result* impl = - static_cast(gpr_zalloc(sizeof(*impl))); - impl->base.vtable = &result_vtable; - impl->wrapped = wrapped; - impl->unused_bytes_size = unused_bytes_size; - if (unused_bytes_size > 0) { - impl->unused_bytes = - static_cast(gpr_malloc(unused_bytes_size)); - memcpy(impl->unused_bytes, unused_bytes, unused_bytes_size); - } else { - impl->unused_bytes = nullptr; - } - *handshaker_result = &impl->base; - return TSI_OK; -} - -/* --- tsi_adapter_handshaker implementation ---*/ - -typedef struct { - tsi_handshaker base; - tsi_handshaker* wrapped; - unsigned char* adapter_buffer; - size_t adapter_buffer_size; -} tsi_adapter_handshaker; - -static tsi_result adapter_get_bytes_to_send_to_peer(tsi_handshaker* self, - unsigned char* bytes, - size_t* bytes_size) { - return tsi_handshaker_get_bytes_to_send_to_peer( - tsi_adapter_handshaker_get_wrapped(self), bytes, bytes_size); -} - -static tsi_result adapter_process_bytes_from_peer(tsi_handshaker* self, - const unsigned char* bytes, - size_t* bytes_size) { - return tsi_handshaker_process_bytes_from_peer( - tsi_adapter_handshaker_get_wrapped(self), bytes, bytes_size); -} - -static tsi_result adapter_get_result(tsi_handshaker* self) { - return tsi_handshaker_get_result(tsi_adapter_handshaker_get_wrapped(self)); -} - -static tsi_result adapter_extract_peer(tsi_handshaker* self, tsi_peer* peer) { - return tsi_handshaker_extract_peer(tsi_adapter_handshaker_get_wrapped(self), - peer); -} - -static tsi_result adapter_create_frame_protector( - tsi_handshaker* self, size_t* max_protected_frame_size, - tsi_frame_protector** protector) { - return tsi_handshaker_create_frame_protector( - tsi_adapter_handshaker_get_wrapped(self), max_protected_frame_size, - protector); -} - -static void adapter_destroy(tsi_handshaker* self) { - tsi_adapter_handshaker* impl = - reinterpret_cast(self); - tsi_handshaker_destroy(impl->wrapped); - gpr_free(impl->adapter_buffer); - gpr_free(self); -} - -static void adapter_shutdown(tsi_handshaker* self) { - tsi_adapter_handshaker* impl = - reinterpret_cast(self); - tsi_handshaker_shutdown(impl->wrapped); -} - -static tsi_result adapter_next( - tsi_handshaker* self, const unsigned char* received_bytes, - size_t received_bytes_size, const unsigned char** bytes_to_send, - size_t* bytes_to_send_size, tsi_handshaker_result** handshaker_result, - tsi_handshaker_on_next_done_cb cb, void* user_data) { - /* Input sanity check. */ - if ((received_bytes_size > 0 && received_bytes == nullptr) || - bytes_to_send == nullptr || bytes_to_send_size == nullptr || - handshaker_result == nullptr) { - return TSI_INVALID_ARGUMENT; - } - - /* If there are received bytes, process them first. */ - tsi_adapter_handshaker* impl = - reinterpret_cast(self); - tsi_result status = TSI_OK; - size_t bytes_consumed = received_bytes_size; - if (received_bytes_size > 0) { - status = tsi_handshaker_process_bytes_from_peer( - impl->wrapped, received_bytes, &bytes_consumed); - if (status != TSI_OK) return status; - } - - /* Get bytes to send to the peer, if available. */ - size_t offset = 0; - do { - size_t to_send_size = impl->adapter_buffer_size - offset; - status = tsi_handshaker_get_bytes_to_send_to_peer( - impl->wrapped, impl->adapter_buffer + offset, &to_send_size); - offset += to_send_size; - if (status == TSI_INCOMPLETE_DATA) { - impl->adapter_buffer_size *= 2; - impl->adapter_buffer = static_cast( - gpr_realloc(impl->adapter_buffer, impl->adapter_buffer_size)); - } - } while (status == TSI_INCOMPLETE_DATA); - if (status != TSI_OK) return status; - *bytes_to_send = impl->adapter_buffer; - *bytes_to_send_size = offset; - - /* If handshake completes, create tsi_handshaker_result. */ - if (tsi_handshaker_is_in_progress(impl->wrapped)) { - *handshaker_result = nullptr; - } else { - size_t unused_bytes_size = received_bytes_size - bytes_consumed; - const unsigned char* unused_bytes = - unused_bytes_size == 0 ? nullptr : received_bytes + bytes_consumed; - status = tsi_adapter_create_handshaker_result( - impl->wrapped, unused_bytes, unused_bytes_size, handshaker_result); - if (status == TSI_OK) { - impl->base.handshaker_result_created = true; - impl->wrapped = nullptr; - } - } - return status; -} - -static const tsi_handshaker_vtable handshaker_vtable = { - adapter_get_bytes_to_send_to_peer, - adapter_process_bytes_from_peer, - adapter_get_result, - adapter_extract_peer, - adapter_create_frame_protector, - adapter_destroy, - adapter_next, - adapter_shutdown, -}; - -tsi_handshaker* tsi_create_adapter_handshaker(tsi_handshaker* wrapped) { - GPR_ASSERT(wrapped != nullptr); - tsi_adapter_handshaker* impl = - static_cast(gpr_zalloc(sizeof(*impl))); - impl->base.vtable = &handshaker_vtable; - impl->wrapped = wrapped; - impl->adapter_buffer_size = TSI_ADAPTER_INITIAL_BUFFER_SIZE; - impl->adapter_buffer = - static_cast(gpr_malloc(impl->adapter_buffer_size)); - return &impl->base; -} - -tsi_handshaker* tsi_adapter_handshaker_get_wrapped(tsi_handshaker* adapter) { - if (adapter == nullptr) return nullptr; - tsi_adapter_handshaker* impl = - reinterpret_cast(adapter); - return impl->wrapped; -} diff --git a/src/core/tsi/transport_security_adapter.h b/src/core/tsi/transport_security_adapter.h deleted file mode 100644 index f83ecc53e5..0000000000 --- a/src/core/tsi/transport_security_adapter.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPC_CORE_TSI_TRANSPORT_SECURITY_ADAPTER_H -#define GRPC_CORE_TSI_TRANSPORT_SECURITY_ADAPTER_H - -#include - -#include "src/core/tsi/transport_security_interface.h" - -/* Create a tsi handshaker that takes an implementation of old interface and - converts into an implementation of new interface. In the old interface, - there are get_bytes_to_send_to_peer, process_bytes_from_peer, get_result, - extract_peer, and create_frame_protector. In the new interface, only next - method is needed. See transport_security_interface.h for details. Note that - this tsi adapter handshaker is temporary. It will be removed once TSI has - been fully migrated to the new interface. - Ownership of input tsi_handshaker is transferred to this new adapter. */ -tsi_handshaker* tsi_create_adapter_handshaker(tsi_handshaker* wrapped); - -/* Given a tsi adapter handshaker, return the original wrapped handshaker. The - adapter still owns the wrapped handshaker which should not be destroyed by - the caller. */ -tsi_handshaker* tsi_adapter_handshaker_get_wrapped(tsi_handshaker* adapter); - -#endif /* GRPC_CORE_TSI_TRANSPORT_SECURITY_ADAPTER_H */ diff --git a/src/core/tsi/transport_security_interface.h b/src/core/tsi/transport_security_interface.h index 07f2bdfd81..7a0cdc3453 100644 --- a/src/core/tsi/transport_security_interface.h +++ b/src/core/tsi/transport_security_interface.h @@ -333,6 +333,8 @@ void tsi_handshaker_result_destroy(tsi_handshaker_result* self); ------------------------------------------------------------------------ */ typedef struct tsi_handshaker tsi_handshaker; +/* TODO(jiangtaoli2016): Cleans up deprecated methods when we are ready. */ + /* TO BE DEPRECATED SOON. Use tsi_handshaker_next instead. Gets bytes that need to be sent to the peer. - bytes is the buffer that will be written with the data to be sent to the diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 234f7634e2..699d504c12 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -296,7 +296,6 @@ CORE_SOURCE_FILES = [ 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', 'src/core/tsi/transport_security.cc', - 'src/core/tsi/transport_security_adapter.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', 'src/core/ext/transport/chttp2/client/authority.cc', diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index cf1ac82413..b477904d60 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -24,7 +24,6 @@ #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" -#include "src/core/tsi/transport_security_adapter.h" #include "src/core/tsi/transport_security_interface.h" #include "test/core/tsi/transport_security_test_lib.h" #include "test/core/util/test_config.h" @@ -164,19 +163,13 @@ static void ssl_test_setup_handshakers(tsi_test_fixture* fixture) { &server_options, &ssl_fixture->server_handshaker_factory) == TSI_OK); /* Create server and client handshakers. */ - tsi_handshaker* client_handshaker = nullptr; GPR_ASSERT(tsi_ssl_client_handshaker_factory_create_handshaker( ssl_fixture->client_handshaker_factory, ssl_fixture->server_name_indication, - &client_handshaker) == TSI_OK); - ssl_fixture->base.client_handshaker = - tsi_create_adapter_handshaker(client_handshaker); - tsi_handshaker* server_handshaker = nullptr; + &ssl_fixture->base.client_handshaker) == TSI_OK); GPR_ASSERT(tsi_ssl_server_handshaker_factory_create_handshaker( - ssl_fixture->server_handshaker_factory, &server_handshaker) == - TSI_OK); - ssl_fixture->base.server_handshaker = - tsi_create_adapter_handshaker(server_handshaker); + ssl_fixture->server_handshaker_factory, + &ssl_fixture->base.server_handshaker) == TSI_OK); } static void check_alpn(ssl_tsi_test_fixture* ssl_fixture, diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 82b4769544..0969b9cfb2 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1496,8 +1496,6 @@ src/core/tsi/ssl_transport_security.h \ src/core/tsi/ssl_types.h \ src/core/tsi/transport_security.cc \ src/core/tsi/transport_security.h \ -src/core/tsi/transport_security_adapter.cc \ -src/core/tsi/transport_security_adapter.h \ src/core/tsi/transport_security_grpc.cc \ src/core/tsi/transport_security_grpc.h \ src/core/tsi/transport_security_interface.h \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 7fc32d973a..4f0fc1d30d 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -10702,7 +10702,6 @@ ], "headers": [ "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_adapter.h", "src/core/tsi/transport_security_interface.h" ], "is_filegroup": true, @@ -10711,8 +10710,6 @@ "src": [ "src/core/tsi/transport_security.cc", "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_adapter.cc", - "src/core/tsi/transport_security_adapter.h", "src/core/tsi/transport_security_interface.h" ], "third_party": false, -- cgit v1.2.3 From bba8840a4bfd0696ef257b5cce9ded4119aae9a6 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Fri, 11 May 2018 11:54:41 -0400 Subject: Change filename to channelz --- BUILD | 4 +- CMakeLists.txt | 12 ++-- Makefile | 12 ++-- build.yaml | 4 +- config.m4 | 2 +- config.w32 | 2 +- gRPC-C++.podspec | 4 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- grpc.gyp | 8 +-- package.xml | 4 +- src/core/lib/channel/channel_trace.cc | 6 +- src/core/lib/channel/channel_trace_registry.cc | 80 ---------------------- src/core/lib/channel/channel_trace_registry.h | 43 ------------ src/core/lib/channel/channelz_registry.cc | 80 ++++++++++++++++++++++ src/core/lib/channel/channelz_registry.h | 43 ++++++++++++ src/core/lib/surface/init.cc | 6 +- src/python/grpcio/grpc_core_dependencies.py | 2 +- test/core/channel/channel_trace_test.cc | 5 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/generated/sources_and_headers.json | 6 +- 22 files changed, 169 insertions(+), 170 deletions(-) delete mode 100644 src/core/lib/channel/channel_trace_registry.cc delete mode 100644 src/core/lib/channel/channel_trace_registry.h create mode 100644 src/core/lib/channel/channelz_registry.cc create mode 100644 src/core/lib/channel/channelz_registry.h (limited to 'grpc.gyp') diff --git a/BUILD b/BUILD index 4c99052e05..db1bdaa994 100644 --- a/BUILD +++ b/BUILD @@ -678,7 +678,7 @@ grpc_cc_library( "src/core/lib/channel/channel_stack.cc", "src/core/lib/channel/channel_stack_builder.cc", "src/core/lib/channel/channel_trace.cc", - "src/core/lib/channel/channel_trace_registry.cc", + "src/core/lib/channel/channelz_registry.cc", "src/core/lib/channel/connected_channel.cc", "src/core/lib/channel/handshaker.cc", "src/core/lib/channel/handshaker_factory.cc", @@ -825,7 +825,7 @@ grpc_cc_library( "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.h", "src/core/lib/channel/channel_trace.h", - "src/core/lib/channel/channel_trace_registry.h", + "src/core/lib/channel/channelz_registry.h", "src/core/lib/channel/connected_channel.h", "src/core/lib/channel/context.h", "src/core/lib/channel/handshaker.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index f53f4e384c..217de0bcae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -922,7 +922,7 @@ add_library(grpc src/core/lib/channel/channel_stack.cc src/core/lib/channel/channel_stack_builder.cc src/core/lib/channel/channel_trace.cc - src/core/lib/channel/channel_trace_registry.cc + src/core/lib/channel/channelz_registry.cc src/core/lib/channel/connected_channel.cc src/core/lib/channel/handshaker.cc src/core/lib/channel/handshaker_factory.cc @@ -1315,7 +1315,7 @@ add_library(grpc_cronet src/core/lib/channel/channel_stack.cc src/core/lib/channel/channel_stack_builder.cc src/core/lib/channel/channel_trace.cc - src/core/lib/channel/channel_trace_registry.cc + src/core/lib/channel/channelz_registry.cc src/core/lib/channel/connected_channel.cc src/core/lib/channel/handshaker.cc src/core/lib/channel/handshaker_factory.cc @@ -1700,7 +1700,7 @@ add_library(grpc_test_util src/core/lib/channel/channel_stack.cc src/core/lib/channel/channel_stack_builder.cc src/core/lib/channel/channel_trace.cc - src/core/lib/channel/channel_trace_registry.cc + src/core/lib/channel/channelz_registry.cc src/core/lib/channel/connected_channel.cc src/core/lib/channel/handshaker.cc src/core/lib/channel/handshaker_factory.cc @@ -2004,7 +2004,7 @@ add_library(grpc_test_util_unsecure src/core/lib/channel/channel_stack.cc src/core/lib/channel/channel_stack_builder.cc src/core/lib/channel/channel_trace.cc - src/core/lib/channel/channel_trace_registry.cc + src/core/lib/channel/channelz_registry.cc src/core/lib/channel/connected_channel.cc src/core/lib/channel/handshaker.cc src/core/lib/channel/handshaker_factory.cc @@ -2287,7 +2287,7 @@ add_library(grpc_unsecure src/core/lib/channel/channel_stack.cc src/core/lib/channel/channel_stack_builder.cc src/core/lib/channel/channel_trace.cc - src/core/lib/channel/channel_trace_registry.cc + src/core/lib/channel/channelz_registry.cc src/core/lib/channel/connected_channel.cc src/core/lib/channel/handshaker.cc src/core/lib/channel/handshaker_factory.cc @@ -3113,7 +3113,7 @@ add_library(grpc++_cronet src/core/lib/channel/channel_stack.cc src/core/lib/channel/channel_stack_builder.cc src/core/lib/channel/channel_trace.cc - src/core/lib/channel/channel_trace_registry.cc + src/core/lib/channel/channelz_registry.cc src/core/lib/channel/connected_channel.cc src/core/lib/channel/handshaker.cc src/core/lib/channel/handshaker_factory.cc diff --git a/Makefile b/Makefile index 18663c7266..702039438b 100644 --- a/Makefile +++ b/Makefile @@ -3312,7 +3312,7 @@ LIBGRPC_SRC = \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_trace.cc \ - src/core/lib/channel/channel_trace_registry.cc \ + src/core/lib/channel/channelz_registry.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -3705,7 +3705,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_trace.cc \ - src/core/lib/channel/channel_trace_registry.cc \ + src/core/lib/channel/channelz_registry.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -4089,7 +4089,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_trace.cc \ - src/core/lib/channel/channel_trace_registry.cc \ + src/core/lib/channel/channelz_registry.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -4385,7 +4385,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_trace.cc \ - src/core/lib/channel/channel_trace_registry.cc \ + src/core/lib/channel/channelz_registry.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -4647,7 +4647,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_trace.cc \ - src/core/lib/channel/channel_trace_registry.cc \ + src/core/lib/channel/channelz_registry.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -5466,7 +5466,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_trace.cc \ - src/core/lib/channel/channel_trace_registry.cc \ + src/core/lib/channel/channelz_registry.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ diff --git a/build.yaml b/build.yaml index f4812aa538..1f85e6daf0 100644 --- a/build.yaml +++ b/build.yaml @@ -235,7 +235,7 @@ filegroups: - src/core/lib/channel/channel_stack.cc - src/core/lib/channel/channel_stack_builder.cc - src/core/lib/channel/channel_trace.cc - - src/core/lib/channel/channel_trace_registry.cc + - src/core/lib/channel/channelz_registry.cc - src/core/lib/channel/connected_channel.cc - src/core/lib/channel/handshaker.cc - src/core/lib/channel/handshaker_factory.cc @@ -405,7 +405,7 @@ filegroups: - src/core/lib/channel/channel_stack.h - src/core/lib/channel/channel_stack_builder.h - src/core/lib/channel/channel_trace.h - - src/core/lib/channel/channel_trace_registry.h + - src/core/lib/channel/channelz_registry.h - src/core/lib/channel/connected_channel.h - src/core/lib/channel/context.h - src/core/lib/channel/handshaker.h diff --git a/config.m4 b/config.m4 index 3acc72eaa1..ad3df85794 100644 --- a/config.m4 +++ b/config.m4 @@ -89,7 +89,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_trace.cc \ - src/core/lib/channel/channel_trace_registry.cc \ + src/core/lib/channel/channelz_registry.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ diff --git a/config.w32 b/config.w32 index d1a595026f..c09fb93005 100644 --- a/config.w32 +++ b/config.w32 @@ -65,7 +65,7 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\channel\\channel_stack.cc " + "src\\core\\lib\\channel\\channel_stack_builder.cc " + "src\\core\\lib\\channel\\channel_trace.cc " + - "src\\core\\lib\\channel\\channel_trace_registry.cc " + + "src\\core\\lib\\channel\\channelz_registry.cc " + "src\\core\\lib\\channel\\connected_channel.cc " + "src\\core\\lib\\channel\\handshaker.cc " + "src\\core\\lib\\channel\\handshaker_factory.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 0b15bb8532..262de72971 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -347,7 +347,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack_builder.h', 'src/core/lib/channel/channel_trace.h', - 'src/core/lib/channel/channel_trace_registry.h', + 'src/core/lib/channel/channelz_registry.h', 'src/core/lib/channel/connected_channel.h', 'src/core/lib/channel/context.h', 'src/core/lib/channel/handshaker.h', @@ -532,7 +532,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack_builder.h', 'src/core/lib/channel/channel_trace.h', - 'src/core/lib/channel/channel_trace_registry.h', + 'src/core/lib/channel/channelz_registry.h', 'src/core/lib/channel/connected_channel.h', 'src/core/lib/channel/context.h', 'src/core/lib/channel/handshaker.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 89cc95fccd..f3be7129b5 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -357,7 +357,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack_builder.h', 'src/core/lib/channel/channel_trace.h', - 'src/core/lib/channel/channel_trace_registry.h', + 'src/core/lib/channel/channelz_registry.h', 'src/core/lib/channel/connected_channel.h', 'src/core/lib/channel/context.h', 'src/core/lib/channel/handshaker.h', @@ -507,7 +507,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/channel_stack.cc', 'src/core/lib/channel/channel_stack_builder.cc', 'src/core/lib/channel/channel_trace.cc', - 'src/core/lib/channel/channel_trace_registry.cc', + 'src/core/lib/channel/channelz_registry.cc', 'src/core/lib/channel/connected_channel.cc', 'src/core/lib/channel/handshaker.cc', 'src/core/lib/channel/handshaker_factory.cc', @@ -935,7 +935,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack_builder.h', 'src/core/lib/channel/channel_trace.h', - 'src/core/lib/channel/channel_trace_registry.h', + 'src/core/lib/channel/channelz_registry.h', 'src/core/lib/channel/connected_channel.h', 'src/core/lib/channel/context.h', 'src/core/lib/channel/handshaker.h', diff --git a/grpc.gemspec b/grpc.gemspec index 80422ac670..21e83e26ad 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -292,7 +292,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/channel/channel_stack.h ) s.files += %w( src/core/lib/channel/channel_stack_builder.h ) s.files += %w( src/core/lib/channel/channel_trace.h ) - s.files += %w( src/core/lib/channel/channel_trace_registry.h ) + s.files += %w( src/core/lib/channel/channelz_registry.h ) s.files += %w( src/core/lib/channel/connected_channel.h ) s.files += %w( src/core/lib/channel/context.h ) s.files += %w( src/core/lib/channel/handshaker.h ) @@ -442,7 +442,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/channel/channel_stack.cc ) s.files += %w( src/core/lib/channel/channel_stack_builder.cc ) s.files += %w( src/core/lib/channel/channel_trace.cc ) - s.files += %w( src/core/lib/channel/channel_trace_registry.cc ) + s.files += %w( src/core/lib/channel/channelz_registry.cc ) s.files += %w( src/core/lib/channel/connected_channel.cc ) s.files += %w( src/core/lib/channel/handshaker.cc ) s.files += %w( src/core/lib/channel/handshaker_factory.cc ) diff --git a/grpc.gyp b/grpc.gyp index 0d03a66b75..3edfe55f5b 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -249,7 +249,7 @@ 'src/core/lib/channel/channel_stack.cc', 'src/core/lib/channel/channel_stack_builder.cc', 'src/core/lib/channel/channel_trace.cc', - 'src/core/lib/channel/channel_trace_registry.cc', + 'src/core/lib/channel/channelz_registry.cc', 'src/core/lib/channel/connected_channel.cc', 'src/core/lib/channel/handshaker.cc', 'src/core/lib/channel/handshaker_factory.cc', @@ -598,7 +598,7 @@ 'src/core/lib/channel/channel_stack.cc', 'src/core/lib/channel/channel_stack_builder.cc', 'src/core/lib/channel/channel_trace.cc', - 'src/core/lib/channel/channel_trace_registry.cc', + 'src/core/lib/channel/channelz_registry.cc', 'src/core/lib/channel/connected_channel.cc', 'src/core/lib/channel/handshaker.cc', 'src/core/lib/channel/handshaker_factory.cc', @@ -829,7 +829,7 @@ 'src/core/lib/channel/channel_stack.cc', 'src/core/lib/channel/channel_stack_builder.cc', 'src/core/lib/channel/channel_trace.cc', - 'src/core/lib/channel/channel_trace_registry.cc', + 'src/core/lib/channel/channelz_registry.cc', 'src/core/lib/channel/connected_channel.cc', 'src/core/lib/channel/handshaker.cc', 'src/core/lib/channel/handshaker_factory.cc', @@ -1038,7 +1038,7 @@ 'src/core/lib/channel/channel_stack.cc', 'src/core/lib/channel/channel_stack_builder.cc', 'src/core/lib/channel/channel_trace.cc', - 'src/core/lib/channel/channel_trace_registry.cc', + 'src/core/lib/channel/channelz_registry.cc', 'src/core/lib/channel/connected_channel.cc', 'src/core/lib/channel/handshaker.cc', 'src/core/lib/channel/handshaker_factory.cc', diff --git a/package.xml b/package.xml index 4e8d514883..9bfe1e33e5 100644 --- a/package.xml +++ b/package.xml @@ -299,7 +299,7 @@ - + @@ -449,7 +449,7 @@ - + diff --git a/src/core/lib/channel/channel_trace.cc b/src/core/lib/channel/channel_trace.cc index 654300cd32..8665e01776 100644 --- a/src/core/lib/channel/channel_trace.cc +++ b/src/core/lib/channel/channel_trace.cc @@ -28,7 +28,7 @@ #include #include -#include "src/core/lib/channel/channel_trace_registry.h" +#include "src/core/lib/channel/channelz_registry.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" @@ -70,7 +70,7 @@ ChannelTrace::ChannelTrace(size_t max_events) tail_trace_(nullptr) { if (max_list_size_ == 0) return; // tracing is disabled if max_events == 0 gpr_mu_init(&tracer_mu_); - channel_uuid_ = grpc_channel_trace_registry_register_channel_trace(this); + channel_uuid_ = grpc_channelz_registry_register_channel_trace(this); time_created_ = grpc_millis_to_timespec(grpc_core::ExecCtx::Get()->Now(), GPR_CLOCK_REALTIME); } @@ -83,7 +83,7 @@ ChannelTrace::~ChannelTrace() { it = it->next(); Delete(to_free); } - grpc_channel_trace_registry_unregister_channel_trace(channel_uuid_); + grpc_channelz_registry_unregister_channel_trace(channel_uuid_); gpr_mu_destroy(&tracer_mu_); } diff --git a/src/core/lib/channel/channel_trace_registry.cc b/src/core/lib/channel/channel_trace_registry.cc deleted file mode 100644 index 6c82431467..0000000000 --- a/src/core/lib/channel/channel_trace_registry.cc +++ /dev/null @@ -1,80 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include - -#include "src/core/lib/avl/avl.h" -#include "src/core/lib/channel/channel_trace.h" -#include "src/core/lib/channel/channel_trace_registry.h" -#include "src/core/lib/gpr/useful.h" - -#include -#include - -// file global lock and avl. -static gpr_mu g_mu; -static grpc_avl g_avl; -static gpr_atm g_uuid = 0; - -// avl vtable for uuid (intptr_t) -> ChannelTrace -// this table is only looking, it does not own anything. -static void destroy_intptr(void* not_used, void* user_data) {} -static void* copy_intptr(void* key, void* user_data) { return key; } -static long compare_intptr(void* key1, void* key2, void* user_data) { - return GPR_ICMP(key1, key2); -} - -static void destroy_channel_trace(void* trace, void* user_data) {} -static void* copy_channel_trace(void* trace, void* user_data) { return trace; } -static const grpc_avl_vtable avl_vtable = { - destroy_intptr, copy_intptr, compare_intptr, destroy_channel_trace, - copy_channel_trace}; - -void grpc_channel_trace_registry_init() { - gpr_mu_init(&g_mu); - g_avl = grpc_avl_create(&avl_vtable); -} - -void grpc_channel_trace_registry_shutdown() { - grpc_avl_unref(g_avl, nullptr); - gpr_mu_destroy(&g_mu); -} - -intptr_t grpc_channel_trace_registry_register_channel_trace( - grpc_core::ChannelTrace* channel_trace) { - intptr_t prior = gpr_atm_no_barrier_fetch_add(&g_uuid, 1); - gpr_mu_lock(&g_mu); - g_avl = grpc_avl_add(g_avl, (void*)prior, channel_trace, nullptr); - gpr_mu_unlock(&g_mu); - return prior; -} - -void grpc_channel_trace_registry_unregister_channel_trace(intptr_t uuid) { - gpr_mu_lock(&g_mu); - g_avl = grpc_avl_remove(g_avl, (void*)uuid, nullptr); - gpr_mu_unlock(&g_mu); -} - -grpc_core::ChannelTrace* grpc_channel_trace_registry_get_channel_trace( - intptr_t uuid) { - gpr_mu_lock(&g_mu); - grpc_core::ChannelTrace* ret = static_cast( - grpc_avl_get(g_avl, (void*)uuid, nullptr)); - gpr_mu_unlock(&g_mu); - return ret; -} diff --git a/src/core/lib/channel/channel_trace_registry.h b/src/core/lib/channel/channel_trace_registry.h deleted file mode 100644 index 391ecba7de..0000000000 --- a/src/core/lib/channel/channel_trace_registry.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * Copyright 2017 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACE_REGISTRY_H -#define GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACE_REGISTRY_H - -#include - -#include "src/core/lib/channel/channel_trace.h" - -#include - -// TODO(ncteisen): convert this file to C++ - -void grpc_channel_trace_registry_init(); -void grpc_channel_trace_registry_shutdown(); - -// globally registers a ChannelTrace. Returns its unique uuid -intptr_t grpc_channel_trace_registry_register_channel_trace( - grpc_core::ChannelTrace* channel_trace); -// globally unregisters the ChannelTrace that is associated to uuid. -void grpc_channel_trace_registry_unregister_channel_trace(intptr_t uuid); -// if object with uuid has previously been registered, returns the ChannelTrace -// associated with that uuid. Else returns nullptr. -grpc_core::ChannelTrace* grpc_channel_trace_registry_get_channel_trace( - intptr_t uuid); - -#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACE_REGISTRY_H */ diff --git a/src/core/lib/channel/channelz_registry.cc b/src/core/lib/channel/channelz_registry.cc new file mode 100644 index 0000000000..77e23bf69b --- /dev/null +++ b/src/core/lib/channel/channelz_registry.cc @@ -0,0 +1,80 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include "src/core/lib/avl/avl.h" +#include "src/core/lib/channel/channel_trace.h" +#include "src/core/lib/channel/channelz_registry.h" +#include "src/core/lib/gpr/useful.h" + +#include +#include + +// file global lock and avl. +static gpr_mu g_mu; +static grpc_avl g_avl; +static gpr_atm g_uuid = 0; + +// avl vtable for uuid (intptr_t) -> ChannelTrace +// this table is only looking, it does not own anything. +static void destroy_intptr(void* not_used, void* user_data) {} +static void* copy_intptr(void* key, void* user_data) { return key; } +static long compare_intptr(void* key1, void* key2, void* user_data) { + return GPR_ICMP(key1, key2); +} + +static void destroy_channel_trace(void* trace, void* user_data) {} +static void* copy_channel_trace(void* trace, void* user_data) { return trace; } +static const grpc_avl_vtable avl_vtable = { + destroy_intptr, copy_intptr, compare_intptr, destroy_channel_trace, + copy_channel_trace}; + +void grpc_channelz_registry_init() { + gpr_mu_init(&g_mu); + g_avl = grpc_avl_create(&avl_vtable); +} + +void grpc_channelz_registry_shutdown() { + grpc_avl_unref(g_avl, nullptr); + gpr_mu_destroy(&g_mu); +} + +intptr_t grpc_channelz_registry_register_channel_trace( + grpc_core::ChannelTrace* channel_trace) { + intptr_t prior = gpr_atm_no_barrier_fetch_add(&g_uuid, 1); + gpr_mu_lock(&g_mu); + g_avl = grpc_avl_add(g_avl, (void*)prior, channel_trace, nullptr); + gpr_mu_unlock(&g_mu); + return prior; +} + +void grpc_channelz_registry_unregister_channel_trace(intptr_t uuid) { + gpr_mu_lock(&g_mu); + g_avl = grpc_avl_remove(g_avl, (void*)uuid, nullptr); + gpr_mu_unlock(&g_mu); +} + +grpc_core::ChannelTrace* grpc_channelz_registry_get_channel_trace( + intptr_t uuid) { + gpr_mu_lock(&g_mu); + grpc_core::ChannelTrace* ret = static_cast( + grpc_avl_get(g_avl, (void*)uuid, nullptr)); + gpr_mu_unlock(&g_mu); + return ret; +} diff --git a/src/core/lib/channel/channelz_registry.h b/src/core/lib/channel/channelz_registry.h new file mode 100644 index 0000000000..1f7501a31e --- /dev/null +++ b/src/core/lib/channel/channelz_registry.h @@ -0,0 +1,43 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_LIB_CHANNEL_CHANNELz_REGISTRY_H +#define GRPC_CORE_LIB_CHANNEL_CHANNELz_REGISTRY_H + +#include + +#include "src/core/lib/channel/channel_trace.h" + +#include + +// TODO(ncteisen): convert this file to C++ + +void grpc_channelz_registry_init(); +void grpc_channelz_registry_shutdown(); + +// globally registers a ChannelTrace. Returns its unique uuid +intptr_t grpc_channelz_registry_register_channel_trace( + grpc_core::ChannelTrace* channel_trace); +// globally unregisters the ChannelTrace that is associated to uuid. +void grpc_channelz_registry_unregister_channel_trace(intptr_t uuid); +// if object with uuid has previously been registered, returns the ChannelTrace +// associated with that uuid. Else returns nullptr. +grpc_core::ChannelTrace* grpc_channelz_registry_get_channel_trace( + intptr_t uuid); + +#endif /* GRPC_CORE_LIB_CHANNEL_CHANNELz_REGISTRY_H */ diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc index a14f77e346..cbc7c2dc96 100644 --- a/src/core/lib/surface/init.cc +++ b/src/core/lib/surface/init.cc @@ -27,7 +27,7 @@ #include #include #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/channel/channel_trace_registry.h" +#include "src/core/lib/channel/channelz_registry.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/handshaker_registry.h" #include "src/core/lib/debug/stats.h" @@ -127,7 +127,7 @@ void grpc_init(void) { grpc_slice_intern_init(); grpc_mdctx_global_init(); grpc_channel_init_init(); - grpc_channel_trace_registry_init(); + grpc_channelz_registry_init(); grpc_security_pre_init(); grpc_core::ExecCtx::GlobalInit(); grpc_iomgr_init(); @@ -176,7 +176,7 @@ void grpc_shutdown(void) { grpc_mdctx_global_shutdown(); grpc_handshaker_factory_registry_shutdown(); grpc_slice_intern_shutdown(); - grpc_channel_trace_registry_shutdown(); + grpc_channelz_registry_shutdown(); grpc_stats_shutdown(); grpc_core::Fork::GlobalShutdown(); } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index bf6c2534a8..f3557368d4 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -64,7 +64,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/channel/channel_stack.cc', 'src/core/lib/channel/channel_stack_builder.cc', 'src/core/lib/channel/channel_trace.cc', - 'src/core/lib/channel/channel_trace_registry.cc', + 'src/core/lib/channel/channelz_registry.cc', 'src/core/lib/channel/connected_channel.cc', 'src/core/lib/channel/handshaker.cc', 'src/core/lib/channel/handshaker_factory.cc', diff --git a/test/core/channel/channel_trace_test.cc b/test/core/channel/channel_trace_test.cc index 3c73e33612..da644d00d5 100644 --- a/test/core/channel/channel_trace_test.cc +++ b/test/core/channel/channel_trace_test.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_trace.h" -#include "src/core/lib/channel/channel_trace_registry.h" +#include "src/core/lib/channel/channelz_registry.h" #include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/json/json.h" @@ -99,8 +99,7 @@ void ValidateTraceDataMatchedUuidLookup(RefCountedPtr tracer) { intptr_t uuid = tracer->GetUuid(); if (uuid == -1) return; // Doesn't make sense to lookup if tracing disabled char* tracer_json_str = tracer->RenderTrace(); - ChannelTrace* uuid_lookup = - grpc_channel_trace_registry_get_channel_trace(uuid); + ChannelTrace* uuid_lookup = grpc_channelz_registry_get_channel_trace(uuid); char* uuid_lookup_json_str = uuid_lookup->RenderTrace(); EXPECT_EQ(strcmp(tracer_json_str, uuid_lookup_json_str), 0); gpr_free(tracer_json_str); diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 37a936b7cd..41e3f1916c 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1013,7 +1013,7 @@ src/core/lib/channel/channel_args.h \ src/core/lib/channel/channel_stack.h \ src/core/lib/channel/channel_stack_builder.h \ src/core/lib/channel/channel_trace.h \ -src/core/lib/channel/channel_trace_registry.h \ +src/core/lib/channel/channelz_registry.h \ src/core/lib/channel/connected_channel.h \ src/core/lib/channel/context.h \ src/core/lib/channel/handshaker.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 6ae1c490a6..9dd24848bc 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1039,8 +1039,8 @@ src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_stack_builder.h \ src/core/lib/channel/channel_trace.cc \ src/core/lib/channel/channel_trace.h \ -src/core/lib/channel/channel_trace_registry.cc \ -src/core/lib/channel/channel_trace_registry.h \ +src/core/lib/channel/channelz_registry.cc \ +src/core/lib/channel/channelz_registry.h \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/connected_channel.h \ src/core/lib/channel/context.h \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index d7dc75b80e..a35a306c5c 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -9242,7 +9242,7 @@ "src/core/lib/channel/channel_stack.cc", "src/core/lib/channel/channel_stack_builder.cc", "src/core/lib/channel/channel_trace.cc", - "src/core/lib/channel/channel_trace_registry.cc", + "src/core/lib/channel/channelz_registry.cc", "src/core/lib/channel/connected_channel.cc", "src/core/lib/channel/handshaker.cc", "src/core/lib/channel/handshaker_factory.cc", @@ -9413,7 +9413,7 @@ "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.h", "src/core/lib/channel/channel_trace.h", - "src/core/lib/channel/channel_trace_registry.h", + "src/core/lib/channel/channelz_registry.h", "src/core/lib/channel/connected_channel.h", "src/core/lib/channel/context.h", "src/core/lib/channel/handshaker.h", @@ -9562,7 +9562,7 @@ "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.h", "src/core/lib/channel/channel_trace.h", - "src/core/lib/channel/channel_trace_registry.h", + "src/core/lib/channel/channelz_registry.h", "src/core/lib/channel/connected_channel.h", "src/core/lib/channel/context.h", "src/core/lib/channel/handshaker.h", -- cgit v1.2.3